Debian Codegraph @

Makefile

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