1 # Copyright (c) 1993, 1994, 1995, 1996
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 configure program
30 # Pathname of directory to install the rpcapd daemon
32 # Pathname of directory to install the include files
33 includedir = @includedir@
34 # Pathname of directory to install the library
36 # Pathname of directory to install the man pages
44 # You shouldn't need to edit anything below.
53 INCLS = -I. -I.. -I@srcdir@ -I@srcdir@/.. @V_INCLS@
54 DEFS = @DEFS@ @V_DEFS@
56 ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@
58 PTHREAD_LIBS = @PTHREAD_LIBS@
60 CFLAGS = @CFLAGS@ ${CROSSFLAGS}
61 LDFLAGS = @LDFLAGS@ ${CROSSFLAGS}
63 V_RPATH_OPT = @V_RPATH_OPT@
64 DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
65 EXTRA_NETWORK_LIBS=@EXTRA_NETWORK_LIBS@
67 # Standard CFLAGS for building test programs
68 FULL_CFLAGS = $(CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
71 INSTALL_PROGRAM = @INSTALL_PROGRAM@
72 INSTALL_DATA = @INSTALL_DATA@
74 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
75 # Also, gcc does not remove the .o before forking 'as', which can be a
76 # problem if you don't own the file but can write to the directory.
79 $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
81 SRC = @VALGRINDTEST_SRC@ \
83 can_set_rfmon_test.c \
96 CLEANFILES = $(OBJ) $(TESTS)
100 capturetest: $(srcdir)/capturetest.c ../libpcap.a
101 $(CC) $(FULL_CFLAGS) -I. -L. -o capturetest $(srcdir)/capturetest.c ../libpcap.a $(LIBS)
103 can_set_rfmon_test: $(srcdir)/can_set_rfmon_test.c ../libpcap.a
104 $(CC) $(FULL_CFLAGS) -I. -L. -o can_set_rfmon_test $(srcdir)/can_set_rfmon_test.c ../libpcap.a $(LIBS)
106 filtertest: $(srcdir)/filtertest.c ../libpcap.a
107 $(CC) $(FULL_CFLAGS) -I. -L. -o filtertest $(srcdir)/filtertest.c ../libpcap.a $(EXTRA_NETWORK_LIBS) $(LIBS)
109 findalldevstest: $(srcdir)/findalldevstest.c ../libpcap.a
110 $(CC) $(FULL_CFLAGS) -I. -L. -o findalldevstest $(srcdir)/findalldevstest.c ../libpcap.a $(EXTRA_NETWORK_LIBS) $(LIBS)
112 opentest: $(srcdir)/opentest.c ../libpcap.a
113 $(CC) $(FULL_CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c ../libpcap.a $(LIBS)
115 reactivatetest: $(srcdir)/reactivatetest.c ../libpcap.a
116 $(CC) $(FULL_CFLAGS) -I. -L. -o reactivatetest $(srcdir)/reactivatetest.c ../libpcap.a $(LIBS)
118 selpolltest: $(srcdir)/selpolltest.c ../libpcap.a
119 $(CC) $(FULL_CFLAGS) -I. -L. -o selpolltest $(srcdir)/selpolltest.c ../libpcap.a $(LIBS)
121 threadsignaltest: $(srcdir)/threadsignaltest.c ../libpcap.a
122 $(CC) $(FULL_CFLAGS) -I. -L. -o threadsignaltest $(srcdir)/threadsignaltest.c ../libpcap.a $(LIBS) $(PTHREAD_LIBS)
124 valgrindtest: $(srcdir)/valgrindtest.c ../libpcap.a
125 $(CC) $(FULL_CFLAGS) -I. -L. -o valgrindtest $(srcdir)/valgrindtest.c ../libpcap.a $(LIBS)
132 rm -f Makefile config.cache config.log config.status \
133 config.h stamp-h stamp-h.in
134 rm -rf autom4te.cache
141 ctags -wtd $(TAGFILES)
144 ../$(MKDEP) -c "$(CC)" -m "$(DEPENDENCY_CFLAG)" $(CFLAGS) $(DEFS) $(INCLS) $(SRC)