version 1.1, 2012/02/21 23:16:02
|
version 1.1.1.3, 2013/07/22 00:32:35
|
Line 24 FWNAME = ipfw
|
Line 24 FWNAME = ipfw
|
STD_OBJS = miniupnpd.o upnphttp.o upnpdescgen.o upnpsoap.o \ |
STD_OBJS = miniupnpd.o upnphttp.o upnpdescgen.o upnpsoap.o \ |
upnpredirect.o getifaddr.o daemonize.o upnpglobalvars.o \ |
upnpredirect.o getifaddr.o daemonize.o upnpglobalvars.o \ |
options.o upnppermissions.o minissdp.o natpmp.o \ |
options.o upnppermissions.o minissdp.o natpmp.o \ |
upnpevents.o | upnpevents.o getconnstatus.o upnputils.o |
MAC_OBJS = mac/getifstats.o | MAC_OBJS = mac/getifstats.o bsd/ifacewatcher.o |
IPFW_OBJS = ipfw/ipfwrdr.o | IPFW_OBJS = ipfw/ipfwrdr.o ipfw/ipfwaux.o |
MISC_OBJS = upnpreplyparse.o minixml.o |
MISC_OBJS = upnpreplyparse.o minixml.o |
|
|
ALL_OBJS = $(STD_OBJS) $(MISC_OBJS) $(MAC_OBJS) $(IPFW_OBJS) |
ALL_OBJS = $(STD_OBJS) $(MISC_OBJS) $(MAC_OBJS) $(IPFW_OBJS) |
Line 47 LIBS =
|
Line 47 LIBS =
|
|
|
INSTALL_BINDIR = $(PREFIX)/sbin |
INSTALL_BINDIR = $(PREFIX)/sbin |
INSTALL_ETCDIR = $(PREFIX)/etc/miniupnpd |
INSTALL_ETCDIR = $(PREFIX)/etc/miniupnpd |
# INSTALL_MANDIR = $(PREFIX)/man | INSTALL_MANDIR = $(PREFIX)/share/man/man8 |
INSTALL_MANDIR = /usr/share/man/man1 | |
|
|
all: $(EXECUTABLES) |
all: $(EXECUTABLES) |
|
|
clean: |
clean: |
$(RM) $(ALL_OBJS) $(EXECUTABLES) \ |
$(RM) $(ALL_OBJS) $(EXECUTABLES) \ |
testupnpdescgen.o testgetifstats.o testupnppermissions.o \ |
testupnpdescgen.o testgetifstats.o testupnppermissions.o \ |
miniupnpdctl.o testgetifaddr.o config.h | miniupnpdctl.o testgetifaddr.o config.h \ |
| mac/org.tuxfamily.miniupnpd.plist |
|
|
install: miniupnpd genuuid | install: miniupnpd genuuid genlaunchd |
$(STRIP) miniupnpd |
$(STRIP) miniupnpd |
$(INSTALL) -d $(INSTALL_BINDIR) |
$(INSTALL) -d $(INSTALL_BINDIR) |
$(INSTALL) miniupnpd $(INSTALL_BINDIR) |
$(INSTALL) miniupnpd $(INSTALL_BINDIR) |
$(INSTALL) -d $(INSTALL_ETCDIR) |
$(INSTALL) -d $(INSTALL_ETCDIR) |
$(INSTALL) ipfw/ipfw_init.sh $(INSTALL_ETCDIR) | $(INSTALL) -m 0644 -b miniupnpd.conf $(INSTALL_ETCDIR) |
$(INSTALL) ipfw/ipfw_removeall.sh $(INSTALL_ETCDIR) | |
$(INSTALL) --mode=0644 -b miniupnpd.conf $(INSTALL_ETCDIR) | |
$(INSTALL) -d $(INSTALL_MANDIR) |
$(INSTALL) -d $(INSTALL_MANDIR) |
$(INSTALL) miniupnpd.1 $(INSTALL_MANDIR) | $(INSTALL) miniupnpd.8 $(INSTALL_MANDIR) |
# TODO Fix these paths and those within the plist | |
$(INSTALL) -d $(PREFIX)/Library/LaunchDaemons |
$(INSTALL) -d $(PREFIX)/Library/LaunchDaemons |
$(INSTALL) mac/org.tuxfamily.miniupnpd.plist $(PREFIX)/Library/LaunchDaemons |
$(INSTALL) mac/org.tuxfamily.miniupnpd.plist $(PREFIX)/Library/LaunchDaemons |
|
#$(INSTALL) ipfw/ipfw_init.sh $(INSTALL_ETCDIR) |
|
#$(INSTALL) ipfw/ipfw_removeall.sh $(INSTALL_ETCDIR) |
|
|
# genuuid is using the uuid cli tool available under MacOSX |
|
UUID != if which uuidgen 2>&1 > /dev/null; then \ |
|
echo `uuidgen` ; \ |
|
elif which uuid 2>&1 > /dev/null; then \ |
|
echo `uuid` ; \ |
|
else echo "00000000-0000-0000-0000-000000000000"; \ |
|
fi |
|
|
|
genuuid: |
genuuid: |
$(MV) miniupnpd.conf miniupnpd.conf.before |
$(MV) miniupnpd.conf miniupnpd.conf.before |
sed -e "s/^uuid=[-0-9a-f]*/uuid=$(UUID)/" miniupnpd.conf.before > miniupnpd.conf | sed -e "s/^uuid=[-0-9a-fA-F]*/uuid=`uuidgen 2>/dev/null`/" miniupnpd.conf.before > miniupnpd.conf |
$(RM) miniupnpd.conf.before |
$(RM) miniupnpd.conf.before |
|
|
|
genlaunchd: |
|
sed -e "s|INSTALLPREFIX|$(PREFIX)|g" mac/org.tuxfamily.miniupnpd.plist.before > mac/org.tuxfamily.miniupnpd.plist |
|
|
depend: config.h |
depend: config.h |
mkdep $(ALL_OBJS:.o=.c) testupnpdescgen.c testgetifstats.c \ |
mkdep $(ALL_OBJS:.o=.c) testupnpdescgen.c testgetifstats.c \ |