miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Build instructoins for OpenWrt / X-Wrt

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Compilation/Installation
View previous topic :: View next topic  
Author Message
jone



Joined: 28 Jan 2008
Posts: 3

PostPosted: Mon Jan 28, 2008 3:17 pm    Post subject: Build instructoins for OpenWrt / X-Wrt Reply with quote

I've been trying to build version 1.0 for OpenWrt (using the instructions in the README.openwrt file).

I've not been able to get it to build yet (the openwrt makefile is somewhat out of date), is there a known good configuration for this?

Thanks in advance,
Jon.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Mon Jan 28, 2008 5:54 pm    Post subject: Reply with quote

you should have a look at this :
https://svn.openwrt.org/openwrt/packages/net/miniupnpd/Makefile
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
jone



Joined: 28 Jan 2008
Posts: 3

PostPosted: Mon Jan 28, 2008 6:06 pm    Post subject: Reply with quote

Thanks, I found that and the patches from svn, but haven't been able to get it compiling under either buildroot or the SDK yet.. It's been years since I compiled anything for OpenWrt so probably just missing something simple.. Will keep trying Wink
Back to top
View user's profile Send private message
jone



Joined: 28 Jan 2008
Posts: 3

PostPosted: Tue Jan 29, 2008 8:24 am    Post subject: Reply with quote

I fell short of creating an ipkg, but managed to get the executable compiled & it's working fine on my OpenWrt (WhiteRussian 0.9) box. NAT-PMP is working perfectly - thanks!

For reference, these are the changes I made to Makefile.openwrt

Code:

--- /tmp/Makefile.openwrt   2007-10-06 13:49:53.000000000 +0100
+++ Makefile.openwrt   2008-01-29 08:15:14.000000000 +0000
@@ -2,27 +2,28 @@
 # http://miniupnp.free.fr/
 # Author : Thomas Bernard
 # for use with GNU Make
-include $(TOPDIR)/rules.mk
+#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
+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=$(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
+      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
 
@@ -33,17 +34,19 @@
 all:   $(EXECUTABLES)
 
 clean:
-   $(RM) $(BASEOBJS) $(LNXOBJS) $(EXECUTABLES) \
+   $(RM) $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS) $(EXECUTABLES) \
    testupnpdescgen.o
 
 install:   miniupnpd
    @echo no install for now...
 
-miniupnpd:   $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS) $(LIBS)
+miniupnpd:   $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS)
+   $(CC) $(CFLAGS) -o $@ $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS) $(LIBS)
+   mipsel-linux-strip miniupnpd
 
 testupnpdescgen:   $(TESTUPNPDESCGENOBJS)
 
-linux/iptcrdr.o: linux/iptcrdr.c
+netfilter/iptcrdr.o: netfilter/iptcrdr.c
    $(CC) $(CFLAGS) -I$(IPTABLESINC) -c -o $@ $<
 
 depend:   config.h
@@ -58,7 +61,7 @@
 
 miniupnpd.o: config.h upnpglobalvars.h upnppermissions.h upnphttp.h
 miniupnpd.o: upnpdescgen.h miniupnpdpath.h getifaddr.h daemonize.h upnpsoap.h
-miniupnpd.o: options.h minissdp.h
+miniupnpd.o: options.h minissdp.h miniupnpdtypes.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 upnpdescstrings.h
@@ -66,16 +69,20 @@
 upnpsoap.o: upnpreplyparse.h upnpredirect.h getifaddr.h getifstats.h
 upnpreplyparse.o: upnpreplyparse.h minixml.h
 minixml.o: minixml.h
-upnpredirect.o: upnpredirect.h upnpglobalvars.h upnppermissions.h config.h
-upnpredirect.o: openbsd/obsdrdr.h
+upnpredirect.o: config.h upnpredirect.h upnpglobalvars.h upnppermissions.h
+upnpredirect.o: netfilter/iptcrdr.h commonrdr.h
 getifaddr.o: getifaddr.h
 daemonize.o: daemonize.h
 upnpglobalvars.o: upnpglobalvars.h upnppermissions.h config.h
 options.o: options.h upnppermissions.h config.h upnpglobalvars.h
 upnppermissions.o: config.h upnppermissions.h
 minissdp.o: config.h upnpdescstrings.h miniupnpdpath.h upnphttp.h
-minissdp.o: upnpglobalvars.h upnppermissions.h minissdp.h
-linux/getifstats.o: getifstats.h
+minissdp.o: upnpglobalvars.h upnppermissions.h minissdp.h miniupnpdtypes.h
+natpmp.o: config.h natpmp.h upnpglobalvars.h upnppermissions.h getifaddr.h
+natpmp.o: 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 upnpdescstrings.h
+testgetifstats.o: getifstats.h
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Tue Jan 29, 2008 12:45 pm    Post subject: Reply with quote

thanks !
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Compilation/Installation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.