Add rules to build test binary.

This commit is contained in:
Marco 2023-03-03 23:22:21 +01:00
parent 18f2f4efcd
commit d787da74bb

View File

@ -16,16 +16,15 @@ TEST_SRC = $(filter-out src/main.c, $(SRC) $(wildcard test/*.c))
$(TARGETNAME): $(TARGET) $(TARGETNAME): $(TARGET)
$(TARGET): $(SRC) $(TARGET): $(SRC)
mkdir -p build mkdir -p $(BUILDFOLDER)
cc -o $@ $^ $(CPPFLAGS) $(CFLAGS) $(INC) -lm -lftdi1 cc -o $@ $^ $(CPPFLAGS) $(CFLAGS) $(INC) -lm -lftdi1
$(TEST_TARGETNAME): $(TEST_TARGET) $(TEST_TARGETNAME): $(TEST_TARGET)
$(TEST_TARGET): $(TEST_SRC) $(TEST_TARGET): $(TEST_SRC)
echo $(TEST_SRC)
mkdir -p $(TEST_BUILDFOLDER) mkdir -p $(TEST_BUILDFOLDER)
cc -o $@ $^ $(CPPFLAGS) $(CFLAGS) $(INC) -lm -lftdi1 -lcunit cc -o $@ $^ $(CPPFLAGS) $(CFLAGS) $(INC) -lm -lftdi1 -lcunit
clean: clean:
rm -fr ./src/*.o ./build/* rm -fr ./src/*.o $(BUILDFOLDER)*
rm -fr $(TEST_BUILDFOLDER)* rm -fr $(TEST_BUILDFOLDER)*