1 # Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
2 # The Regents of the University of California. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that: (1) source code distributions
6 # retain the above copyright notice and this paragraph in its entirety, (2)
7 # distributions including binary code include the above copyright notice and
8 # this paragraph in its entirety in the documentation or other materials
9 # provided with the distribution, and (3) all advertising materials mentioning
10 # features or use of this software display the following acknowledgement:
11 # ``This product includes software developed by the University of California,
12 # Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
13 # the University nor the names of its contributors may be used to endorse
14 # or promote products derived from this software without specific prior
16 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
17 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
18 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 # Various configurable paths (remember to edit Makefile.in, not Makefile)
26 exec_prefix = @
exec_prefix@
27 datarootdir
= @datarootdir@
28 # Pathname of directory to install the binary
30 # Pathname of directory to install the man page
38 # You shouldn't need to edit anything below here.
47 DEFS
= @DEFS@ @CPPFLAGS@ @V_DEFS@
51 FULL_CFLAGS
= $(CCOPT
) $(DEFS
) $(INCLS
) $(CFLAGS
)
60 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
61 INSTALL_DATA
= @INSTALL_DATA@
64 DEPENDENCY_CFLAG
= @DEPENDENCY_CFLAG@
66 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
67 # Also, gcc does not remove the .o before forking 'as', which can be a
68 # problem if you don't own the file but can write to the directory.
71 $(CC
) $(FULL_CFLAGS
) -c
$(srcdir)/$*.c
73 CSRC
= setsignal.c tcpdump.c
164 print-openflow-1.0.c \
214 LOCALSRC
= @LOCALSRC@
218 LIBNETDISSECT_OBJ
=$(LIBNETDISSECT_SRC
:.c
=.o
) ${LOCALSRC
:.c
=.o
} ${LIBOBJS}
219 LIBNETDISSECT
=libnetdissect.a
222 SRC
= $(CSRC
) $(GENSRC
) $(LOCALSRC
) $(LIBNETDISSECT_SRC
)
224 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
225 # hack the extra indirection
226 OBJ
= $(CSRC
:.c
=.o
) $(GENSRC
:.c
=.o
) $(LIBNETDISSECT_OBJ
)
275 /usr
/include/arpa
/tftp.h \
276 /usr
/include/net
/if_arp.h \
277 /usr
/include/net
/slip.h \
278 /usr
/include/netinet
/if_ether.h \
279 /usr
/include/netinet
/in.h \
280 /usr
/include/netinet
/ip_icmp.h \
281 /usr
/include/netinet
/tcp.h \
282 /usr
/include/netinet
/udp.h \
283 /usr
/include/protocols
/routed.h
285 TAGFILES
= $(SRC
) $(HDR
) $(TAGHDR
)
287 CLEANFILES
= $(PROG
) $(OBJ
) $(GENSRC
)
295 Makefile-devel-adds \
315 missing
/datalinks.c \
316 missing
/getnameinfo.c \
317 missing
/getopt_long.c \
318 missing
/inet_aton.c \
319 missing
/inet_ntop.c \
320 missing
/inet_pton.c \
347 win32
/Include
/w32_fzs.h \
348 win32
/prj
/GNUmakefile \
349 win32
/prj
/WinDump.dsp \
350 win32
/prj
/WinDump.dsw
352 TEST_DIST
= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -type f \! -name '.*' \! -name '*~' -print`
354 all: $(PROG
) $(LIBNETDISSECT
)
356 $(PROG
): $(OBJ
) @V_PCAPDEP@
358 $(CC
) $(FULL_CFLAGS
) $(LDFLAGS
) -o
$@
$(OBJ
) $(LIBS
)
360 $(LIBNETDISSECT
): $(LIBNETDISSECT_OBJ
)
362 $(AR
) cr
$@
$(LIBNETDISSECT_OBJ
)
365 datalinks.o
: $(srcdir)/missing
/datalinks.c
366 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/datalinks.c
367 dlnames.o
: $(srcdir)/missing
/dlnames.c
368 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/dlnames.c
369 getnameinfo.o
: $(srcdir)/missing
/getnameinfo.c
370 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/getnameinfo.c
371 getopt_long.o
: $(srcdir)/missing
/getopt_long.c
372 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/getopt_long.c
373 inet_pton.o
: $(srcdir)/missing
/inet_pton.c
374 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/inet_pton.c
375 inet_ntop.o
: $(srcdir)/missing
/inet_ntop.c
376 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/inet_ntop.c
377 inet_aton.o
: $(srcdir)/missing
/inet_aton.c
378 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/inet_aton.c
379 snprintf.o
: $(srcdir)/missing
/snprintf.c
380 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/snprintf.c
381 strdup.o
: $(srcdir)/missing
/strdup.c
382 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strdup.c
383 strlcat.o
: $(srcdir)/missing
/strlcat.c
384 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strlcat.c
385 strlcpy.o
: $(srcdir)/missing
/strlcpy.c
386 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strlcpy.c
387 strsep.o
: $(srcdir)/missing
/strsep.c
388 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strsep.c
391 $(CC
) $(FULL_CFLAGS
) -c version.c
393 version.c
: $(srcdir)/VERSION
395 if grep GIT
${srcdir}/VERSION
>/dev
/null
; then \
396 read ver
<${srcdir}/VERSION
; \
397 echo
$$ver | tr
-d
'\012'; \
400 cat
${srcdir}/VERSION
; \
401 fi | sed
-e
's/.*/const char version[] = "&";/' > $@
404 [ -d
$(DESTDIR
)$(sbindir
) ] || \
405 (mkdir
-p
$(DESTDIR
)$(sbindir
); chmod
755 $(DESTDIR
)$(sbindir
))
406 $(INSTALL_PROGRAM
) $(PROG
) $(DESTDIR
)$(sbindir
)/$(PROG
)
407 $(INSTALL_PROGRAM
) $(PROG
) $(DESTDIR
)$(sbindir
)/$(PROG
).
`cat ${srcdir}/VERSION`
408 [ -d
$(DESTDIR
)$(mandir)/man1
] || \
409 (mkdir
-p
$(DESTDIR
)$(mandir)/man1
; chmod
755 $(DESTDIR
)$(mandir)/man1
)
410 $(INSTALL_DATA
) $(PROG
).1 $(DESTDIR
)$(mandir)/man1
/$(PROG
).1
413 rm -f
$(DESTDIR
)$(sbindir
)/$(PROG
)
414 rm -f
$(DESTDIR
)$(mandir)/man1
/$(PROG
).1
417 lint
-hbxn
$(SRC
) | \
418 grep
-v
'struct/union .* never defined' | \
419 grep
-v
'possible pointer alignment problem'
422 rm -f
$(CLEANFILES
) $(PROG
)-`cat VERSION`.
tar.gz
425 rm -f
$(CLEANFILES
) Makefile config.cache config.log config.status \
426 config.h gnuc.h os-proto.h stamp-h stamp-h.in
$(PROG
).1 \
427 libnetdissect.a tests
/.failed tests
/.passed \
428 tests
/failure-outputs.txt
429 rm -rf autom4te.cache tests
/DIFF tests
/NEW
432 (cd tests
&& .
/TESTrun.sh
)
435 ctags
-wtd
$(TAGFILES
)
441 @cwd
=`pwd` ; dir=`basename $$cwd` ; name
=$(PROG
)-`cat VERSION` ; \
443 tar cf
- $(CSRC
) $(HDR
) $(LIBNETDISSECT_SRC
) $(EXTRA_DIST
) $(TEST_DIST
) |
(cd
$$name; tar xf
-); \
444 tar -c
-z
-f
$$name.
tar.gz
$$name; \
451 $(MKDEP
) -c
$(CC
) -m
$(DEPENDENCY_CFLAG
) $(DEFS
) $(INCLS
) $(SRC
)