diff --git a/Makefile b/Makefile index 09f32c8..91b635d 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,10 @@ include Makeconf +test-srcs := $(wildcard tests/*.cpp) + emu-objs := $(addsuffix .o,$(modules)) clean-objs := $(emu-objs) libemu.a vgbc vgbc.test -test-srcs := $(wildcard tests/*.cpp) +test-objs := $(patsubst %.cpp,%.o,$(test-srcs)) headers := $(wildcard */*.h) .PHONY: all test clean @@ -24,5 +26,5 @@ libemu.a: $(emu-objs) vgbc: main.c libemu.a g++ $(CXX_FLAGS) -o $@ $^ -vgbc.test: $(test-srcs) libemu.a +vgbc.test: $(test-objs) libemu.a g++ $(CXX_FLAGS) -o $@ $^