~ubuntu-branches/ubuntu/karmic/bootpc/karmic

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Herbert Xu
  • Date: 2000-11-15 21:32:15 UTC
  • Revision ID: james.westby@ubuntu.com-20001115213215-fbob3f7gl5nb9vwm
Tags: upstream-0.64
ImportĀ upstreamĀ versionĀ 0.64

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Last updated : Tue Dec 15 03:38:58 1998
 
2
# Version 0.64
 
3
#
 
4
# $Revision: 1.9 $
 
5
#
 
6
PROG=bootpc
 
7
CFLAGS=-O2 -Wall
 
8
 
 
9
# list the Cfiles here
 
10
CFILES=bootpc.c main.c
 
11
 
 
12
# List the header files here
 
13
CHEADS=bootpc.h bootp.h bptypes.h log.h
 
14
 
 
15
# Other files we want to have arround in distrib
 
16
MISC=Makefile MANIFEST LICENCE NOTICE LSM DHCP README WHEN-IT-FAILS VERSION \
 
17
         ChangeLog rc.bootp VERSION
 
18
 
 
19
# the delete command
 
20
RM=/bin/rm
 
21
SED=/usr/bin/sed
 
22
 
 
23
# we generate this from the list of C files above
 
24
OBJS=$(CFILES:.c=.o)
 
25
 
 
26
%.o:    %.c $(CHEADS)
 
27
        $(CC) $(CFLAGS) -c $(*).c
 
28
 
 
29
all:    $(PROG)
 
30
 
 
31
clean:
 
32
        ${RM} -f ${OBJS} ${PROG} *~ *.tar *.tar.gz *.tgz
 
33
 
 
34
${PROG}: ${OBJS}
 
35
        ${CC} -o ${PROG} ${CFLAGS} ${OBJS}
 
36
        strip ${PROG}
 
37
 
 
38
${PROG}-static: ${OBJS}
 
39
        ${CC} -static -o ${PROG} ${CFLAGS} ${OBJS}
 
40
        strip ${PROG}
 
41
 
 
42
# Make up a distribution file from the bits we want people to see
 
43
distrib:  $(CFILES) $(CHEADS) $(MISC)
 
44
        set `cat VERSION` ;\
 
45
        rdate=`date '+%d%h%y'|tr '[a-z]' '[A-Z]'`; \
 
46
        distname=bootpc-$$1 ; \
 
47
        rm -fr $$distname $$distname.tar $$distname.tar.gz; \
 
48
        mkdir $$distname; \
 
49
        chmod 755 $$distname; \
 
50
        for i in `cat MANIFEST` ; do \
 
51
          [ -f $$i ] && sed -e "s/0.64/$$1/g;s/17DEC98/$$rdate/g" $$i > $$distname/$$i && echo $$i; \
 
52
        done; \
 
53
        ln -s LSM $$distname/$$distname.lsm; \
 
54
        cp $$distname/$$distname.lsm .; \
 
55
        chmod -R a+rx $$distname; \
 
56
        tar -cvf $$distname.tar $$distname; \
 
57
        gzip -9v $$distname.tar; \
 
58
        rm -fr $$distname