File: Makefile

package info (click to toggle)
gmp3 0.080-3
  • links: PTS
  • area: contrib
  • in suites: potato
  • size: 576 kB
  • ctags: 514
  • sloc: ansic: 5,441; makefile: 139; perl: 28; sh: 18
file content (149 lines) | stat: -rw-r--r-- 3,059 bytes parent folder | download
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#
# GMP3 Makefile
#
# This thing ain't pretty, but it does the job... autoconf is the next thing
# I need to learn...
#

VERSION=0.08

########################### Editable Variables #############################
#
# Platform is one of:
# 
# LINUX
# FREEBSD
# SOLARIS
# GENERIC (if you're not one of the above)
#
PLATFORM = LINUX

### Path options

INSTALLDIR=$(DESTDIR)/usr/X11R6
BINDIR=$(INSTALLDIR)/bin
LIBDIR=$(INSTALLDIR)/lib/gmp3

### Options for Gmp3

RCFILENAME=gmp3rc

# Relative to home directory.
RCFILEDIR=/.gmp3

ROOTNAME=MP3\'s

### Options for mpg123

MPG123=/usr/bin/mpg123
SOUNDDEV=/dev/dsp
HTTP_PROXY=
HTTP_AUTH_STRING=

### Uncomment to add debugging support

# DEBUG=1 

########################## Do not edit below here. ##########################

CC=gcc

CFLAGS=-Wall $(DEFINES) -I/usr/local/lib/glib/include
LDFLAGS=-L/usr/X11R6/lib

ifdef DEBUG
  CFLAGS+=-g -D__DEBUG__
else
  CFLAGS+=-O2
endif

OBJS=about.o \
     common.o \
     control_funcs.o \
     gmp3.o \
     handlers.o \
     list.o \
     listutils.o \
     mixer.o \
     mixerpanel.o \
     mp3tag.o \
     opt_dialog.o \
     pixmap.o \
     rc_parser.o \
     shape.o \
     themerc.o \
     xpmbutton.o

LIBS=-lgif -ljpeg -ltiff -lpng -lz \
     -lX11 -lXext -lXi \
     -lgdk -lgtk -lglib -lgdk_imlib -lm \

CONVERT_OBJS=convlist.o \
             listutils.o \
             mp3tag.o

CONVERT_LIBS=-lglib

#GTK-Config
CFLAGS += $(shell gtk-config --cflags)
LDFLAGS += $(shell gtk-config --libs)
#Adding -g flag. Will be stripped when building deb
CFLAGS += -g

DEFINES=-D__$(PLATFORM)__ \
	-DPIXMAPDIR="\"$(LIBDIR)\"" \
	-DVERSION="\"$(VERSION)\"" \
        -DRCFILENAME="\"$(RCFILENAME)\"" \
	-DRCFILEDIR="\"$(RCFILEDIR)\"" \
        -DMPG123_NAME="\"$(MPG123)\"" \
	-DROOTNAME="\"$(ROOTNAME)\"" \
	-DSOUND_DEV="\"$(SOUNDDEV)\"" \
        -DHTTP_PROXY="\"$(HTTP_PROXY)\"" \
	-DHTTP_AUTH_STRING="\"$(HTTP_AUTH_STRING)\""

gmp3 : $(OBJS) convlist
	gcc -o gmp3 $(LDFLAGS) $(OBJS) $(LIBS)

convlist : $(CONVERT_OBJS)
	gcc -o convlist $(LDFLAGS) $(CONVERT_OBJS) $(CONVERT_LIBS)


about.o : about.c about.h
common.o : common.c common.h
control_funcs.o : control_funcs.c control_funcs.h
gmp3.o : gmp3.c gmp3.h
handlers.o : handlers.c handlers.h
list.o : list.c list.h listtypes.h
listutils.o : listutils.c listutils.h listtypes.h
mixer.o : mixer.c mixer.h
mixerpanel.o : mixerpanel.c mixerpanel.h
mp3tag.o : mp3tag.c mp3tag.h
opt_dialog.o : opt_dialog.c opt_dialog.h
pixmap.o : pixmap.c pixmap.h
rc_parser.o : rc_parser.c rc_parser.h
shape.o : shape.c shape.h
songlist.o : songlist.c songlist.h
themerc.o : themerc.c themerc.h
xpmbutton.o : xpmbutton.c xpmbutton.h

install-binary :
	cp -f gmp3 $(BINDIR)
	chmod a+rx $(BINDIR)/gmp3

install-libs :
	-@mkdir -p $(LIBDIR)
	cp -Rf default $(LIBDIR)/
	cp -f gmp3logo.jpg $(LIBDIR)/

	chmod a+rx $(LIBDIR)/default
	chmod -R a+r $(LIBDIR)/default
	chmod a+r $(LIBDIR)/gmp3logo.jpg

install : install-binary install-libs
install-bin : install-binary  

clean :
	rm -f $(OBJS) $(CONVERT_OBJS)

cleanall : clean
	rm -f convlist gmp3