File: Makefile.config

package info (click to toggle)
iroffer 0.1b32-2
  • links: PTS
  • area: main
  • in suites: potato, woody
  • size: 288 kB
  • ctags: 404
  • sloc: ansic: 5,330; sh: 154; makefile: 114
file content (78 lines) | stat: -rw-r--r-- 2,749 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

version = 0.1b33
objects = obj/admin.o obj/display.o obj/iroffer.o \
          obj/misc.o obj/plugins.o obj/remoteadmin.o \
          obj/transfer.o obj/utilities.o
headers = src/defines.h src/globals.h src/headers.h Makefile
flags   = ${DEBUG} -DSIGNEDSOCK='${SOCK}' -D_OS_${OS} -O2 -Wall
tarf    = iroffer${version}/iroffer${version}.tar
tarfos  = iroffer${version}/iroffer${version}_${OS}.tar
CC      = gcc
insdir  = /usr/local/bin

all: iroffer

iroffer: obj ${objects} ${headers}
	${CC} ${objects} ${LIBS} -o iroffer

# I give up, there are some really fu*k'ed up versions of make out there
#   lets just define each file seperately
#${OBJLINE}
#	${CC} -c ${flags} $< -o $@

obj:
	mkdir -p obj
obj/admin.o: src/admin.c ${headers}
	${CC} -c ${flags} -o obj/admin.o src/admin.c
obj/display.o: src/display.c ${headers}
	${CC} -c ${flags} -o obj/display.o src/display.c
obj/iroffer.o: src/iroffer.c ${headers}
	${CC} -c ${flags} -o obj/iroffer.o src/iroffer.c
obj/misc.o: src/misc.c ${headers}
	${CC} -c ${flags} -o obj/misc.o src/misc.c
obj/plugins.o: src/plugins.c ${headers}
	${CC} -c ${flags} -o obj/plugins.o src/plugins.c
obj/remoteadmin.o: src/remoteadmin.c ${headers}
	${CC} -c ${flags} -o obj/remoteadmin.o src/remoteadmin.c
obj/transfer.o: src/transfer.c ${headers}
	${CC} -c ${flags} -o obj/transfer.o src/transfer.c
obj/utilities.o: src/utilities.c ${headers}
	${CC} -c ${flags} -o obj/utilities.o src/utilities.c

tar: clean
	touch * src/*
	cd ..; tar -cf ${tarf} iroffer${version}/src
	cd ..; tar -rf ${tarf} iroffer${version}/sample.config
	cd ..; tar -rf ${tarf} iroffer${version}/Makefile.config
	cd ..; tar -rf ${tarf} iroffer${version}/Configure
	cd ..; tar -rf ${tarf} iroffer${version}/README
	cd ..; tar -rf ${tarf} iroffer${version}/WHATSNEW
	cd ..; tar -rf ${tarf} iroffer${version}/iroffer.cron
	gzip iroffer${version}.tar
	mv iroffer${version}.tar.gz iroffer${version}.tgz


tarbinary: clean iroffer
	touch * src/*
	mv iroffer iroffer${version}_${OS}
	ln -s iroffer${version}_${OS} iroffer
	rm obj/*.o
	cd ..; tar -cf ${tarfos} iroffer${version}/src
	cd ..; tar -rf ${tarfos} iroffer${version}/sample.config
	cd ..; tar -rf ${tarfos} iroffer${version}/Makefile.config
	cd ..; tar -rf ${tarfos} iroffer${version}/Configure
	cd ..; tar -rf ${tarfos} iroffer${version}/README
	cd ..; tar -rf ${tarfos} iroffer${version}/WHATSNEW
	cd ..; tar -rf ${tarfos} iroffer${version}/iroffer.cron
	cd ..; tar -rf ${tarfos} iroffer${version}/iroffer
	cd ..; tar -rf ${tarfos} iroffer${version}/iroffer${version}_${OS}
	gzip iroffer${version}_${OS}.tar
	mv iroffer${version}_${OS}.tar.gz iroffer${version}_${OS}.tgz
	

clean:
	/bin/rm -f iroffer core obj/*.o

install: iroffer
	install -o root -g root -m 0755 iroffer ${insdir}/iroffer