File: Makefile

package info (click to toggle)
bootpc 0.64-7
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, lenny, sid, squeeze, stretch, wheezy
  • size: 168 kB
  • ctags: 148
  • sloc: ansic: 836; sh: 137; makefile: 76
file content (58 lines) | stat: -rw-r--r-- 1,404 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
# Last updated : Tue Dec 15 03:38:58 1998
# Version 0.64
#
# $Revision: 1.9 $
#
PROG=bootpc
CFLAGS=-O2 -Wall

# list the Cfiles here
CFILES=bootpc.c main.c

# List the header files here
CHEADS=bootpc.h bootp.h bptypes.h log.h

# Other files we want to have arround in distrib
MISC=Makefile MANIFEST LICENCE NOTICE LSM DHCP README WHEN-IT-FAILS VERSION \
	 ChangeLog rc.bootp VERSION

# the delete command
RM=/bin/rm
SED=/usr/bin/sed

# we generate this from the list of C files above
OBJS=$(CFILES:.c=.o)

%.o:	%.c $(CHEADS)
	$(CC) $(CFLAGS) -c $(*).c

all:	$(PROG)

clean:
	${RM} -f ${OBJS} ${PROG} *~ *.tar *.tar.gz *.tgz

${PROG}: ${OBJS}
	${CC} -o ${PROG} ${CFLAGS} ${OBJS}
	#strip ${PROG}

${PROG}-static: ${OBJS}
	${CC} -static -o ${PROG} ${CFLAGS} ${OBJS}
	#strip ${PROG}

# Make up a distribution file from the bits we want people to see
distrib:  $(CFILES) $(CHEADS) $(MISC)
	set `cat VERSION` ;\
	rdate=`date '+%d%h%y'|tr '[a-z]' '[A-Z]'`; \
	distname=bootpc-$$1 ; \
	rm -fr $$distname $$distname.tar $$distname.tar.gz; \
	mkdir $$distname; \
	chmod 755 $$distname; \
	for i in `cat MANIFEST` ; do \
	  [ -f $$i ] && sed -e "s/0.64/$$1/g;s/17DEC98/$$rdate/g" $$i > $$distname/$$i && echo $$i; \
	done; \
	ln -s LSM $$distname/$$distname.lsm; \
	cp $$distname/$$distname.lsm .; \
	chmod -R a+rx $$distname; \
	tar -cvf $$distname.tar $$distname; \
	gzip -9v $$distname.tar; \
	rm -fr $$distname