From cf33ac7a3d8b2b8f6bb266518aadbf59de397608 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Thu, 4 Jun 2009 17:10:17 +0100 Subject: [PATCH] Makefile: Add CFLAGS to the "test_main.c" compile target Also, add the include to test_main.c, in order to suppress the resulting "implicit declaration of strcmp()" warning. Signed-off-by: Ramsay Jones Signed-off-by: Andreas Ericsson --- Makefile | 2 +- tests/test_main.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6d681ba63..933888647 100644 --- a/Makefile +++ b/Makefile @@ -135,7 +135,7 @@ $(TEST_OBJ): tests/%.o: tests/%.c $(patsubst %.exe,%_main.o,$(TEST_EXE)): tests/%_main.o: $(HDRS) $(patsubst %.exe,%_main.o,$(TEST_EXE)): tests/%_main.o: $(T_MAIN_C) $(patsubst %.exe,%_main.o,$(TEST_EXE)): tests/%_main.o: tests/%.toc - $(CC) -Isrc -I. '-DTEST_TOC="$<"' \ + $(CC) $(CFLAGS) -Isrc -I. '-DTEST_TOC="$<"' \ -c $(T_MAIN_C) \ -o $@ diff --git a/tests/test_main.c b/tests/test_main.c index 0be51ee21..43bb43402 100644 --- a/tests/test_main.c +++ b/tests/test_main.c @@ -24,6 +24,7 @@ */ #include "test_lib.h" +#include #undef BEGIN_TEST #define BEGIN_TEST(name) extern void testfunc__##name(void);