CC ?= clang
# linker flags and optional additional libraries if required
-LDFLAGS :=
-LIBS := -lm
+LDFLAGS +=
+LIBS += -lm
-CFLAGS += -Wall -Wextra -Werror -I. -fno-strict-aliasing -fsigned-char $(OPTIONAL)
+CFLAGS += -Wall -Wextra -Werror -fno-strict-aliasing $(OPTIONAL)
ifneq ($(shell git describe --always 2>/dev/null),)
CFLAGS += -DGMQCC_GITINFO="\"$(shell git describe --always)\""
endif
#Tiny C Compiler doesn't know what -pedantic-errors is
# and instead of ignoring .. just errors.
ifneq ($(CC), tcc)
- CFLAGS +=-pedantic-errors -ffunction-sections -fdata-sections -Wl,-gc-sections
+ CFLAGS += -pedantic-errors
else
CFLAGS += -Wno-pointer-sign -fno-common
endif
TESTSUITE = testsuite.exe
PAK = pak.exe
else
- #arm support for linux .. we need to allow unaligned accesses
- #to memory otherwise we just segfault everywhere
- ifneq (, $(findstring arm, $(shell uname -m)))
- CFLAGS += -munaligned-access
- endif
-
QCVM = qcvm
GMQCC = gmqcc
TESTSUITE = testsuite