vgbc/Makefile

28 lines
442 B
Makefile
Raw Normal View History

2023-08-26 19:04:02 +02:00
include Makeconf
emu-objs := $(addsuffix .o,$(modules))
2023-08-28 22:31:24 +02:00
clean-objs := $(emu-objs) libemu.a vgbc vgbc.test
test-srcs := $(wildcard tests/*.cpp)
.PHONY: all test clean
all: vgbc $(test-targets)
clean:
rm -rf $(clean-objs)
2023-08-28 22:31:24 +02:00
test: vgbc.test
@./$< -s
2023-08-26 19:04:02 +02:00
%.o: %.cpp
g++ $(CXX_FLAGS) -c -o $@ $^
libemu.a: $(emu-objs)
ar -rc $@ $^
2023-08-28 22:31:24 +02:00
vgbc: main.c libemu.a
g++ $(CXX_FLAGS) -o $@ $^
2023-08-28 22:31:24 +02:00
vgbc.test: $(test-srcs) libemu.a
g++ $(CXX_FLAGS) -o $@ $^