1From a2021f0bc0f029dfa05dcca5db3d2ec77904d41a Mon Sep 17 00:00:00 2001 2From: Khem Raj <raj.khem@gmail.com> 3Date: Thu, 30 Mar 2017 12:33:51 -0700 4Subject: [PATCH] Use ARPCFLAGS for package specific compiler flags 5 6This leaves room for setting CFLAGS in environment 7which OE uses to pass tweaks 8 9Signed-off-by: Khem Raj <raj.khem@gmail.com> 10--- 11Upstream-Status: Pending 12 13 Makefile | 10 ++++------ 14 extensions/Makefile | 4 ++++ 15 2 files changed, 8 insertions(+), 6 deletions(-) 16 17diff --git a/Makefile b/Makefile 18index 62ebdf2..cd06813 100644 19--- a/Makefile 20+++ b/Makefile 21@@ -12,9 +12,7 @@ DESTDIR:= 22 23 MANS = arptables-legacy.8 arptables-save.8 arptables-restore.8 24 25-COPT_FLAGS:=-O2 26-CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DARPTC_DEBUG 27- 28+ARPCFLAGS:=-Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" 29 ifndef ARPT_LIBDIR 30 ARPT_LIBDIR:=$(LIBDIR)/arptables 31 endif 32@@ -24,13 +22,13 @@ include extensions/Makefile 33 all: arptables-legacy libarptc/libarptc.a 34 35 arptables.o: arptables.c 36- $(CC) $(CFLAGS) -c -o $@ $< 37+ $(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $< 38 39 arptables-standalone.o: arptables-standalone.c 40- $(CC) $(CFLAGS) -c -o $@ $< 41+ $(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $< 42 43 libarptc/libarptc.o: libarptc/libarptc.c libarptc/libarptc_incl.c 44- $(CC) $(CFLAGS) -c -o $@ $< 45+ $(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $< 46 47 libarptc/libarptc.a: libarptc/libarptc.o 48 $(AR) rcs $@ $< 49diff --git a/extensions/Makefile b/extensions/Makefile 50index 0189cc9..e8af782 100644 51--- a/extensions/Makefile 52+++ b/extensions/Makefile 53@@ -5,3 +5,7 @@ EXT_OBJS+=$(foreach T,$(EXT_FUNC), extensions/arpt_$(T).o) 54 55 extensions/ebt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h 56 $(CC) $(CFLAGS) $(PROGSPECS) -c -o $@ $< 57+ $(CC) $(CFLAGS) $(ARPCFLAGS) $(PROGSPECS) -c -o $@ $< 58+ 59+extensions/arpt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h 60+ $(CC) $(CFLAGS) $(ARPCFLAGS) $(PROGSPECS) -c -o $@ $< 61-- 622.17.1 63 64