summaryrefslogtreecommitdiff
blob: c1f0b76bfa1489cea39cdf8d6bb0c60098ed2b85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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) $^