Makefile: Add CFLAGS to the "test_main.c" compile target

Also, add the <string.h> include to test_main.c, in order to
suppress the resulting "implicit declaration of strcmp()" warning.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Andreas Ericsson <ae@op5.se>
This commit is contained in:
Ramsay Jones 2009-06-04 17:10:17 +01:00 committed by Andreas Ericsson
parent e17a3f5673
commit cf33ac7a3d
2 changed files with 2 additions and 1 deletions

View File

@ -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 $@

View File

@ -24,6 +24,7 @@
*/
#include "test_lib.h"
#include <string.h>
#undef BEGIN_TEST
#define BEGIN_TEST(name) extern void testfunc__##name(void);