#
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=mgen
PKG_VERSION:=5.01b
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=src-$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://downloads.pf.itd.nrl.navy.mil/mgen/
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/unix \
+ $(TARGET_CONFIGURE_OPTS) \
CC="$(TARGET_CXX)" \
- CPPFLAGS="$(TARGET_CPPFLAGS)" \
- LDFLAGS="$(TARGET_LDFLAGS)" \
+ SYSTEM_INCLUDES="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
+ SYSTEM_LDFLAGS="$(TARGET_LDFLAGS)" \
SYSTEM_LIBS="-ldl -lpthread" \
-f Makefile.linux mgen
endef
-diff -urN mgen.old/protolib/unix/Makefile.linux mgen/protolib/unix/Makefile.linux
---- mgen.old/protolib/unix/Makefile.linux 2008-03-07 22:23:06.000000000 +0100
-+++ mgen/protolib/unix/Makefile.linux 2009-06-06 20:40:29.000000000 +0200
-@@ -39,7 +39,7 @@
+--- a/protolib/unix/Makefile.linux
++++ b/protolib/unix/Makefile.linux
+@@ -39,7 +39,7 @@ SYSTEM_LIBS = -ldl -lrt
# (We export these for other Makefiles as needed)
#
-DHAVE_OLD_SIGNALHANDLER -DHAVE_DIRFD -DHAVE_ASSERT -DNO_SCM_RIGHTS -DHAVE_SCHED
# (TBD) Move ProtoRouteMgr to ProtokitEx ??
-diff -urN mgen.old/unix/Makefile.linux mgen/unix/Makefile.linux
---- mgen.old/unix/Makefile.linux 2007-06-22 21:16:20.000000000 +0200
-+++ mgen/unix/Makefile.linux 2009-06-06 20:40:10.000000000 +0200
-@@ -35,7 +35,7 @@
+--- a/unix/Makefile.linux
++++ b/unix/Makefile.linux
+@@ -35,7 +35,7 @@ SYSTEM_LIBS = -ldl -lpthread
# (We export these for other Makefiles as needed)
#
--- /dev/null
+--- a/unix/Makefile.linux
++++ b/unix/Makefile.linux
+@@ -5,8 +5,8 @@
+ # 1) System specific additional libraries, include paths, etc
+ # (Where to find X11 libraries, etc)
+ #
+-SYSTEM_INCLUDES = -I/usr/X11R6/include
+-SYSTEM_LDFLAGS = -L/usr/X11R6/lib
++SYSTEM_INCLUDES ?= -I/usr/X11R6/include
++SYSTEM_LDFLAGS ?= -L/usr/X11R6/lib
+ SYSTEM_LIBS = -ldl -lpthread
+
+ # 2) System specific capabilities
+@@ -39,8 +39,8 @@ SYSTEM_HAVES = -DLINUX -DHAVE_PSELECT -D
+ -DHAVE_ASSERT $(NETSEC)
+
+ SYSTEM = linux
+-CC = g++
+-RANLIB = ranlib
+-AR = ar
++CC ?= g++
++RANLIB ?= ranlib
++AR ?= ar
+
+ include Makefile.common