FIX: fixes some off missing chars, now the @GCC_GTEQ_490 contains a 1 or 0.

ADD:  makefile,   print-%,   added an easy way to output Makefile variables,   you call make with the var you want to print like this::      make print-GCC_GTEQ_490
This commit is contained in:
iceman1001 2017-08-23 08:12:07 +02:00
parent 2c198f75f5
commit dc202ee498

View file

@ -199,7 +199,7 @@ MULTIARCHOBJS = $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_NOSIMD.o) \
$(MULTIARCHSRCS:%.c=$(OBJDIR)/%_AVX2.o)
#GCC_GTEQ_490 := $(shell expr `gcc -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40900)
GCC_GTEQ_490 := $(shell expr `gcc --version | awk '/gcc/{print $NF;}' | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` >= 40900)
GCC_GTEQ_490 := $(shell expr `gcc --version | awk '/gcc/{print $$NF;}' | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40900)
HARD_SWITCH_NOSIMD = -mno-mmx -mno-sse2 -mno-avx -mno-avx2
HARD_SWITCH_MMX = -mmmx -mno-sse2 -mno-avx -mno-avx2
@ -262,6 +262,7 @@ lua_build:
cd ../liblua && make $(LUAPLATFORM)
.PHONY: all clean
print-%: ; @echo $* = $($*)
$(OBJDIR)/%_NOSIMD.o : %.c $(OBJDIR)/%.d
$(CC) $(DEPFLAGS) $(CFLAGS) $(HARD_SWITCH_NOSIMD) -c -o $@ $<