clean runtime, don't needlessly enable PIE

This commit is contained in:
dzaima 2021-10-28 16:16:45 +03:00
parent 61dad2aadd
commit 30b0a36b4d

View File

@ -56,19 +56,20 @@ PIE = -no-pie
# test if we are running gcc or clang # test if we are running gcc or clang
CC_IS_CLANG = $(shell $(CC) --version | head -n1 | grep -m 1 -c "clang") CC_IS_CLANG = $(shell $(CC) --version | head -n1 | grep -m 1 -c "clang")
ifeq (${CC_IS_CLANG}, 1) ifeq (${CC_IS_CLANG}, 1)
CCFLAGS = -Wno-microsoft-anon-tag CCFLAGS = -Wno-microsoft-anon-tag
else else
CCFLAGS = -Wno-parentheses CCFLAGS = -Wno-parentheses
endif endif
ifeq (${singeli}, 1) ifeq (${singeli}, 1)
SINGELIFLAGS = '-DSINGELI' SINGELIFLAGS = '-DSINGELI'
else else
singeli = 0 singeli = 0
SINGELIFLAGS = ''
endif endif
CMD = $(CC) -std=gnu11 -Wall -Wno-unused-function -fms-extensions $(CCFLAGS) $(FLAGS) $(SINGELIFLAGS) -fPIE -MMD -MP -MF CMD = $(CC) -std=gnu11 -Wall -Wno-unused-function -fms-extensions $(CCFLAGS) $(FLAGS) $(SINGELIFLAGS) -MMD -MP -MF
# `if` to allow `make clean` alone to clean everything, but `make t=debug clean` to just clean obj/debug # `if` to allow `make clean` alone to clean everything, but `make t=debug clean` to just clean obj/debug
ifeq ($(MAKECMDGOALS),clean) ifneq (,$(findstring clean,$(MAKECMDGOALS)))
ifndef t ifndef t
t = * t = *
endif endif
@ -154,11 +155,13 @@ src/singeli/gen/%.c: src/singeli/src/%.singeli preSingeliBin
clean-singeli: clean-singeli:
rm -rf src/singeli/gen/ rm -rf src/singeli/gen/
clean-runtime:
ifeq ($(t), *) rm -f src/gen/customRuntime
clean: clean-singeli clean-build:
endif
clean:
rm -f ${bd}/*.o rm -f ${bd}/*.o
rm -f ${bd}/*.d rm -f ${bd}/*.d
ifeq ($(t), *)
clean: clean-singeli clean-runtime
endif
clean: clean-build