File: Makefile

package info (click to toggle)
digitaldj 0.6-7.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 268 kB
  • ctags: 264
  • sloc: ansic: 3,112; makefile: 90
file content (87 lines) | stat: -rwxr-xr-x 2,181 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
# Makefile for DigitalDJ

# Compiler
CC=	gcc

# Install prefix
PREFIX=/usr

# Installation directory -- where the binary will go
INSTALLDIR= $(PREFIX)/bin

# Location to store auxilliary files
AUXDIR= $(PREFIX)/lib/ddj

# Compiler flags
CFLAGS=	-Wall `gtk-config --cflags` -DAUXDIR=\"$(AUXDIR)\" -I/usr/include/mysql

# Link libraries
LIBS=	`gtk-config --libs` -L/usr/local/lib -lpthread \
	-L/usr/lib/mysql -lmysqlclient

# This is needed for "make install"
OWNER  = root
GROUP  = root
INSTALL  = /usr/bin/install -o $(OWNER) -g $(GROUP)


# ----------- You shouldn't need to make changes below here. -------------

VERSION= 0.6

OBJS=	mp3db.o parsecfg.o dialog/message.o dialog/input.o

all: ddj mp3insert

ddj:	ddj.o $(OBJS) ddj.h
	$(CC) -o ddj ddj.o $(OBJS) $(LIBS)

ddj.o:	ddj.h

mp3insert:	mp3insert.o $(OBJS) ddj.h
	$(CC) -o mp3insert mp3insert.o $(OBJS) $(LIBS)

mp3insert.o:	ddj.h

install:
	$(INSTALL) -d $(INSTALLDIR)
	$(INSTALL) ddj $(INSTALLDIR)
	$(INSTALL) mp3insert $(INSTALLDIR)
#	$(INSTALL) -d $(AUXDIR)

# Source distribution
srcdist:
	-rm -rf DigitalDJ-$(VERSION)
	-mkdir DigitalDJ-$(VERSION)
	cp ddj.c DigitalDJ-$(VERSION)
	cp ddj.h DigitalDJ-$(VERSION)
	cp xpm.h DigitalDJ-$(VERSION)
	cp mp3db.c DigitalDJ-$(VERSION)
	cp parsecfg.c DigitalDJ-$(VERSION)
	cp parsecfg.h DigitalDJ-$(VERSION)
	cp mp3insert.c DigitalDJ-$(VERSION)
	-mkdir DigitalDJ-$(VERSION)/dialog
	cp dialog/message.c DigitalDJ-$(VERSION)/dialog
	cp dialog/input.c DigitalDJ-$(VERSION)/dialog
	cp dialog/dialog.h DigitalDJ-$(VERSION)/dialog
	cp README DigitalDJ-$(VERSION)
	cp LICENSE DigitalDJ-$(VERSION)
	cp TODO DigitalDJ-$(VERSION)
	cp Makefile DigitalDJ-$(VERSION)
	cp ddjicon.tif DigitalDJ-$(VERSION)
	cp ddjicon.gif DigitalDJ-$(VERSION)
	cp ddj.spec DigitalDJ-$(VERSION)
	cp -R pixmaps DigitalDJ-$(VERSION)
	tar -czf DigitalDJ-$(VERSION).tgz DigitalDJ-$(VERSION)
 
# Redhat RPM
rpm:	srcdist
	cp DigitalDJ-$(VERSION).tgz /usr/src/redhat/SOURCES
	cp ddjicon.gif /usr/src/redhat/SOURCES
	cp ddj.spec DigitalDJ-$(VERSION).spec
	chown root.root DigitalDJ-$(VERSION).spec
	rpm -ba DigitalDJ-$(VERSION).spec

# Tidy up after ourselves
clean:
	-rm -rf ddj mp3insert *.o dialog/*.o DigitalDJ-* *~