-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
87 lines (71 loc) · 1.58 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#
# Quick 'n dirty unix Makefile
#
# Mike Oliphant (oliphant@gtk.org)
#
CC?= gcc
CFLAGS+= -Wall -DHAVE_MEMCPY
# all known MS Windows OS define the ComSpec environment variable
ifdef ComSpec
ifndef OSTYPE
OSTYPE = win
endif
EXE_EXT = .exe
else
EXE_EXT =
endif
ifneq ($(OSTYPE),beos)
INSTALL_PATH= /usr/local/bin
else
INSTALL_PATH= $(HOME)/config/bin
endif
# BeOS doesn't have libm (it's all in libroot)
ifneq ($(OSTYPE),beos)
LIBS= -lm
else
# BeOS: without this it wants to use bcopy() :^)
CFLAGS+= -DHAVE_MEMCPY
endif
# Could ask pkg-config for libmpg123 flags/libs.
LIBS+= -lmpg123
ifeq ($(OSTYPE),win)
# gnu windows resource compiler
WINDRES = windres
endif
OBJS = src/mp3gain.o src/apetag.o src/id3tag.o src/gain_analysis.o src/rg_error.o
ifeq ($(OSTYPE),win)
RC_OBJ = src/VerInfo.o
endif
all: mp3gain
$(RC_OBJ):
$(WINDRES) $(RC_OBJ:.o=.rc) $(RC_OBJ)
mp3gain: $(RC_OBJ) $(OBJS)
$(CC) $(LDFLAGS) -o mp3gain $(OBJS) $(RC_OBJ) $(LIBS)
ifeq ($(OSTYPE),beos)
mimeset -f mp3gain$(EXE_EXT)
endif
install: mp3gain
ifneq ($(OSTYPE),win)
cp -p mp3gain$(EXE_EXT) "$(INSTALL_PATH)"
ifeq ($(OSTYPE),beos)
mimeset -f "$(INSTALL_PATH)/mp3gain$(EXE_EXT)"
endif
else
@echo install target is not implemented on windows
endif
uninstall:
ifneq ($(OSTYPE),win)
-rm -f "$(INSTALL_PATH)/mp3gain$(EXE_EXT)"
else
@echo uninstall target is not implemented on windows
endif
clean:
-rm -rf mp3gain$(EXE_EXT) mp3gain.zip $(OBJS) $(RC_OBJ)
dist: clean
ifneq ($(OSTYPE),win)
ifneq ($(OSTYPE),beos)
zip -r mp3gain.zip * -x "CVS/*" "*/CVS/*"
endif
else
@echo dist target is not implemented on windows and beos
endif