You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-vpn/htun/files/htun-0.9.6-makefile.patch

35 lines
904 B

* 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) $^