|
|
@ -234,6 +234,11 @@ all: | clean
|
|
|
|
@$(MAKE) clean-rebuild
|
|
|
|
@$(MAKE) clean-rebuild
|
|
|
|
@$(MAKE) debug
|
|
|
|
@$(MAKE) debug
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
|
|
|
|
test: $(PROJECT)-test
|
|
|
|
|
|
|
|
-strace ./$<
|
|
|
|
|
|
|
|
-valgrind ./$<
|
|
|
|
|
|
|
|
|
|
|
|
# Targets
|
|
|
|
# Targets
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: pch
|
|
|
|
.PHONY: pch
|
|
|
@ -345,8 +350,8 @@ uninstall:
|
|
|
|
cd $(INCLUDE) && find . -type f | xargs -I {} rm "$(DESTDIR)$(PREFIX)/include/$(PROJECT)/{}"
|
|
|
|
cd $(INCLUDE) && find . -type f | xargs -I {} rm "$(DESTDIR)$(PREFIX)/include/$(PROJECT)/{}"
|
|
|
|
rmdir $(DESTDIR)$(PREFIX)/include/$(PROJECT)
|
|
|
|
rmdir $(DESTDIR)$(PREFIX)/include/$(PROJECT)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#TODO: We can make the target between `{debug,release}{.a,.so}` configurable by call. e.g. `TARGET=release.a make test`
|
|
|
|
$(PROJECT)-test: LDFLAGS+= -lfmt -lstdc++
|
|
|
|
$(PROJECT)-test: LDFLAGS+= -lfmt -lstdc++
|
|
|
|
$(PROJECT)-test: CFLAGS+= -Og -g
|
|
|
|
$(PROJECT)-test: CFLAGS+= -Og -g
|
|
|
|
$(PROJECT)-test: lib$(PROJECT)-debug.a
|
|
|
|
$(PROJECT)-test: lib$(PROJECT)-debug.a
|
|
|
|
$(CC) $(CFLAGS) src/test/*.c -o $@ -l:$< $(LDFLAGS)
|
|
|
|
$(CC) $(CFLAGS) -fwhole-program src/test/*.c -o $@ -l:$< $(LDFLAGS)
|
|
|
|
-valgrind ./$@
|
|
|
|
|
|
|
|