# Last updated : Thu Dec 21 10:50:35 1995
# V0.50

PROG=bootpc
#CFLAGS=-O6 -ansi -Wall -pedantic -m486
CFLAGS=-O6 -Wall -pedantic
# Apparently -ansi breaks with some headers shipped with some versions
# Remove -m486 since we may be on any Linux system...

# list the Cfiles here
CFILES=bootpc.c

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

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

# the delete command
RM=/bin/rm

# 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}

# Make up a distribution file from the bits we want people to see
distrib:  $(CFILES) $(CHEADS) $(MISC)
	set `cat VERSION` ;\
	distname=$$1; \
	rm -fr $$distname; \
	mkdir $$distname; \
	chmod a+w $$distname; \
	for i in `cat MANIFEST` ; do \
	  echo $$i; ln $$i $$distname ;\
	done; \
	chmod -R a+rx $$distname; \
	tar -cvf $$distname.tar $$distname; \
	gzip -9v $$distname.tar || true; \
	rm -fr $$distname
