Debian Codegraph @

Makefile

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