xref: /freebsd/contrib/libpcap/testprogs/Makefile.in (revision 5f4c09dd85bff675e0ca63c55ea3c517e0fddfcc)
1#  Copyright (c) 1993, 1994, 1995, 1996
2#	The Regents of the University of California.  All rights reserved.
3#
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
15#  written permission.
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.
19
20#
21# Various configurable paths (remember to edit Makefile.in, not Makefile)
22#
23
24# Top level hierarchy
25prefix = @prefix@
26exec_prefix = @exec_prefix@
27datarootdir = @datarootdir@
28# Pathname of directory to install the configure program
29bindir = @bindir@
30# Pathname of directory to install the rpcapd daemon
31sbindir = @sbindir@
32# Pathname of directory to install the include files
33includedir = @includedir@
34# Pathname of directory to install the library
35libdir =  @libdir@
36# Pathname of directory to install the man pages
37mandir = @mandir@
38
39# VPATH
40srcdir = @srcdir@
41top_srcdir = @top_srcdir@
42VPATH = @srcdir@
43
44#
45# You shouldn't need to edit anything below.
46#
47
48LD = /usr/bin/ld
49CC = @CC@
50AR = @AR@
51LN_S = @LN_S@
52MKDEP = @MKDEP@
53CCOPT = @V_CCOPT@
54INCLS = -I. -I.. -I@srcdir@ -I@srcdir@/.. @V_INCLS@
55DEFS = @DEFS@ @V_DEFS@
56ADDLOBJS = @ADDLOBJS@
57ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@
58LIBS = @LIBS@
59PTHREAD_LIBS = @PTHREAD_LIBS@
60CROSSFLAGS=
61CFLAGS = @CFLAGS@   ${CROSSFLAGS}
62LDFLAGS = @LDFLAGS@ ${CROSSFLAGS}
63DYEXT = @DYEXT@
64V_RPATH_OPT = @V_RPATH_OPT@
65DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
66
67# Standard CFLAGS for building test programs
68FULL_CFLAGS = $(CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
69
70INSTALL = @INSTALL@
71INSTALL_PROGRAM = @INSTALL_PROGRAM@
72INSTALL_DATA = @INSTALL_DATA@
73
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.
77.c.o:
78	@rm -f $@
79	$(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
80
81SRC = @VALGRINDTEST_SRC@ \
82	can_set_rfmon_test.c \
83	capturetest.c \
84	filtertest.c \
85	findalldevstest-perf.c \
86	findalldevstest.c \
87	opentest.c \
88	nonblocktest.c \
89	reactivatetest.c \
90	selpolltest.c \
91	threadsignaltest.c \
92	writecaptest.c
93
94TESTS = $(SRC:.c=)
95
96TAGFILES = \
97	$(SRC) $(HDR)
98
99CLEANFILES = $(OBJ) $(TESTS)
100
101all: $(TESTS)
102
103capturetest: $(srcdir)/capturetest.c ../libpcap.a
104	$(CC) $(FULL_CFLAGS) -I. -L. -o capturetest $(srcdir)/capturetest.c \
105	    ../libpcap.a $(LIBS)
106
107can_set_rfmon_test: $(srcdir)/can_set_rfmon_test.c ../libpcap.a
108	$(CC) $(FULL_CFLAGS) -I. -L. -o can_set_rfmon_test \
109	    $(srcdir)/can_set_rfmon_test.c \
110	    ../libpcap.a $(LIBS)
111
112filtertest: $(srcdir)/filtertest.c ../libpcap.a
113	$(CC) $(FULL_CFLAGS) -I. -L. -o filtertest $(srcdir)/filtertest.c \
114	    ../libpcap.a $(LIBS)
115
116findalldevstest: $(srcdir)/findalldevstest.c ../libpcap.a
117	$(CC) $(FULL_CFLAGS) -I. -L. -o findalldevstest \
118	    $(srcdir)/findalldevstest.c \
119	    ../libpcap.a $(LIBS)
120
121findalldevstest-perf: $(srcdir)/findalldevstest-perf.c ../libpcap.a
122	$(CC) $(FULL_CFLAGS) -I. -L. -o findalldevstest-perf \
123	    $(srcdir)/findalldevstest-perf.c \
124	    ../libpcap.a $(LIBS)
125
126opentest: $(srcdir)/opentest.c ../libpcap.a
127	$(CC) $(FULL_CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c \
128	    ../libpcap.a $(LIBS)
129
130nonblocktest: $(srcdir)/nonblocktest.c ../libpcap.a
131	$(CC) $(FULL_CFLAGS) -I. -L. -o nonblocktest $(srcdir)/nonblocktest.c \
132	    ../libpcap.a $(LIBS)
133
134reactivatetest: $(srcdir)/reactivatetest.c ../libpcap.a
135	$(CC) $(FULL_CFLAGS) -I. -L. -o reactivatetest \
136	    $(srcdir)/reactivatetest.c ../libpcap.a $(LIBS)
137
138selpolltest: $(srcdir)/selpolltest.c ../libpcap.a
139	$(CC) $(FULL_CFLAGS) -I. -L. -o selpolltest $(srcdir)/selpolltest.c \
140	    ../libpcap.a $(LIBS)
141
142threadsignaltest: $(srcdir)/threadsignaltest.c ../libpcap.a
143	$(CC) $(FULL_CFLAGS) -I. -L. -o threadsignaltest \
144	    $(srcdir)/threadsignaltest.c \
145	    ../libpcap.a $(LIBS) $(PTHREAD_LIBS)
146
147valgrindtest: $(srcdir)/valgrindtest.c ../libpcap.a
148	$(CC) $(FULL_CFLAGS) -I. -L. -o valgrindtest $(srcdir)/valgrindtest.c \
149	    ../libpcap.a $(LIBS)
150
151writecaptest: $(srcdir)/writecaptest.c ../libpcap.a
152	$(CC) $(FULL_CFLAGS) -I. -L. -o writecaptest $(srcdir)/writecaptest.c \
153	    ../libpcap.a $(LIBS)
154
155clean:
156	rm -f $(CLEANFILES)
157	rm -rf *.dSYM
158
159distclean: clean
160	rm -f Makefile config.cache config.log config.status \
161	    config.h stamp-h stamp-h.in
162	rm -rf autom4te.cache
163
164install:
165
166uninstall:
167
168tags: $(TAGFILES)
169	ctags -wtd $(TAGFILES)
170
171depend:
172	$(MKDEP) -c "$(CC)" -m "$(DEPENDENCY_CFLAG)" -s "$(srcdir)" $(CFLAGS) $(DEFS) $(INCLS) $(SRC)
173