--- hatari/tests/debugger/makefile 2019/04/09 08:51:35 1.1.1.2 +++ hatari/tests/debugger/makefile 2019/04/09 08:56:14 1.1.1.5 @@ -9,11 +9,18 @@ # "make valgrind": # - run tests under valgrind # -# "make clean; make MUDFLAP=1 mudflap": -# - run tests with GCC mudflap checks +# "make clean; make CC=gcc- MUDFLAP=1 mudflap": +# - run tests with older GCC version mudflap checks +# (MudFlap was removed/replaced in GCC 4.9 with AddressSanitizer) +# +# TODO: support AddressSanitizer # Set the C compiler (e.g. gcc) -CC = gcc +CC ?= gcc + +# Directory given for 'cmake' i.e. where CMake created the config.h. +# Could also be simply "../.." or "../../build". +CONFIGDIR := $(shell find ../.. -name config.h | head -1 | sed 's%/[^/]*$$%%') # SDL-Library configuration (compiler flags and linker options) - you normally # don't have to change this if you have correctly installed the SDL library! @@ -23,8 +30,8 @@ SDL_CFLAGS := $(shell sdl-config --cflag WARNFLAGS = -Wmissing-prototypes -Wstrict-prototypes -Wsign-compare \ -Wbad-function-cast -Wcast-qual -Wpointer-arith -Wwrite-strings -Wall -# Hatari include directories: -INCFLAGS = -I../.. -I../../src/includes -I../../src/uae-cpu \ +# Hatari source include directories: +INCFLAGS = -I$(CONFIGDIR) -I../../src/includes -I../../src/uae-cpu \ -I../../src/debug -I../../src/falcon # Set extra flags passed to the compiler @@ -92,10 +99,10 @@ test: $(TESTS) for test in $^; do ./$$test; echo "Press "; read proceed; done # all the real & dummy deps -SOURCEDEPS = test-dummies.c ../../src/debug/breakcond.c \ - ../../src/debug/debugcpu.c ../../src/falcon/dsp.c \ - ../../src/debug/evaluate.c ../../src/debug/profile.c \ - ../../src/debug/symbols.c ../../src/str.c +SOURCEDEPS = ../../src/debug/breakcond.c \ + ../../src/debug/debugcpu.c ../../src/debug/history.c \ + ../../src/debug/evaluate.c ../../src/debug/symbols.c \ + ../../src/debug/vars.c ../../src/str.c test-dummies.c test-symbols: test-symbols.c $(SOURCEDEPS) $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)