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
|
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
PROG= rbootd
SRCS= pcap.c conf.c parseconf.c rbootd.c rmpproto.c utils.c
OBJS = pcap.o conf.o parseconf.o rbootd.o rmpproto.o utils.o
MAN= rbootd.8
# We used to -lbsd but that seems to have gone away with glibc...
LFLAGS = -lpcap
# -Wall picks up all the static char rcsid[] stuff but is otherwise clean
CFLAGS = -O2 -Wall -Wno-unused-variable
rbootd: $(OBJS)
$(CC) -o $@ $(OBJS) $(LFLAGS)
clean:
rm -f *.o
rm -f rbootd
rm -f rbootd.8.gz
rbootd.8.gz: $(MAN)
gzip -9 < rbootd.8 > rbootd.8.gz
all: rbootd rbootd.8.gz
INSTALL = install
IFLAGS = -o root -g root
INSTALL += ${IFLAGS}
DESTDIR = ./root
install: all
${INSTALL} -d ${DESTDIR}/etc \
${DESTDIR}/usr/sbin \
${DESTDIR}/var/lib/rbootd \
${DESTDIR}/usr/share/man/man8
${INSTALL} -m644 etc-rbootd/rbootd.conf ${DESTDIR}/etc
${INSTALL} -m755 rbootd ${DESTDIR}/usr/sbin
${INSTALL} -m444 rbootd.8.gz ${DESTDIR}/usr/share/man/man8
else # BSD
# Makefile for BSD
PROG= rbootd
SRCS= bpf.c conf.c parseconf.c rbootd.c rmpproto.c utils.c
MAN= rbootd.8
.include <bsd.prog.mk>
endif
|