tests - Build o-files for tests
This should reduce build time when rebuilding tests
This commit is contained in:
parent
a3730b868c
commit
c2d5ca5cfc
1 changed files with 4 additions and 2 deletions
6
Makefile
6
Makefile
|
@ -1,8 +1,10 @@
|
||||||
include Makeconf
|
include Makeconf
|
||||||
|
|
||||||
|
test-srcs := $(wildcard tests/*.cpp)
|
||||||
|
|
||||||
emu-objs := $(addsuffix .o,$(modules))
|
emu-objs := $(addsuffix .o,$(modules))
|
||||||
clean-objs := $(emu-objs) libemu.a vgbc vgbc.test
|
clean-objs := $(emu-objs) libemu.a vgbc vgbc.test
|
||||||
test-srcs := $(wildcard tests/*.cpp)
|
test-objs := $(patsubst %.cpp,%.o,$(test-srcs))
|
||||||
headers := $(wildcard */*.h)
|
headers := $(wildcard */*.h)
|
||||||
|
|
||||||
.PHONY: all test clean
|
.PHONY: all test clean
|
||||||
|
@ -24,5 +26,5 @@ libemu.a: $(emu-objs)
|
||||||
vgbc: main.c libemu.a
|
vgbc: main.c libemu.a
|
||||||
g++ $(CXX_FLAGS) -o $@ $^
|
g++ $(CXX_FLAGS) -o $@ $^
|
||||||
|
|
||||||
vgbc.test: $(test-srcs) libemu.a
|
vgbc.test: $(test-objs) libemu.a
|
||||||
g++ $(CXX_FLAGS) -o $@ $^
|
g++ $(CXX_FLAGS) -o $@ $^
|
||||||
|
|
Loading…
Reference in a new issue