From 4848b9e4d516a9203c08432901a7b40419e8f43c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 19 Jul 2017 15:54:35 -0700
Subject: [PATCH 1/3] Respect flags from env

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending

 Makefile      | 4 ++--
 cli/Makefile  | 2 +-
 pppd/Makefile | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index a05a000..439a978 100644
--- a/Makefile
+++ b/Makefile
@@ -81,8 +81,8 @@ LIBS.dmalloc=		-ldmalloc
 export USE_DMALLOC
 endif
 
-CPPFLAGS=		$(CPPFLAGS.ippooltest)
-CFLAGS=			-I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
+CPPFLAGS+=		$(CPPFLAGS.ippooltest)
+CFLAGS+=			-I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
 LDFLAGS.ippoold=	$(LDFLAGS) -Wl,-E -L. -Lusl -lusl -lnsl -ldl $(LIBS.dmalloc) -lc
 LDFLAGS.ippoolconfig=	$(LDFLAGS) -Lcli -lcli -lreadline -lcurses -lnsl $(LIBS.dmalloc) -lc
 
diff --git a/cli/Makefile b/cli/Makefile
index 4b5dd59..56fbf2f 100644
--- a/cli/Makefile
+++ b/cli/Makefile
@@ -7,7 +7,7 @@ CLI_SRCS_TEST.o=	$(CLI_SRCS_TEST.c:%.c=%.o)
 
 LDFLAGS.cli_test=	-L.. -L. $(READLINE_LDFLAGS) -lcli -lusl -lreadline -lcurses -lc
 
-CFLAGS=			$(CFLAGS.optimize) -MMD -Wall -Werror -I.. $(READLINE_CFLAGS)
+CFLAGS=			$(CFLAGS.optimize) -MMD -Wall -Werror -I.. $(READLINE_CFLAGS) $(CPPFLAGS)
 
 .PHONY:			all test clean
 
diff --git a/pppd/Makefile b/pppd/Makefile
index 106deca..7fd815f 100644
--- a/pppd/Makefile
+++ b/pppd/Makefile
@@ -10,7 +10,7 @@ endif
 
 # END CONFIGURABLE SETTINGS
 
-CFLAGS	+= -g -I.. -I/usr/include/pppd $(CFLAGS.pppd) -fPIC
+CFLAGS	+= -g -I.. -I=/usr/include/pppd $(CFLAGS.pppd) -fPIC
 LDFLAGS	+= -shared
 
 all:	ippool.so
-- 
2.13.3

