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,7 +1,8 @@
#compiler settings #compiler settings reference
CC=gcc #CC=gcc
CFLAGS+=-std=c17 -pedantic -Werror #CFLAGS+=-std=c17 -g -Wall -Werror -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable -Wformat=2
LIBS+=-lm #LIBS+=-lm
#LDFLAGS+=
#directories #directories
export TOY_SOURCEDIR=source export TOY_SOURCEDIR=source

View File

@@ -1,6 +1,6 @@
#compiler settings #compiler settings
CC=gcc CC=gcc
CFLAGS+=-g -Wall -Werror -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable CFLAGS+=-std=c17 -g -Wall -Werror -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable -Wformat=2
LIBS+=-lm -lToy LIBS+=-lm -lToy
LDFLAGS+=-Wl,-rpath,'$$ORIGIN' LDFLAGS+=-Wl,-rpath,'$$ORIGIN'

View File

@@ -1,6 +1,6 @@
#compiler settings #compiler settings
CC=gcc CC=gcc
CFLAGS+=-g -Wall -Werror -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable CFLAGS+=-std=c17 -g -Wall -Werror -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable -Wformat=2
LIBS+=-lm LIBS+=-lm
LDFLAGS+= LDFLAGS+=

View File

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