xref: /aosp_15_r20/external/libpcap/testprogs/Makefile.in (revision 8b26181f966a6af5cf6981a6f474313de533bb28)
1*8b26181fSAndroid Build Coastguard Worker#  Copyright (c) 1993, 1994, 1995, 1996
2*8b26181fSAndroid Build Coastguard Worker#	The Regents of the University of California.  All rights reserved.
3*8b26181fSAndroid Build Coastguard Worker#
4*8b26181fSAndroid Build Coastguard Worker#  Redistribution and use in source and binary forms, with or without
5*8b26181fSAndroid Build Coastguard Worker#  modification, are permitted provided that: (1) source code distributions
6*8b26181fSAndroid Build Coastguard Worker#  retain the above copyright notice and this paragraph in its entirety, (2)
7*8b26181fSAndroid Build Coastguard Worker#  distributions including binary code include the above copyright notice and
8*8b26181fSAndroid Build Coastguard Worker#  this paragraph in its entirety in the documentation or other materials
9*8b26181fSAndroid Build Coastguard Worker#  provided with the distribution, and (3) all advertising materials mentioning
10*8b26181fSAndroid Build Coastguard Worker#  features or use of this software display the following acknowledgement:
11*8b26181fSAndroid Build Coastguard Worker#  ``This product includes software developed by the University of California,
12*8b26181fSAndroid Build Coastguard Worker#  Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
13*8b26181fSAndroid Build Coastguard Worker#  the University nor the names of its contributors may be used to endorse
14*8b26181fSAndroid Build Coastguard Worker#  or promote products derived from this software without specific prior
15*8b26181fSAndroid Build Coastguard Worker#  written permission.
16*8b26181fSAndroid Build Coastguard Worker#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
17*8b26181fSAndroid Build Coastguard Worker#  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
18*8b26181fSAndroid Build Coastguard Worker#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19*8b26181fSAndroid Build Coastguard Worker
20*8b26181fSAndroid Build Coastguard Worker#
21*8b26181fSAndroid Build Coastguard Worker# Various configurable paths (remember to edit Makefile.in, not Makefile)
22*8b26181fSAndroid Build Coastguard Worker#
23*8b26181fSAndroid Build Coastguard Worker
24*8b26181fSAndroid Build Coastguard Worker# Top level hierarchy
25*8b26181fSAndroid Build Coastguard Workerprefix = @prefix@
26*8b26181fSAndroid Build Coastguard Workerexec_prefix = @exec_prefix@
27*8b26181fSAndroid Build Coastguard Workerdatarootdir = @datarootdir@
28*8b26181fSAndroid Build Coastguard Worker# Pathname of directory to install the configure program
29*8b26181fSAndroid Build Coastguard Workerbindir = @bindir@
30*8b26181fSAndroid Build Coastguard Worker# Pathname of directory to install the rpcapd daemon
31*8b26181fSAndroid Build Coastguard Workersbindir = @sbindir@
32*8b26181fSAndroid Build Coastguard Worker# Pathname of directory to install the include files
33*8b26181fSAndroid Build Coastguard Workerincludedir = @includedir@
34*8b26181fSAndroid Build Coastguard Worker# Pathname of directory to install the library
35*8b26181fSAndroid Build Coastguard Workerlibdir =  @libdir@
36*8b26181fSAndroid Build Coastguard Worker# Pathname of directory to install the man pages
37*8b26181fSAndroid Build Coastguard Workermandir = @mandir@
38*8b26181fSAndroid Build Coastguard Worker
39*8b26181fSAndroid Build Coastguard Worker# VPATH
40*8b26181fSAndroid Build Coastguard Workersrcdir = @srcdir@
41*8b26181fSAndroid Build Coastguard Workertop_srcdir = @top_srcdir@
42*8b26181fSAndroid Build Coastguard WorkerVPATH = @srcdir@
43*8b26181fSAndroid Build Coastguard Worker
44*8b26181fSAndroid Build Coastguard Worker#
45*8b26181fSAndroid Build Coastguard Worker# You shouldn't need to edit anything below.
46*8b26181fSAndroid Build Coastguard Worker#
47*8b26181fSAndroid Build Coastguard Worker
48*8b26181fSAndroid Build Coastguard WorkerLD = /usr/bin/ld
49*8b26181fSAndroid Build Coastguard WorkerCC = @CC@
50*8b26181fSAndroid Build Coastguard WorkerAR = @AR@
51*8b26181fSAndroid Build Coastguard WorkerLN_S = @LN_S@
52*8b26181fSAndroid Build Coastguard WorkerMKDEP = @MKDEP@
53*8b26181fSAndroid Build Coastguard WorkerCCOPT = @V_CCOPT@
54*8b26181fSAndroid Build Coastguard WorkerINCLS = -I. -I.. -I@srcdir@ -I@srcdir@/.. @V_INCLS@
55*8b26181fSAndroid Build Coastguard WorkerDEFS = @DEFS@ @V_DEFS@
56*8b26181fSAndroid Build Coastguard WorkerADDLOBJS = @ADDLOBJS@
57*8b26181fSAndroid Build Coastguard WorkerADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@
58*8b26181fSAndroid Build Coastguard WorkerLIBS = @LIBS@
59*8b26181fSAndroid Build Coastguard WorkerPTHREAD_LIBS = @PTHREAD_LIBS@
60*8b26181fSAndroid Build Coastguard WorkerCROSSFLAGS=
61*8b26181fSAndroid Build Coastguard WorkerCFLAGS = @CFLAGS@   ${CROSSFLAGS}
62*8b26181fSAndroid Build Coastguard WorkerLDFLAGS = @LDFLAGS@ ${CROSSFLAGS}
63*8b26181fSAndroid Build Coastguard WorkerDYEXT = @DYEXT@
64*8b26181fSAndroid Build Coastguard WorkerV_RPATH_OPT = @V_RPATH_OPT@
65*8b26181fSAndroid Build Coastguard WorkerDEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
66*8b26181fSAndroid Build Coastguard Worker
67*8b26181fSAndroid Build Coastguard Worker# Standard CFLAGS for building test programs
68*8b26181fSAndroid Build Coastguard WorkerFULL_CFLAGS = $(CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
69*8b26181fSAndroid Build Coastguard Worker
70*8b26181fSAndroid Build Coastguard WorkerINSTALL = @INSTALL@
71*8b26181fSAndroid Build Coastguard WorkerINSTALL_PROGRAM = @INSTALL_PROGRAM@
72*8b26181fSAndroid Build Coastguard WorkerINSTALL_DATA = @INSTALL_DATA@
73*8b26181fSAndroid Build Coastguard Worker
74*8b26181fSAndroid Build Coastguard Worker# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
75*8b26181fSAndroid Build Coastguard Worker# Also, gcc does not remove the .o before forking 'as', which can be a
76*8b26181fSAndroid Build Coastguard Worker# problem if you don't own the file but can write to the directory.
77*8b26181fSAndroid Build Coastguard Worker.c.o:
78*8b26181fSAndroid Build Coastguard Worker	@rm -f $@
79*8b26181fSAndroid Build Coastguard Worker	$(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
80*8b26181fSAndroid Build Coastguard Worker
81*8b26181fSAndroid Build Coastguard WorkerSRC = @VALGRINDTEST_SRC@ \
82*8b26181fSAndroid Build Coastguard Worker	can_set_rfmon_test.c \
83*8b26181fSAndroid Build Coastguard Worker	capturetest.c \
84*8b26181fSAndroid Build Coastguard Worker	filtertest.c \
85*8b26181fSAndroid Build Coastguard Worker	findalldevstest-perf.c \
86*8b26181fSAndroid Build Coastguard Worker	findalldevstest.c \
87*8b26181fSAndroid Build Coastguard Worker	opentest.c \
88*8b26181fSAndroid Build Coastguard Worker	nonblocktest.c \
89*8b26181fSAndroid Build Coastguard Worker	reactivatetest.c \
90*8b26181fSAndroid Build Coastguard Worker	selpolltest.c \
91*8b26181fSAndroid Build Coastguard Worker	threadsignaltest.c \
92*8b26181fSAndroid Build Coastguard Worker	writecaptest.c
93*8b26181fSAndroid Build Coastguard Worker
94*8b26181fSAndroid Build Coastguard WorkerTESTS = $(SRC:.c=)
95*8b26181fSAndroid Build Coastguard Worker
96*8b26181fSAndroid Build Coastguard WorkerTAGFILES = \
97*8b26181fSAndroid Build Coastguard Worker	$(SRC) $(HDR)
98*8b26181fSAndroid Build Coastguard Worker
99*8b26181fSAndroid Build Coastguard WorkerCLEANFILES = $(OBJ) $(TESTS)
100*8b26181fSAndroid Build Coastguard Worker
101*8b26181fSAndroid Build Coastguard Workerall: $(TESTS)
102*8b26181fSAndroid Build Coastguard Worker
103*8b26181fSAndroid Build Coastguard Workercapturetest: $(srcdir)/capturetest.c ../libpcap.a
104*8b26181fSAndroid Build Coastguard Worker	$(CC) $(FULL_CFLAGS) -I. -L. -o capturetest $(srcdir)/capturetest.c \
105*8b26181fSAndroid Build Coastguard Worker	    ../libpcap.a $(LIBS)
106*8b26181fSAndroid Build Coastguard Worker
107*8b26181fSAndroid Build Coastguard Workercan_set_rfmon_test: $(srcdir)/can_set_rfmon_test.c ../libpcap.a
108*8b26181fSAndroid Build Coastguard Worker	$(CC) $(FULL_CFLAGS) -I. -L. -o can_set_rfmon_test \
109*8b26181fSAndroid Build Coastguard Worker	    $(srcdir)/can_set_rfmon_test.c \
110*8b26181fSAndroid Build Coastguard Worker	    ../libpcap.a $(LIBS)
111*8b26181fSAndroid Build Coastguard Worker
112*8b26181fSAndroid Build Coastguard Workerfiltertest: $(srcdir)/filtertest.c ../libpcap.a
113*8b26181fSAndroid Build Coastguard Worker	$(CC) $(FULL_CFLAGS) -I. -L. -o filtertest $(srcdir)/filtertest.c \
114*8b26181fSAndroid Build Coastguard Worker	    ../libpcap.a $(LIBS)
115*8b26181fSAndroid Build Coastguard Worker
116*8b26181fSAndroid Build Coastguard Workerfindalldevstest: $(srcdir)/findalldevstest.c ../libpcap.a
117*8b26181fSAndroid Build Coastguard Worker	$(CC) $(FULL_CFLAGS) -I. -L. -o findalldevstest \
118*8b26181fSAndroid Build Coastguard Worker	    $(srcdir)/findalldevstest.c \
119*8b26181fSAndroid Build Coastguard Worker	    ../libpcap.a $(LIBS)
120*8b26181fSAndroid Build Coastguard Worker
121*8b26181fSAndroid Build Coastguard Workerfindalldevstest-perf: $(srcdir)/findalldevstest-perf.c ../libpcap.a
122*8b26181fSAndroid Build Coastguard Worker	$(CC) $(FULL_CFLAGS) -I. -L. -o findalldevstest-perf \
123*8b26181fSAndroid Build Coastguard Worker	    $(srcdir)/findalldevstest-perf.c \
124*8b26181fSAndroid Build Coastguard Worker	    ../libpcap.a $(LIBS)
125*8b26181fSAndroid Build Coastguard Worker
126*8b26181fSAndroid Build Coastguard Workeropentest: $(srcdir)/opentest.c ../libpcap.a
127*8b26181fSAndroid Build Coastguard Worker	$(CC) $(FULL_CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c \
128*8b26181fSAndroid Build Coastguard Worker	    ../libpcap.a $(LIBS)
129*8b26181fSAndroid Build Coastguard Worker
130*8b26181fSAndroid Build Coastguard Workernonblocktest: $(srcdir)/nonblocktest.c ../libpcap.a
131*8b26181fSAndroid Build Coastguard Worker	$(CC) $(FULL_CFLAGS) -I. -L. -o nonblocktest $(srcdir)/nonblocktest.c \
132*8b26181fSAndroid Build Coastguard Worker	    ../libpcap.a $(LIBS)
133*8b26181fSAndroid Build Coastguard Worker
134*8b26181fSAndroid Build Coastguard Workerreactivatetest: $(srcdir)/reactivatetest.c ../libpcap.a
135*8b26181fSAndroid Build Coastguard Worker	$(CC) $(FULL_CFLAGS) -I. -L. -o reactivatetest \
136*8b26181fSAndroid Build Coastguard Worker	    $(srcdir)/reactivatetest.c ../libpcap.a $(LIBS)
137*8b26181fSAndroid Build Coastguard Worker
138*8b26181fSAndroid Build Coastguard Workerselpolltest: $(srcdir)/selpolltest.c ../libpcap.a
139*8b26181fSAndroid Build Coastguard Worker	$(CC) $(FULL_CFLAGS) -I. -L. -o selpolltest $(srcdir)/selpolltest.c \
140*8b26181fSAndroid Build Coastguard Worker	    ../libpcap.a $(LIBS)
141*8b26181fSAndroid Build Coastguard Worker
142*8b26181fSAndroid Build Coastguard Workerthreadsignaltest: $(srcdir)/threadsignaltest.c ../libpcap.a
143*8b26181fSAndroid Build Coastguard Worker	$(CC) $(FULL_CFLAGS) -I. -L. -o threadsignaltest \
144*8b26181fSAndroid Build Coastguard Worker	    $(srcdir)/threadsignaltest.c \
145*8b26181fSAndroid Build Coastguard Worker	    ../libpcap.a $(LIBS) $(PTHREAD_LIBS)
146*8b26181fSAndroid Build Coastguard Worker
147*8b26181fSAndroid Build Coastguard Workervalgrindtest: $(srcdir)/valgrindtest.c ../libpcap.a
148*8b26181fSAndroid Build Coastguard Worker	$(CC) $(FULL_CFLAGS) -I. -L. -o valgrindtest $(srcdir)/valgrindtest.c \
149*8b26181fSAndroid Build Coastguard Worker	    ../libpcap.a $(LIBS)
150*8b26181fSAndroid Build Coastguard Worker
151*8b26181fSAndroid Build Coastguard Workerwritecaptest: $(srcdir)/writecaptest.c ../libpcap.a
152*8b26181fSAndroid Build Coastguard Worker	$(CC) $(FULL_CFLAGS) -I. -L. -o writecaptest $(srcdir)/writecaptest.c \
153*8b26181fSAndroid Build Coastguard Worker	    ../libpcap.a $(LIBS)
154*8b26181fSAndroid Build Coastguard Worker
155*8b26181fSAndroid Build Coastguard Workerclean:
156*8b26181fSAndroid Build Coastguard Worker	rm -f $(CLEANFILES)
157*8b26181fSAndroid Build Coastguard Worker	rm -rf *.dSYM
158*8b26181fSAndroid Build Coastguard Worker
159*8b26181fSAndroid Build Coastguard Workerdistclean: clean
160*8b26181fSAndroid Build Coastguard Worker	rm -f Makefile config.cache config.log config.status \
161*8b26181fSAndroid Build Coastguard Worker	    config.h stamp-h stamp-h.in
162*8b26181fSAndroid Build Coastguard Worker	rm -rf autom4te.cache
163*8b26181fSAndroid Build Coastguard Worker
164*8b26181fSAndroid Build Coastguard Workerinstall:
165*8b26181fSAndroid Build Coastguard Worker
166*8b26181fSAndroid Build Coastguard Workeruninstall:
167*8b26181fSAndroid Build Coastguard Worker
168*8b26181fSAndroid Build Coastguard Workertags: $(TAGFILES)
169*8b26181fSAndroid Build Coastguard Worker	ctags -wtd $(TAGFILES)
170*8b26181fSAndroid Build Coastguard Worker
171*8b26181fSAndroid Build Coastguard Workerdepend:
172*8b26181fSAndroid Build Coastguard Worker	$(MKDEP) -c "$(CC)" -m "$(DEPENDENCY_CFLAG)" -s "$(srcdir)" $(CFLAGS) $(DEFS) $(INCLS) $(SRC)
173