diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-18 01:29:38 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-18 01:29:38 +0100 |
commit | 37caecaeb5e0a520b7003cda7a814373d4d14c35 (patch) | |
tree | d5fa96c38be33ad2701300e2c1ecbf980b6e7adb /mk/lang-c.mk | |
parent | add install and news (diff) | |
download | vtchs-37caecaeb5e0a520b7003cda7a814373d4d14c35.tar.gz vtchs-37caecaeb5e0a520b7003cda7a814373d4d14c35.tar.bz2 vtchs-37caecaeb5e0a520b7003cda7a814373d4d14c35.tar.xz |
m build system fix
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r-- | mk/lang-c.mk | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mk/lang-c.mk b/mk/lang-c.mk index b8076d6..36d4496 100644 --- a/mk/lang-c.mk +++ b/mk/lang-c.mk @@ -60,11 +60,11 @@ endif # BUILD VARIABLES: # Optimisation settings for C code compilation. +ifndef OPTIMISE ifndef DEBUG OPTIMISE = -O2 -g endif -ifndef DEBUG -ifdef OPTIMISE +ifdef DEBUG ifdef __USING_GCC OPTIMISE = -Og -g endif @@ -78,6 +78,7 @@ endif ifdef _PEDANTIC _PEDANTIC = -pedantic endif +ifndef WARN ifndef DEBUG WARN = -Wall endif @@ -99,6 +100,7 @@ ifndef __USING_GCC WARN = -Wall -Wextra $(_PEDANTIC) endif endif +endif # Support for internationalisation? ifndef WITHOUT_GETTEXT @@ -112,9 +114,15 @@ _CPPFLAGS += $(foreach D,$(_ALL_DIRS),-D'$(D)="$($(D))"') # MORE HELP VARIABLES: # Compilation and linking flags, and command. +ifndef CPPFLAGS CPPFLAGS = +endif +ifndef CFLAGS CFLAGS = $(OPTIMISE) $(WARN) +endif +ifndef LDFLAGS LDFLAGS = $(OPTIMISE) $(WARN) +endif __CC = $(CC) -std=$(_C_STD) -c $(_CPPFLAGS) $(_CFLAGS) __LD = $(CC) -std=$(_C_STD) $(_LDFLAGS) __CC_POST = $(CPPFLAGS) $(CFLAGS) $(EXTRA_CPPFLAGS) $(EXTRA_CFLAGS) |