summaryrefslogtreecommitdiff
path: root/net-vpn/htun/files/htun-0.9.6-makefile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'net-vpn/htun/files/htun-0.9.6-makefile.patch')
-rw-r--r--net-vpn/htun/files/htun-0.9.6-makefile.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/net-vpn/htun/files/htun-0.9.6-makefile.patch b/net-vpn/htun/files/htun-0.9.6-makefile.patch
new file mode 100644
index 000000000000..c1f0b76bfa14
--- /dev/null
+++ b/net-vpn/htun/files/htun-0.9.6-makefile.patch
@@ -0,0 +1,34 @@
+* Fix build system to not hardcode CC
+* Fix build system to respect user flags
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -20,16 +20,14 @@
+
+ # $Id: Makefile,v 2.16 2002/08/11 15:57:07 jehsom Exp $
+
+-
+-CFLAGS = -I../include -I. -O -W -Wall -g -D_REENTRANT #-pg -a
+-LDFLAGS = -lfl -lpthread # -flex for linux, solaris ?
+-LEX_CFLAGS = -I../include -I. -g -D_REENTRANT #-pg -a
++CFLAGS := $(CFLAGS) -I../include -I. -O -W -Wall -D_REENTRANT
++LDFLAGS := $(LDFLAGS) -lfl -lpthread
++LEX_CFLAGS = -I../include -I. -D_REENTRANT
+
+ # in Linux, LFLAGS is empty. In Solaris, LFLAGS = -lnsl -lsocket
+ #LFLAGS = -lnsl -lsocket
+
+ VPATH = .:../include
+-CC := gcc
+ LEX = flex
+ YACC = yacc
+ INCLUDE := $(wildcard ../include/*.h)
+@@ -52,7 +50,7 @@
+ $(OBJS): $(INCLUDE)
+
+ $(CONFOBS): $(CONFSRC)
+- $(CC) $(LEX_CFLAGS) -c $(@:.o=.c)
++ $(CC) $(CFLAGS) $(LEX_CFLAGS) -c $(@:.o=.c)
+
+ lex.yy.c: parse.l
+ $(LEX) $^