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
35 top_srcdir
= @top_srcdir@
39 # You shouldn't need to edit anything below here.
48 DEFS
= @DEFS@ @CPPFLAGS@ @V_DEFS@
52 FULL_CFLAGS
= $(CCOPT
) $(DEFS
) $(INCLS
) $(CFLAGS
)
61 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
62 INSTALL_DATA
= @INSTALL_DATA@
65 DEPENDENCY_CFLAG
= @DEPENDENCY_CFLAG@
67 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
68 # Also, gcc does not remove the .o before forking 'as', which can be a
69 # problem if you don't own the file but can write to the directory.
72 $(CC
) $(FULL_CFLAGS
) -c
$(srcdir)/$*.c
74 CSRC
= fptype.c tcpdump.c
190 print-openflow-1.0.c \
191 print-openflow-1.3.c \
238 print-unsupported.c \
255 LOCALSRC
= @LOCALSRC@
258 LIBNETDISSECT_OBJ
=$(LIBNETDISSECT_SRC
:.c
=.o
) ${LOCALSRC
:.c
=.o
} ${LIBOBJS}
259 LIBNETDISSECT
=libnetdissect.a
262 SRC
= $(CSRC
) $(LOCALSRC
)
264 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
265 # hack the extra indirection
299 netdissect-stdinc.h \
315 status-exit-codes.h \
318 timeval-operations.h \
323 /usr
/include/netinet
/if_ether.h \
324 /usr
/include/netinet
/in.h
326 TAGFILES
= $(SRC
) $(HDR
) $(TAGHDR
) $(LIBNETDISSECT_SRC
) \
327 print-pflog.c print-smb.c smbutil.c
329 CLEANFILES
= $(PROG
) $(OBJ
) $(LIBNETDISSECT_OBJ
)
339 Makefile-devel-adds \
345 cmake_uninstall.cmake.in \
347 cmake
/Modules
/FindCRYPTO.cmake \
348 cmake
/Modules
/FindPCAP.cmake \
349 cmake
/Modules
/FindSMI.cmake \
355 doc
/README.Win32.md \
363 missing
/datalinks.c \
364 missing
/getopt_long.h \
365 missing
/getopt_long.c \
366 missing
/getservent.c \
367 missing
/pcap_dump_ftell.c \
373 missing
/win_ether_ntohost.c \
374 missing
/win_ether_ntohost.h \
384 TEST_DIST
= `git ls-files tests | grep -v 'tests/\..*'`
388 $(PROG
): $(OBJ
) @V_PCAPDEP@
$(LIBNETDISSECT
)
390 $(CC
) $(FULL_CFLAGS
) $(LDFLAGS
) -o
$@
$(OBJ
) $(LIBNETDISSECT
) $(LIBS
)
392 $(LIBNETDISSECT
): $(LIBNETDISSECT_OBJ
)
394 $(AR
) cr
$@
$(LIBNETDISSECT_OBJ
)
397 datalinks.o
: $(srcdir)/missing
/datalinks.c
398 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/datalinks.c
399 dlnames.o
: $(srcdir)/missing
/dlnames.c
400 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/dlnames.c
401 getservent.o
: $(srcdir)/missing
/getservent.c
402 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/getservent.c
403 getopt_long.o
: $(srcdir)/missing
/getopt_long.c
404 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/getopt_long.c
405 snprintf.o
: $(srcdir)/missing
/snprintf.c
406 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/snprintf.c
407 strdup.o
: $(srcdir)/missing
/strdup.c
408 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strdup.c
409 strlcat.o
: $(srcdir)/missing
/strlcat.c
410 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strlcat.c
411 strlcpy.o
: $(srcdir)/missing
/strlcpy.c
412 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strlcpy.c
413 strsep.o
: $(srcdir)/missing
/strsep.c
414 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strsep.c
415 pcap_dump_ftell.o
: $(srcdir)/missing
/pcap_dump_ftell.c
416 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/pcap_dump_ftell.c
419 [ -d
$(DESTDIR
)$(bindir) ] || \
420 (mkdir
-p
$(DESTDIR
)$(bindir); chmod
755 $(DESTDIR
)$(bindir))
421 $(INSTALL_PROGRAM
) $(PROG
) $(DESTDIR
)$(bindir)/$(PROG
)
422 $(INSTALL_PROGRAM
) $(PROG
) $(DESTDIR
)$(bindir)/$(PROG
).
`cat ${srcdir}/VERSION`
423 [ -d
$(DESTDIR
)$(mandir)/man1
] || \
424 (mkdir
-p
$(DESTDIR
)$(mandir)/man1
; chmod
755 $(DESTDIR
)$(mandir)/man1
)
425 $(INSTALL_DATA
) $(PROG
).1 $(DESTDIR
)$(mandir)/man1
/$(PROG
).1
428 rm -f
$(DESTDIR
)$(bindir)/$(PROG
)
429 rm -f
$(DESTDIR
)$(bindir)/$(PROG
).
`cat ${srcdir}/VERSION`
430 rm -f
$(DESTDIR
)$(mandir)/man1
/$(PROG
).1
433 lint
-hbxn
$(SRC
) $(LIBNETDISSECT_SRC
) | \
434 grep
-v
'struct/union .* never defined' | \
435 grep
-v
'possible pointer alignment problem'
438 rm -f
$(CLEANFILES
) $(PROG
)-`cat ${srcdir}/VERSION`.
tar.gz
441 rm -f
$(CLEANFILES
) Makefile config.cache config.log config.status \
442 config.h gnuc.h os-proto.h stamp-h stamp-h.in
$(PROG
).1 \
443 libnetdissect.a tests
/.failed tests
/.passed \
444 tests
/failure-outputs.txt
445 rm -rf autom4te.cache tests
/DIFF tests
/NEW
448 $(srcdir)/tests
/TESTrun
454 ctags
-wtd
$(TAGFILES
)
461 name
=$(PROG
)-`cat VERSION` && \
463 tar cf
- $(CSRC
) $(HDR
) $(LIBNETDISSECT_SRC
) $(EXTRA_DIST
) $(TEST_DIST
) |
(cd
$$name; tar xf
-) && \
464 tar cf
- $$name | gzip
>$$name.
tar.gz
&& \
468 @VER
=`cat $(srcdir)/VERSION`; \
469 sed
-i
"s/$$VER/$${VER}$@/" VERSION
; \
471 git checkout VERSION configure
477 $(MKDEP
) -c
"$(CC)" -m
"$(DEPENDENCY_CFLAG)" -s
"$(srcdir)" $(DEFS
) $(INCLS
) $(SRC
) $(LIBNETDISSECT_SRC
)
480 shellcheck
-f gcc build.sh build_matrix.sh build_common.sh