2 # Revision 1.13 2003/08/06 18:20:51 cheshire
5 # Revision 1.12 2003/08/01 02:20:02 cheshire
6 # Add mDNSIdentify tool, used to discover what version of mDNSResponder a particular host is running
8 # Revision 1.11 2003/07/14 18:11:54 cheshire
9 # Fix stricter compiler warnings
11 # Revision 1.10 2003/06/18 05:47:41 cheshire
12 # Enable stricter warnings on Jaguar and Panther builds
14 # Revision 1.9 2003/06/04 18:34:45 ksekar
15 # Bug #: <rdar://problem/3218120>: mDNSPosix does not build on Panther that has socklen_t
16 # Changed build targets "osx10.2" and "osx10.3" to "jaguar" and "panther".
18 # Revision 1.8 2003/06/04 00:23:12 ksekar
19 # Bug #: <rdar://problem/3218120>: mDNSPosix does not build on Panther that has socklen_t
20 # Created separate target OS's for 10.2 and 10.3.
22 # Revision 1.7 2003/04/16 02:11:37 cheshire
23 # Remove unnecessary $(CFLAGS) from linking rules
25 # Revision 1.6 2003/04/04 01:37:14 cheshire
29 # I assume that cc will be in your path. If not, you have to change the following to point to it.
31 CFLAGS_COMMON = -g -I../mDNSCore -I. -DMDNS_DEBUGMSGS=2
34 CFLAGS_OS = -DNOT_HAVE_DAEMON -DNOT_HAVE_SA_LEN -D_XPG4_2 -D__EXTENSIONS__ -DHAVE_BROKEN_RECVIF_NAME -lsocket -lnsl
37 CFLAGS_OS = -DNOT_HAVE_SA_LEN -W -Wall
46 CFLAGS_OS = -DHAVE_BROKEN_RECVDSTADDR
49 CFLAGS_OS = -DHAVE_IPV6 -W -Wall -no-cpp-precomp -DNOT_HAVE_SOCKLEN_T
52 CFLAGS_OS = -DHAVE_IPV6 -W -Wall -no-cpp-precomp
55 @echo "Error: Must specify target OS on command-line, e.g. \"make os=panther\" or \"make os=jaguar\" or \"make os=linux\""
63 CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_OS)
65 COMMONOBJ = objects/mDNSPosix.c.o objects/mDNSUNP.c.o objects/ExampleClientApp.c.o
67 HEADERS = Makefile mDNSUNP.h mDNSPosix.h \
68 ../mDNSCore/mDNSDebug.h \
69 ../mDNSCore/mDNSClientAPI.h \
70 ../mDNSCore/mDNSPlatformFunctions.h
72 all: setup Client Responder ProxyResponder Identify NetMonitor
75 if test ! -d objects ; then mkdir objects ; fi
76 if test ! -d build ; then mkdir build ; fi
78 Client: setup build/mDNSClientPosix
81 Responder: setup build/mDNSResponderPosix
82 @echo "Responder done"
84 ProxyResponder: setup build/mDNSProxyResponderPosix
85 @echo "ProxyResponder done"
87 Identify: setup build/mDNSIdentify
90 NetMonitor: setup build/mDNSNetMonitor
91 @echo "NetMonitor done"
93 # $@ means "The file name of the target of the rule"
94 # $< means "The name of the first prerequisite"
95 # $+ means "The names of all the prerequisites, with spaces between them, exactly as given"
96 # For more magic automatic sariables, see
97 # <http://www.gnu.org/manual/make-3.80/html_chapter/make_10.html#SEC111>
98 build/mDNSClientPosix: $(COMMONOBJ) objects/mDNS.c.o objects/Client.c.o
101 build/mDNSResponderPosix: $(COMMONOBJ) objects/mDNS.c.o objects/Responder.c.o
104 build/mDNSProxyResponderPosix: $(COMMONOBJ) objects/mDNS.c.o objects/ProxyResponder.c.o
107 build/mDNSIdentify: $(COMMONOBJ) objects/Identify.c.o
110 build/mDNSNetMonitor: $(COMMONOBJ) objects/NetMonitor.c.o
113 objects/%.c.o: %.c ../mDNSCore/mDNS.c $(HEADERS)
114 $(CC) -c $(CFLAGS) $< -o $@
116 objects/mDNS.c.o: ../mDNSCore/mDNS.c $(HEADERS)
117 $(CC) -c $(CFLAGS) $< -o $@
120 -rm -rf objects build .gdb_history