diff options
-rw-r--r-- | makefiles/gmake/compiler.mk | 9 | ||||
-rw-r--r-- | src/GNUmakefile | 2 | ||||
-rw-r--r-- | tests/port/GNUmakefile | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/makefiles/gmake/compiler.mk b/makefiles/gmake/compiler.mk index a3ae88f..1d1bce3 100644 --- a/makefiles/gmake/compiler.mk +++ b/makefiles/gmake/compiler.mk @@ -83,9 +83,12 @@ endif endif +STD99_COMPILE_FLAGS = \ + -std=c99 + COMPILE_FLAGS = \ $(COMMON_COMPILE_FLAGS) \ - -std=c99 \ + $(STD99_COMPILE_FLAGS) \ -Wnonnull \ -Wbad-function-cast -Wstrict-prototypes \ -Wmissing-prototypes -Wmissing-declarations \ @@ -186,8 +189,10 @@ endif # TODO: enable -O2 ifeq "$(COMPILER)" "spro" +STD99_COMPILE_FLAGS = \ + -xc99=all COMPILE_FLAGS = \ - -xc99=all -Xc -errwarn=%all -mt -v + $(STD99_COMPILE_FLAGS) -Xc -errwarn=%all -mt -v endif # end of spro section diff --git a/src/GNUmakefile b/src/GNUmakefile index dd6fb1d..9dbcf57 100644 --- a/src/GNUmakefile +++ b/src/GNUmakefile @@ -36,7 +36,7 @@ local_all: $(LIBS) # libmath and more, which is maybe not really acceptable for a core # port (on the other hand so isn't NLS support!) port/stdio.o : port/stdio.c $(TOPDIR)/include/wolf/port/stdio.h port/snprintf.h port/snprintf.c - $(CC) -c -o $@ $(INCLUDE_DIRS) $(PLATFORM_COMPILE_FLAGS) $< + $(CC) $(STD99_COMPILE_FLAGS) -c -o $@ $(INCLUDE_DIRS) $(PLATFORM_COMPILE_FLAGS) $< libwolf.a: $(OBJS) $(AR) cr $@ $? diff --git a/tests/port/GNUmakefile b/tests/port/GNUmakefile index 73739b4..a946ad7 100644 --- a/tests/port/GNUmakefile +++ b/tests/port/GNUmakefile @@ -21,7 +21,7 @@ TEST_BINS = \ # libmath and more, which is maybe not really acceptable for a core # port (on the other hand so isn't NLS support!) test_snprintf.o : test_snprintf.c $(TOPDIR)/include/wolf/port/stdio.h $(TOPDIR)/src/port/snprintf.h $(TOPDIR)/src/port/snprintf.c - $(CC) -c -o $@ $(PLATFORM_COMPILE_FLAGS) $(INCLUDE_DIRS) $< + $(CC) $(STD99_COMPILE_FLAGS) -c -o $@ $(PLATFORM_COMPILE_FLAGS) $(INCLUDE_DIRS) $< local_all: |