GLdc/tests/Makefile

40 lines
740 B
Makefile
Raw Normal View History

2020-10-26 21:19:39 +00:00
TARGET = tests.elf
OBJS = test_runner.o
2020-10-26 22:00:11 +00:00
TESTS := $(shell find . -name \*.h)
2020-10-26 21:19:39 +00:00
CXXFLAGS := $(CXXFLAGS) -std=c++11
all: rm-elf $(TARGET)
include $(KOS_BASE)/Makefile.rules
2020-10-27 14:37:25 +00:00
.FORCE:
2020-10-26 21:19:39 +00:00
clean:
2020-10-27 14:37:25 +00:00
-rm -f $(TARGET) $(OBJS) romdisk.* test_runner.*
2020-10-26 21:19:39 +00:00
rm-elf:
-rm -f $(TARGET) romdisk.*
2020-10-27 14:11:34 +00:00
test_runner.cpp:
2020-10-26 22:00:11 +00:00
$(shell python3 test_generator.py --output=test_runner.cpp $(TESTS))
2020-10-27 14:37:25 +00:00
test_runner.o: .FORCE test_runner.cpp
2020-10-26 21:19:39 +00:00
$(TARGET): $(OBJS) romdisk.o
2020-10-27 14:11:34 +00:00
kos-c++ -o $(TARGET) $(OBJS) ../libGLdc.a romdisk.o
2020-10-26 21:19:39 +00:00
romdisk.img:
$(KOS_GENROMFS) -f romdisk.img -d romdisk -v
romdisk.o: romdisk.img
$(KOS_BASE)/utils/bin2o/bin2o romdisk.img romdisk romdisk.o
run: $(TARGET)
$(KOS_LOADER) $(TARGET)
dist:
rm -f $(OBJS) romdisk.o romdisk.img
$(KOS_STRIP) $(TARGET)
2020-10-26 22:00:11 +00:00