Tweaked CFLAGS in each makefile

This commit is contained in:
2024-10-12 20:30:42 +11:00
parent 7b1dbf25ff
commit bfc8fe3717
4 changed files with 14 additions and 12 deletions

View File

@@ -1,16 +1,17 @@
#compiler settings
CC=gcc
CFLAGS=-g -Wall -Werror -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable
LIBS=-lm
CFLAGS+=-std=c17 -g -Wall -Werror -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable -Wformat=2
LIBS+=-lm
LDFLAGS+=
ifeq ($(shell uname),Linux)
LDFLAG=-Wl,--gc-sections
LDFLAGS=-Wl,--gc-sections
else ifeq ($(OS),Windows_NT)
LDFLAG=-Wl,--gc-sections
LDFLAGS=-Wl,--gc-sections
else ifeq ($(shell uname),Darwin)
LDFLAG=-Wl,-dead_strip
LDFLAGS=-Wl,-dead_strip
else
@echo "LDFLAG set failed - what platform is this?"
@echo "LDFLAGS set failed - what platform is this?"
endif
#directories