Improved Makefiles.
This commit is contained in:
parent
93a286563a
commit
c016cd0af3
@ -1,14 +1,22 @@
|
|||||||
DUMPMACHINE := $(shell $(CC) -dumpmachine)
|
DUMPMACHINE := $(shell $(CC) -dumpmachine)
|
||||||
|
|
||||||
ifneq ($(SANITIZE_ADDRESS),1)
|
ifneq ($(DEBUG),)
|
||||||
XCFLAGS = -Ofast -flto -DNDEBUG -s -static
|
XCFLAGS = -Og -g
|
||||||
|
else
|
||||||
|
ifneq ($(ASAN),)
|
||||||
|
XCFLAGS = -O1 -g -fsanitize=address -fno-omit-frame-pointer -static-libasan
|
||||||
|
else
|
||||||
|
XCFLAGS = -Ofast -DNDEBUG
|
||||||
ifneq ($(firstword $(filter x86_64-%,$(DUMPMACHINE))),)
|
ifneq ($(firstword $(filter x86_64-%,$(DUMPMACHINE))),)
|
||||||
XCFLAGS += -march=x86-64 -mtune=nocona
|
XCFLAGS += -march=x86-64 -mtune=nocona
|
||||||
else ifneq ($(firstword $(filter i686-%,$(DUMPMACHINE))),)
|
else ifneq ($(firstword $(filter i686-%,$(DUMPMACHINE))),)
|
||||||
XCFLAGS += -march=pentiumpro -mtune=intel
|
XCFLAGS += -march=pentiumpro -mtune=intel
|
||||||
endif
|
endif
|
||||||
else
|
ifneq ($(FLTO),)
|
||||||
XCFLAGS = -fsanitize=address -static-libasan -g
|
XCFLAGS += -flto
|
||||||
|
endif
|
||||||
|
XCFLAGS += -s -static
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(firstword $(filter %-mingw32 %-cygwin,$(DUMPMACHINE))),)
|
ifneq ($(firstword $(filter %-mingw32 %-cygwin,$(DUMPMACHINE))),)
|
||||||
|
@ -1,14 +1,21 @@
|
|||||||
DUMPMACHINE := $(shell $(CC) -dumpmachine)
|
DUMPMACHINE := $(shell $(CC) -dumpmachine)
|
||||||
|
|
||||||
ifneq ($(SANITIZE_ADDRESS),1)
|
ifneq ($(DEBUG),)
|
||||||
XCFLAGS = -Ofast -flto -DNDEBUG
|
XCFLAGS = -Og -g
|
||||||
|
else
|
||||||
|
ifneq ($(ASAN),)
|
||||||
|
XCFLAGS = -O1 -g -fsanitize=address -fno-omit-frame-pointer -static-libasan
|
||||||
|
else
|
||||||
|
XCFLAGS = -Ofast -DNDEBUG
|
||||||
ifneq ($(firstword $(filter x86_64-%,$(DUMPMACHINE))),)
|
ifneq ($(firstword $(filter x86_64-%,$(DUMPMACHINE))),)
|
||||||
XCFLAGS += -march=x86-64 -mtune=nocona
|
XCFLAGS += -march=x86-64 -mtune=nocona
|
||||||
else ifneq ($(firstword $(filter i686-%,$(DUMPMACHINE))),)
|
else ifneq ($(firstword $(filter i686-%,$(DUMPMACHINE))),)
|
||||||
XCFLAGS += -march=pentiumpro -mtune=intel
|
XCFLAGS += -march=pentiumpro -mtune=intel
|
||||||
endif
|
endif
|
||||||
else
|
ifneq ($(FLTO),)
|
||||||
XCFLAGS = -fsanitize=address -static-libasan -g
|
XCFLAGS += -flto
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS = -std=c99 -D_DEFAULT_SOURCE -Wpedantic -Iinclude $(XCFLAGS)
|
CFLAGS = -std=c99 -D_DEFAULT_SOURCE -Wpedantic -Iinclude $(XCFLAGS)
|
||||||
|
@ -1,14 +1,22 @@
|
|||||||
DUMPMACHINE := $(shell $(CC) -dumpmachine)
|
DUMPMACHINE := $(shell $(CC) -dumpmachine)
|
||||||
|
|
||||||
ifneq ($(SANITIZE_ADDRESS),1)
|
ifneq ($(DEBUG),)
|
||||||
XCFLAGS = -Ofast -flto -DNDEBUG -s -static
|
XCFLAGS = -Og -g
|
||||||
|
else
|
||||||
|
ifneq ($(ASAN),)
|
||||||
|
XCFLAGS = -O1 -g -fsanitize=address -fno-omit-frame-pointer -static-libasan
|
||||||
|
else
|
||||||
|
XCFLAGS = -Ofast -DNDEBUG
|
||||||
ifneq ($(firstword $(filter x86_64-%,$(DUMPMACHINE))),)
|
ifneq ($(firstword $(filter x86_64-%,$(DUMPMACHINE))),)
|
||||||
XCFLAGS += -march=x86-64 -mtune=nocona
|
XCFLAGS += -march=x86-64 -mtune=nocona
|
||||||
else ifneq ($(firstword $(filter i686-%,$(DUMPMACHINE))),)
|
else ifneq ($(firstword $(filter i686-%,$(DUMPMACHINE))),)
|
||||||
XCFLAGS += -march=pentiumpro -mtune=intel
|
XCFLAGS += -march=pentiumpro -mtune=intel
|
||||||
endif
|
endif
|
||||||
else
|
ifneq ($(FLTO),)
|
||||||
XCFLAGS = -fsanitize=address -static-libasan -g
|
XCFLAGS += -flto
|
||||||
|
endif
|
||||||
|
XCFLAGS += -s -static
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(firstword $(filter %-mingw32 %-cygwin,$(DUMPMACHINE))),)
|
ifneq ($(firstword $(filter %-mingw32 %-cygwin,$(DUMPMACHINE))),)
|
||||||
|
Loading…
Reference in New Issue
Block a user