From 72215487c0f7d4311e8ebe831fa69a6fbdb22e70 Mon Sep 17 00:00:00 2001 From: Filippo ARCIDIACONO Date: Mon, 23 Jan 2012 15:44:14 +0100 Subject: tests: add OMIT logic to remove compilation flag. Add OMIT logic to remove compilation flags when compiling libraries, binaries( both host and target) Signed-off-by: Filippo Arcidiacono Signed-off-by: Carmelo Amoroso --- test/Test.mak | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test/Test.mak') diff --git a/test/Test.mak b/test/Test.mak index dd3fcc387..dbed09624 100644 --- a/test/Test.mak +++ b/test/Test.mak @@ -99,12 +99,14 @@ $(MAKE_SRCS): Makefile $(TESTDIR)Makefile $(TESTDIR)Rules.mak $(TESTDIR)Test.mak $(U_TARGETS): $(U_TARGET_SRCS) $(MAKE_SRCS) $(showlink) - $(Q)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$@) -c $@.c -o $@.o + $(Q)$(CC) $(filter-out $(CFLAGS-OMIT-$@),$(CFLAGS)) $(EXTRA_CFLAGS) $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$@) -c $@.c -o $@.o $(Q)$(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$@) $(G_TARGETS): $(U_TARGET_SRCS) $(MAKE_SRCS) $(showlink) - $(Q)$(HOSTCC) $(HOST_CFLAGS) $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$(patsubst %_glibc,%,$@)) -c $(patsubst %_glibc,%,$@).c -o $@.o + $(Q)$(HOSTCC) $(filter-out $(HOST_CFLAGS-OMIT-$(patsubst %_glibc,%,$@)),$(HOST_CFLAGS)) \ + $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$(patsubst %_glibc,%,$@)) \ + -c $(patsubst %_glibc,%,$@).c -o $@.o $(Q)$(HOSTCC) $(HOST_LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$(patsubst %_glibc,%,$@)) @@ -117,9 +119,11 @@ shell_%: %.so: %.c $(showlink) $(Q)$(CC) \ - $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(patsubst %_glibc,%,$@)) \ + $(filter-out $(CFLAGS-OMIT-$<),$(CFLAGS)) $(EXTRA_CFLAGS) \ + $(CFLAGS_$(patsubst %_glibc,%,$@)) \ -fPIC -shared $< -o $@ -Wl,-soname,$@ \ - $(LDFLAGS) $(EXTRA_LIBS) $(LDFLAGS_$(patsubst %_glibc,%,$@)) + $(filter-out $(LDFLAGS-OMIT-$<),$(LDFLAGS)) $(EXTRA_LIBS) \ + $(LDFLAGS_$(patsubst %_glibc,%,$@)) clean: $(showclean) -- cgit v1.2.3