From c2d5ca5cfcaa8d7e2893478d6f7156b02768cc63 Mon Sep 17 00:00:00 2001 From: MadMaurice Date: Tue, 29 Aug 2023 23:19:13 +0200 Subject: [PATCH] tests - Build o-files for tests This should reduce build time when rebuilding tests --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 $@ $^