[LON-CAPA-cvs] cvs: capa /capa51/pProj Makefile

raeburn raeburn at source.lon-capa.org
Mon Jul 13 10:06:56 EDT 2026


raeburn		Mon Jul 13 14:06:56 2026 EDT

  Modified files:              
    /capa/capa51/pProj	Makefile 
  Log:
  - Replace code added in rev 1.27 to test whether to include -std=gnu17 in 
    compiler flags with a better solution.
  
  
Index: capa/capa51/pProj/Makefile
diff -u capa/capa51/pProj/Makefile:1.27 capa/capa51/pProj/Makefile:1.28
--- capa/capa51/pProj/Makefile:1.27	Sun Jul  5 21:24:44 2026
+++ capa/capa51/pProj/Makefile	Mon Jul 13 14:06:56 2026
@@ -72,9 +72,9 @@
 IRIXFLAG=-O2 -DIRIX $(DEF)
 LinuxFLAG=-O2 -Wall $(DEF)
 
-GCCVER = $(shell gcc -dumpversion)
-GCCMIN = 15
-ifeq ($(GCCMIN),$(word 1,$(sort $(GCCMIN) $(GCCVER))))
+MIN_GCC_MAJOR = 15
+GCC_MEETS_COND := $(shell expr `gcc -dumpversion | cut -f1 -d.` \>= $(MIN_GCC_MAJOR))
+ifeq ($(GCC_MEETS_COND), 1)
   CCSTD = -std=gnu17
 endif
 




More information about the LON-CAPA-cvs mailing list