|
@@ -1,6 +1,6 @@
|
1
|
1
|
--- a/Clients/Makefile
|
2
|
2
|
+++ b/Clients/Makefile
|
3
|
|
-@@ -23,6 +23,8 @@
|
|
3
|
+@@ -27,6 +27,8 @@
|
4
|
4
|
|
5
|
5
|
#############################################################################
|
6
|
6
|
|
|
@@ -9,22 +9,22 @@
|
9
|
9
|
# On OS X the dns_sd library functions are included in libSystem, which is implicitly linked with every executable
|
10
|
10
|
# If /usr/lib/libSystem.dylib exists, then we're on OS X, so we don't need also to link the "dns_sd" shared library
|
11
|
11
|
ifneq "$(wildcard /usr/lib/libSystem.dylib)" ""
|
12
|
|
-@@ -42,10 +44,10 @@ build:
|
|
12
|
+@@ -46,10 +48,10 @@ build:
|
13
|
13
|
mkdir build
|
14
|
14
|
|
15
|
15
|
build/dns-sd: build dns-sd.c ClientCommon.c
|
16
|
|
-- cc $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@
|
|
16
|
+- $(CC) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@
|
17
|
17
|
+ $(CC) $(CFLAGS) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@
|
18
|
18
|
|
19
|
19
|
build/dns-sd64: build dns-sd.c ClientCommon.c
|
20
|
|
-- cc $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64
|
|
20
|
+- $(CC) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64
|
21
|
21
|
+ $(CC) $(CFLAGS) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64
|
22
|
22
|
|
23
|
23
|
# Note, we can make a 'fat' version of dns-sd using 'lipo', as shown below, but we
|
24
|
24
|
# don't, because we don't want or need a 'fat' version of dns-sd, because it will
|
25
|
25
|
--- a/mDNSPosix/Makefile
|
26
|
26
|
+++ b/mDNSPosix/Makefile
|
27
|
|
-@@ -54,10 +54,11 @@ COREDIR = ../mDNSCore
|
|
27
|
+@@ -54,11 +54,12 @@ COREDIR = ../mDNSCore
|
28
|
28
|
SHAREDDIR ?= ../mDNSShared
|
29
|
29
|
JDK = /usr/jdk
|
30
|
30
|
|
|
@@ -32,22 +32,14 @@
|
32
|
32
|
+CC = @gcc
|
33
|
33
|
BISON = @bison
|
34
|
34
|
FLEX = @flex
|
|
35
|
+ ST = @strip
|
35
|
36
|
-LD = ld -shared
|
36
|
37
|
+LD = @ld
|
37
|
38
|
+SOOPTS = -shared
|
38
|
39
|
CP = cp
|
39
|
40
|
RM = rm
|
40
|
41
|
LN = ln -s -f
|
41
|
|
-@@ -82,7 +83,7 @@ else
|
42
|
|
- CFLAGS_DEBUG = -Os -DMDNS_DEBUGMSGS=0
|
43
|
|
- OBJDIR ?= objects/prod
|
44
|
|
- BUILDDIR ?= build/prod
|
45
|
|
--STRIP = strip -S
|
46
|
|
-+STRIP = @strip -S
|
47
|
|
- endif
|
48
|
|
-
|
49
|
|
- # Configure per-OS peculiarities
|
50
|
|
-@@ -91,7 +92,7 @@ CFLAGS_DEBUG = -O0 -DMDNS_DEBUGMSGS=0
|
|
42
|
+@@ -92,7 +93,7 @@ CFLAGS_DEBUG = -O0 -DMDNS_DEBUGMSGS=0
|
51
|
43
|
CFLAGS_OS = -DNOT_HAVE_DAEMON -DNOT_HAVE_SA_LEN -DNOT_HAVE_SOCKLEN_T -DNOT_HAVE_IF_NAMETOINDEX \
|
52
|
44
|
-DLOG_PERROR=0 -D_XPG4_2 -D__EXTENSIONS__ -DHAVE_BROKEN_RECVIF_NAME -DTARGET_OS_SOLARIS
|
53
|
45
|
CC = gcc
|
|
@@ -56,7 +48,7 @@
|
56
|
48
|
LINKOPTS = -lsocket -lnsl -lresolv
|
57
|
49
|
JAVACFLAGS_OS += -I$(JDK)/include/solaris
|
58
|
50
|
ifneq ($(DEBUG),1)
|
59
|
|
-@@ -147,7 +148,8 @@ CFLAGS_OS = -DHAVE_IPV6 -no-cpp-precomp
|
|
51
|
+@@ -148,7 +149,8 @@ CFLAGS_OS = -DHAVE_IPV6 -no-cpp-precomp
|
60
|
52
|
-D__MAC_OS_X_VERSION_MIN_REQUIRED=__MAC_OS_X_VERSION_10_4 \
|
61
|
53
|
-D__APPLE_USE_RFC_2292 #-Wunreachable-code
|
62
|
54
|
CC = gcc
|
|
@@ -66,7 +58,7 @@
|
66
|
58
|
LINKOPTS = -lSystem
|
67
|
59
|
LDSUFFIX = dylib
|
68
|
60
|
JDK = /System/Library/Frameworks/JavaVM.framework/Home
|
69
|
|
-@@ -169,8 +171,9 @@ NSSLIBFILE := $(NSSLIBNAME)-$(NSSVERSIO
|
|
61
|
+@@ -170,8 +172,9 @@ NSSLIBFILE := $(NSSLIBNAME)-$(NSSVERSIO
|
70
|
62
|
NSSLINKNAME := $(NSSLIBNAME).so.2
|
71
|
63
|
NSSINSTPATH := /lib
|
72
|
64
|
|
|
@@ -77,7 +69,7 @@
|
77
|
69
|
INSTBASE?=/usr
|
78
|
70
|
STARTUPSCRIPTNAME?=mdns
|
79
|
71
|
|
80
|
|
-@@ -256,7 +259,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$
|
|
72
|
+@@ -257,7 +260,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$
|
81
|
73
|
CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o
|
82
|
74
|
|
83
|
75
|
$(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS)
|
|
@@ -86,7 +78,7 @@
|
86
|
78
|
@$(STRIP) $@
|
87
|
79
|
|
88
|
80
|
Clients: setup libdns_sd ../Clients/build/dns-sd
|
89
|
|
-@@ -291,7 +294,7 @@ InstalledManPages: $(MANPATH)/man8/mdnsd
|
|
81
|
+@@ -292,7 +295,7 @@ InstalledManPages: $(MANPATH)/man8/mdnsd
|
90
|
82
|
InstalledClients: $(INSTBASE)/bin/dns-sd
|
91
|
83
|
@echo $+ " installed"
|
92
|
84
|
|
|
@@ -95,7 +87,7 @@
|
95
|
87
|
@echo $+ " installed"
|
96
|
88
|
|
97
|
89
|
# Note: If daemon already installed, we make sure it's stopped before overwriting it
|
98
|
|
-@@ -346,19 +349,21 @@ $(INSTBASE)/bin/dns-sd: ../Clients/build
|
|
90
|
+@@ -347,19 +350,21 @@ $(INSTBASE)/bin/dns-sd: ../Clients/build
|
99
|
91
|
|
100
|
92
|
$(NSSINSTPATH)/$(NSSLINKNAME): $(NSSINSTPATH)/$(NSSLIBFILE)
|
101
|
93
|
$(LN) $< $@
|