diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-18 01:28:48 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-18 01:28:48 +0100 |
commit | 06bf4f095abcb13452e54dc5a9e25bcc361deace (patch) | |
tree | d2987eea679f4e6bad058d7c038c79789d59cc78 /mk/lang-c.mk | |
parent | m (diff) | |
download | scrotty-06bf4f095abcb13452e54dc5a9e25bcc361deace.tar.gz scrotty-06bf4f095abcb13452e54dc5a9e25bcc361deace.tar.bz2 scrotty-06bf4f095abcb13452e54dc5a9e25bcc361deace.tar.xz |
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) |