Browse Source

bump c/c++ standard to gnu11

needed for constexpr
Markus Towara 8 years ago
parent
commit
5b6e2cecf5
1 changed files with 5 additions and 8 deletions
  1. 5
    8
      Marlin/Makefile

+ 5
- 8
Marlin/Makefile View File

380
 CINCS = ${addprefix -I ,${VPATH}}
380
 CINCS = ${addprefix -I ,${VPATH}}
381
 CXXINCS = ${addprefix -I ,${VPATH}}
381
 CXXINCS = ${addprefix -I ,${VPATH}}
382
 
382
 
383
-# Compiler flag to set the C Standard level.
384
-# c89   - "ANSI" C
385
-# gnu89 - c89 plus GCC extensions
386
-# c99   - ISO C99 standard (not yet fully implemented)
387
-# gnu99 - c99 plus GCC extensions
388
-#CSTANDARD = -std=gnu99
383
+# Compiler flag to set the C/CPP Standard level.
384
+CSTANDARD = -std=gnu99
385
+CXXSTANDARD = -std=gnu++11
389
 CDEBUG = -g$(DEBUG)
386
 CDEBUG = -g$(DEBUG)
390
 CWARN = -Wall -Wstrict-prototypes
387
 CWARN = -Wall -Wstrict-prototypes
391
 CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct \
388
 CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct \
397
 #CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
394
 #CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
398
 CEXTRA = -fno-use-cxa-atexit
395
 CEXTRA = -fno-use-cxa-atexit
399
 
396
 
400
-CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CEXTRA) $(CTUNING)
401
-CXXFLAGS :=         $(CDEFS) $(CINCS) -O$(OPT) -Wall    $(CEXTRA) $(CTUNING)
397
+CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CEXTRA) $(CTUNING) $(CSTANDARD)
398
+CXXFLAGS :=         $(CDEFS) $(CINCS) -O$(OPT) -Wall    $(CEXTRA) $(CTUNING) $(CXXSTANDARD)
402
 #ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
399
 #ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
403
 LDFLAGS = -lm
400
 LDFLAGS = -lm
404
 
401
 

Loading…
Cancel
Save