2 # /*************************************************
3 # * rpld - an IBM style RIPL server *
4 # *************************************************/
6 # /* Copyright (c) 1999,2000, James McKenzie.
7 # * All rights reserved
8 # * Copyright (c) 1998,2000, Christopher Lightfoot.
9 # * All rights reserved
11 # * By using this file, you agree to the terms and conditions set
12 # * forth in the LICENCE file which can be found at the top level of
13 # * the rpld distribution.
15 # * IBM is a trademark of IBM corp.
20 # $Id: Makefile,v 1.19 2000/07/29 23:25:59 root Exp root $
23 # Revision 1.19 2000/07/29 23:25:59 root
26 # Revision 1.18 2000/07/23 19:07:49 root
29 # Revision 1.17 2000/07/17 11:59:46 root
32 # Revision 1.16 2000/07/17 10:43:34 root
35 # Revision 1.15 2000/07/16 14:22:07 root
38 # Revision 1.14 2000/07/16 14:05:30 root
41 # Revision 1.13 2000/07/16 13:18:12 root
44 # Revision 1.1 2000/07/16 13:16:42 root
47 # Revision 1.14 1999/09/15 13:46:58 root
50 # Revision 1.13 1999/09/15 00:36:29 root
53 # Revision 1.12 1999/09/14 21:45:17 root
56 # Revision 1.11 1999/09/14 21:38:41 root
59 # Revision 1.10 1999/09/14 21:36:03 root
62 # Revision 1.9 1999/09/14 21:32:13 root
65 # Revision 1.8 1999/09/14 21:26:00 root
68 # Revision 1.7 1999/09/14 21:16:25 root
71 # Revision 1.6 1999/09/14 21:14:38 root
74 # Revision 1.5 1999/09/14 21:13:14 root
77 # Revision 1.4 1999/09/14 17:18:27 root
80 # Revision 1.3 1999/09/14 17:12:39 root
83 # Revision 1.2 1999/09/14 16:17:16 root
86 # Revision 1.1 1999/09/13 12:36:20 root
95 # where do you want all this stuff
102 CFLAGS = -O ${INCLUDES} ${DEFINES}
106 # Where to find yacc and lex
110 # Where to find BSD compatible install
113 ################# NO USER SERVICABLE PARTS BELOW HERE
121 ifeq (.depend,$(wildcard .depend))
124 @echo " " Now type make install to install rpld
125 @echo " " or make nics to assemble the adapter utilities
126 # @echo " " or make capture to capture RPL traffic
127 # @echo " " or make replay to analyse captured RPL traffic
128 # @echo " " or make realtime to capture and analyse RPL traffic
132 @echo " " Now type make again to build rpld
135 BINDIR= ${DESTDIR}/sbin
137 NRCLN = sed 's/.
\b//g'
148 MANROOT=${DESTDIR}/man/man
156 PROTOSRC = protocol.c linux-ps.c rpld.c util.c rpl.c llc.c client.c config.c
157 HSRCS=rpl.h project.h rpl.h linux-ps.h llc.h client.h
163 MANSRCS=rpld.man rpld.conf.man
167 RCSCFILES=${CSRCS} ${HSRCS}
168 RCSFILES=${RCSCFILES} ${YSRCS} ${LSRCS} ${MANSRCS} ana.c
175 OBJS=${CSRCS:%.c=%.o} ${YSRCS:%.y=%.yy.o} ${LSRCS:%.lex=%.tab.o}
177 YGUFF=${YSRCS:%.y=%.yy.c} ${LSRCS:%.lex=%.tab.c} ${LSRCS:%.lex=%.tab.h}
184 install: install-prog install-docs
185 @echo " " you can find a sample configuration file
186 @echo " " in this directory called rpld.conf.sample
187 @echo " " your config file should be placed in /etc/rpld.conf
189 MEN=rpld.conf.5 rpld.8
190 TXTMEN=${MEN:%=doc/%}
195 ${NROFF} ${MANDOC} $< | ${NRCLN} > $@
196 doc/rpld.conf.5:rpld.conf.man
197 ${NROFF} ${MANDOC} $< | ${NRCLN} > $@
199 %.${MAN8EXT}:%.${MAN8SRC}
202 %.${MAN5EXT}:%.${MAN5SRC}
206 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} ${PROG} ${BINDIR}
209 ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} rpld.${MAN8EXT} ${MAN8}/rpld.${MAN8EXT}
210 ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} rpld.conf.${MAN5EXT} ${MAN5}/rpld.conf.${MAN5EXT}
215 # tcpdump -l -x -s 2048 ether[14]=0xfc and ether[15]=0xfc | ana
218 tcpdump -x -s 2048 ether[14]=0xfc and ether[15]=0xfc -w capture.dat
220 #replay: ana capture.dat
221 # tcpdump -x -r capture.dat | ana
224 nics: nics.doesntexist
230 ${CC} ${CFLAGS} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBS}
233 /bin/rm -rf ${OBJS} *% *~ *.o *.BAK core a.out ${PROG}
234 /bin/rm -rf ${YSRCS:%.y=%.yy.c} ${LSRCS:%.lex=%.tab.c}
235 /bin/rm -rf ${LSRCS:%.lex=%.tab.h}
236 /bin/rm -rf ana capture.dat
237 /bin/rm -rf nics.stamp
238 /bin/rm -rf ${MEN} Makefile.bak
239 ${MAKE} -C nics clean
241 proto: ${PROTOSRCS} ${HSRCS} ${LSRCS:%.lex=%.tab.h}
243 for i in ${PROTOSRC}; do cproto -e -v $$i | grep -v inline >> ${PROTOH} ; done
247 depend: ${RCSFILES} ${YSRCS:%.y=%.tab.h}
248 makedepend -f- ${INCLUDES} ${ALLSRCS} > .depend
254 ci -l -m\# ${RCSFILES}
255 indent -ts0 -i2 ${RCSCFILES}
257 indent -ts0 -i2 ana.c
258 /bin/rm -rf nics.stamp
267 MYDIR=rpld-${VERSION}
277 cd ..; tar cvfzX ${MYDIR}/DISTRIB/${MYDIR}.tar.gz ${MYDIR}/.xclude ${MYDIR}
283 ${YACC} -d -b ${@:%.tab.c=%} $<
286 ${YACC} -d -b ${@:%.tab.h=%} $<
291 config.o: rpld_conf.tab.h