# $Id: Makefile.openwrt,v 1.1.1.1 2012/02/21 23:16:02 misho Exp $ # http://miniupnp.free.fr/ # Author : Thomas Bernard # for use with GNU Make # This Makefile would probably need some modifications depending on # your openwrt SDK/etc... # http://miniupnp.tuxfamily.org/forum/viewtopic.php?p=713 #include $(TOPDIR)/rules.mk #CFLAGS = -Wall -O -D_GNU_SOURCE -g #CFLAGS = -Wall -Os -D_GNU_SOURCE #CC = mipsel-linux-gcc CC = $(TARGET_CC) CFLAGS = $(TARGET_CFLAGS) CFLAGS += -D_GNU_SOURCE CP = cp RM = rm -f INSTALL = install IPTABLESINC=$(STAGING_DIR)/usr/include #IPTABLESINC=$(BUILD_DIR)/iptables-1.3.3/include #IPTABLESINC=$(TOPDIR)/../iptables-1.3.3/include BASEOBJS = miniupnpd.o upnphttp.o upnpdescgen.o upnpsoap.o \ upnpreplyparse.o minixml.o \ upnpredirect.o getifaddr.o daemonize.o upnpglobalvars.o \ options.o upnppermissions.o minissdp.o natpmp.o LNXOBJS = linux/getifstats.o NETFILTEROBJS = netfilter/iptcrdr.o ALLOBJS = $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS) #LIBS = $(BUILD_DIR)/iptables-1.3.3/libiptc/libiptc.a #LIBS = $(TOPDIR)/../iptables-1.3.3/libiptc/libiptc.a TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o EXECUTABLES = miniupnpd testupnpdescgen .PHONY: all clean install depend all: $(EXECUTABLES) clean: $(RM) $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS) $(EXECUTABLES) \ testupnpdescgen.o install: miniupnpd @echo no install for now... miniupnpd: $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS) $(LIBS) testupnpdescgen: $(TESTUPNPDESCGENOBJS) netfilter/iptcrdr.o: netfilter/iptcrdr.c $(CC) $(CFLAGS) -I$(IPTABLESINC) -c -o $@ $< depend: config.h makedepend -f$(MAKEFILE_LIST) -Y \ $(ALLOBJS:.o=.c) $(TESTUPNPDESCGENOBJS:.o=.c) \ 2>/dev/null config.h: config.h.openwrt $(CP) $< $@ # DO NOT DELETE miniupnpd.o: config.h upnpglobalvars.h upnppermissions.h miniupnpdtypes.h miniupnpd.o: upnphttp.h upnpdescgen.h miniupnpdpath.h getifaddr.h daemonize.h miniupnpd.o: upnpsoap.h options.h minissdp.h upnpredirect.h natpmp.h upnphttp.o: upnphttp.h config.h upnpdescgen.h miniupnpdpath.h upnpsoap.h upnpdescgen.o: upnpdescgen.h miniupnpdpath.h upnpglobalvars.h upnpdescgen.o: upnppermissions.h config.h miniupnpdtypes.h upnpdescstrings.h upnpsoap.o: upnpglobalvars.h upnppermissions.h config.h miniupnpdtypes.h upnpsoap.o: upnphttp.h upnpsoap.h upnpreplyparse.h upnpredirect.h getifaddr.h upnpsoap.o: getifstats.h upnpreplyparse.o: upnpreplyparse.h minixml.h minixml.o: minixml.h upnpredirect.o: config.h upnpredirect.h upnpglobalvars.h upnppermissions.h upnpredirect.o: miniupnpdtypes.h netfilter/iptcrdr.h commonrdr.h getifaddr.o: getifaddr.h daemonize.o: daemonize.h upnpglobalvars.o: upnpglobalvars.h upnppermissions.h config.h upnpglobalvars.o: miniupnpdtypes.h options.o: options.h upnppermissions.h config.h upnpglobalvars.h options.o: miniupnpdtypes.h upnppermissions.o: config.h upnppermissions.h minissdp.o: config.h upnpdescstrings.h miniupnpdpath.h upnphttp.h minissdp.o: upnpglobalvars.h upnppermissions.h miniupnpdtypes.h minissdp.h natpmp.o: config.h natpmp.h upnpglobalvars.h upnppermissions.h natpmp.o: miniupnpdtypes.h getifaddr.h upnpredirect.h commonrdr.h linux/getifstats.o: getifstats.h config.h netfilter/iptcrdr.o: netfilter/iptcrdr.h commonrdr.h config.h testupnpdescgen.o: upnpdescgen.h upnpdescgen.o: upnpdescgen.h miniupnpdpath.h upnpglobalvars.h upnpdescgen.o: upnppermissions.h config.h miniupnpdtypes.h upnpdescstrings.h