From f11432f06e29e81a319214c3bd873ab880bbaffa Mon Sep 17 00:00:00 2001 From: sorgelig Date: Mon, 16 Oct 2017 02:35:25 +0800 Subject: [PATCH] Use C99 option to support older gcc versions. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ea68904..1da6aef 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ OBJ = $(SRC:.c=.o) $(SRC2:.cpp=.o) DEP = $(SRC:.c=.d) $(SRC2:.cpp=.d) CFLAGS = $(DFLAGS) -c -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DVDATE=\"`date +"%y%m%d"`\" +CFLAGS2 = $(CFLAGS) -std=gnu99 LFLAGS = -lc -lstdc++ -lrt $(PRJ): $(OBJ) @@ -31,7 +32,7 @@ clean: %.o: %.c @$(info $<) - @$(CC) $(CFLAGS) -o $@ -c $< 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):\([0-9]\+\):/\1(\2,\ \3):/g' + @$(CC) $(CFLAGS2) -o $@ -c $< 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):\([0-9]\+\):/\1(\2,\ \3):/g' %.o: %.cpp @$(info $<)