Skip to content

Commit 00fc862

Browse files
update CFLAGS
only add -march=native and friends by default. If CFLAGS is erstwhile defined, then these are not added. This allows cross-compilation on more advanced machines to only add SIMD flags that are reasonable for less advanced targets
1 parent a3c6365 commit 00fc862

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Make.inc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ OBJ = src/transforms.c src/rotations.c src/permute.c src/tdc.c src/drivers.c src
4545

4646
machine := $(shell $(CC) -dumpmachine | cut -d'-' -f1)
4747

48-
CFLAGS += -std=gnu99 -Ofast
49-
ifneq (, $(findstring 86, $(machine)))
50-
CFLAGS += -march=native -mtune=native -mno-vzeroupper
48+
ifndef CFLAGS
49+
ifneq (, $(findstring 86, $(machine)))
50+
CFLAGS = -march=native -mtune=native -mno-vzeroupper
51+
endif
5152
endif
52-
CFLAGS += -I./src
53-
53+
CFLAGS += -Ofast -std=gnu99 -I./src
5454

5555
ifdef FT_PREFIX
5656
CFLAGS += -I$(FT_PREFIX)/include

0 commit comments

Comments
 (0)