Debian Codegraph @

Makefile

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