mirror of
https://github.com/ccxvii/mujs.git
synced 2026-02-05 17:29:43 +08:00
Some Makefile tweaks.
Change default optimization flag to -O2. Use XCFLAGS and XCPPFLAGS to add to the definitions: make XCPPFLAGS=-I/foo/bar XCFLAGS=-mfoo-bar Set CFLAGS on the make command line if you want to override completely: make CFLAGS="-O3 -m32" If you want to override them with the system environment variables: make CFLAGS="$CFLAGS"
This commit is contained in:
5
Makefile
5
Makefile
@@ -15,7 +15,7 @@ endif
|
||||
|
||||
# Compiler flags for various configurations:
|
||||
|
||||
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter
|
||||
CFLAGS := -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter
|
||||
|
||||
ifeq "$(CC)" "clang"
|
||||
CFLAGS += -Wunreachable-code
|
||||
@@ -31,7 +31,7 @@ else ifeq "$(build)" "sanitize"
|
||||
CFLAGS += -pipe -g -fsanitize=address -fno-omit-frame-pointer
|
||||
LDFLAGS += -fsanitize=address
|
||||
else ifeq "$(build)" "release"
|
||||
CFLAGS += -Os
|
||||
CFLAGS += -O2
|
||||
LDFLAGS += -Wl,-s
|
||||
endif
|
||||
|
||||
@@ -41,6 +41,7 @@ ifeq "$(HAVE_READLINE)" "yes"
|
||||
endif
|
||||
|
||||
CFLAGS += $(XCFLAGS)
|
||||
CPPFLAGS += $(XCPPFLAGS)
|
||||
|
||||
# You shouldn't need to edit anything below here.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user