diff -Naur mDNSResponder-108.6/Clients/Makefile mDNSResponder-108.6-magellan/Clients/Makefile --- mDNSResponder-108.6/Clients/Makefile 2004-09-24 23:15:26.000000000 +0200 +++ mDNSResponder-108.6-magellan/Clients/Makefile 2008-02-14 18:34:45.000000000 +0100 @@ -49,11 +49,16 @@ ############################################################################# -# If library /usr/lib/libdns_sd.* exists, then link it +ifneq "$(wildcard ../mDNSPosix/build/prod/libdns_sd.*)" "" + LIBS ?= -L../mDNSPosix/build/prod/ -ldns_sd +endif + +ifneq "$(wildcard ../mDNSPosix/build/debug/libdns_sd.*)" "" + LIBS ?= -L../mDNSPosix/build/debug/ -ldns_sd +endif + ifneq "$(wildcard /usr/lib/libdns_sd.*)" "" -LIBS = -ldns_sd -else -LIBS = + LIBS ?= -ldns_sd endif targets: build/dns-sd @@ -65,4 +70,4 @@ mkdir build build/dns-sd: build dns-sd.c - cc $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -o $@ + $(CC) $(CFLAGS_OPT) $(LDFLAGS) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -o $@ diff -Naur mDNSResponder-108.6/mDNSPosix/Makefile mDNSResponder-108.6-magellan/mDNSPosix/Makefile --- mDNSResponder-108.6/mDNSPosix/Makefile 2005-10-26 01:55:47.000000000 +0200 +++ mDNSResponder-108.6-magellan/mDNSPosix/Makefile 2008-02-14 18:51:53.000000000 +0100 @@ -395,13 +395,13 @@ endif endif -CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_OS) $(CFLAGS_DEBUG) +CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_OS) $(CFLAGS_DEBUG) $(OPT_CFLAGS) ############################################################################# all: setup Daemon libdns_sd Client Responder ProxyResponder Identify NetMonitor dnsextd $(OPTIONALTARG) -install: setup InstalledDaemon InstalledLib InstalledStartup InstalledManPages $(OPTINSTALL) +install: setup InstalledDaemon InstalledLib InstalledManPages $(OPTINSTALL) # 'setup' sets up the build directory structure the way we want setup: @@ -450,36 +450,32 @@ ############################################################################# # The Install targets place built stuff in their proper places -InstalledDaemon: $(INSTBASE)/sbin/mdnsd +InstalledDaemon: $(DESTDIR)$(INSTBASE)/sbin/mdnsd @echo $+ " installed" -InstalledLib: $(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS) $(INSTBASE)/include/dns_sd.h +InstalledLib: $(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS) $(DESTDIR)$(INSTBASE)/include/dns_sd.h @echo $+ " installed" -InstalledStartup: $(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME) +InstalledStartup: $(DESTDIR)$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME) @echo $+ " installed" -InstalledNSS: $(NSSINSTPATH)/$(NSSLINKNAME) /etc/nss_mdns.conf $(MANPATH)/man5/nss_mdns.conf.5 $(MANPATH)/man8/libnss_mdns.8 +InstalledNSS: $(DESTDIR)$(NSSINSTPATH)/$(NSSLINKNAME) $(DESTDIR)/etc/nss_mdns.conf $(DESTDIR)$(MANPATH)/man5/nss_mdns.conf.5 $(DESTDIR)$(MANPATH)/man8/libnss_mdns.8 @echo $+ " installed" -InstalledManPages: $(MANPATH)/man8/mdnsd.8 +InstalledManPages: $(DESTDIR)$(MANPATH)/man8/mdnsd.8 @echo $+ " installed" -$(INSTBASE)/sbin/mdnsd: $(BUILDDIR)/mdnsd +$(DESTDIR)$(INSTBASE)/sbin/mdnsd: $(BUILDDIR)/mdnsd $(CP) $< $@ -$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS): $(BUILDDIR)/libdns_sd.$(LDSUFFIX) +$(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS): $(BUILDDIR)/libdns_sd.$(LDSUFFIX) $(CP) $< $@ - $(LN) $@ $(INSTBASE)/lib/libdns_sd.$(LDSUFFIX) -ifdef LDCONFIG - # -m means 'merge into existing database', -R means 'rescan directories' - $(LDCONFIG) -mR -endif + $(LN) libdns_sd.$(LDSUFFIX).$(LIBVERS) $(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX) -$(INSTBASE)/include/dns_sd.h: $(SHAREDDIR)/dns_sd.h +$(DESTDIR)$(INSTBASE)/include/dns_sd.h: $(SHAREDDIR)/dns_sd.h $(CP) $< $@ -$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME): mdnsd.sh $(STARTUPSCRIPTDIR) +$(DESTDIR)$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME): mdnsd.sh $(STARTUPSCRIPTDIR) $(CP) $< $@ chmod ugo+x $@ ifdef RUNLEVELSCRIPTSDIR @@ -495,31 +491,26 @@ endif endif -$(NSSINSTPATH)/$(NSSLINKNAME): $(NSSINSTPATH)/$(NSSLIBFILE) - $(LN) $< $@ - ldconfig +$(DESTDIR)$(NSSINSTPATH)/$(NSSLINKNAME): $(DESTDIR)$(NSSINSTPATH)/$(NSSLIBFILE) + $(LN) $(NSSLIBFILE) $@ -$(NSSINSTPATH)/$(NSSLIBFILE): $(BUILDDIR)/$(NSSLIBFILE) +$(DESTDIR)$(NSSINSTPATH)/$(NSSLIBFILE): $(BUILDDIR)/$(NSSLIBFILE) $(CP) $< $@ chmod 444 $@ -/etc/nss_mdns.conf: nss_mdns.conf +$(DESTDIR)/etc/nss_mdns.conf: nss_mdns.conf $(CP) $< $@ chmod 444 $@ - # Check the nsswitch.conf file. - # If 'mdns' does not already appear on the "hosts:" line, then add it right before 'dns' - cp -f /etc/nsswitch.conf /etc/nsswitch.conf.pre-mdns - sed -e '/mdns/!s/^\(hosts:.*\)dns\(.*\)/\1mdns dns\2/' /etc/nsswitch.conf.pre-mdns > /etc/nsswitch.conf -$(MANPATH)/man5/%.5: %.5 +$(DESTDIR)$(MANPATH)/man5/%.5: %.5 cp $< $@ chmod 444 $@ -$(MANPATH)/man8/%.8: %.8 +$(DESTDIR)$(MANPATH)/man8/%.8: %.8 cp $< $@ chmod 444 $@ -$(MANPATH)/man8/mdnsd.8: $(SHAREDDIR)/mDNSResponder.8 +$(DESTDIR)$(MANPATH)/man8/mdnsd.8: $(SHAREDDIR)/mDNSResponder.8 cp $< $@ chmod 444 $@