|
|
@ -8,15 +8,42 @@ LDFLAGS=-L/usr/local/lib -llvtk_plugin2 |
|
|
|
ifeq ($(ARCH),) |
|
|
|
ifeq ($(ARCH),) |
|
|
|
ARCH := $(shell uname -m)
|
|
|
|
ARCH := $(shell uname -m)
|
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
|
machine = $(shell sh -c 'uname -m 2>/dev/null || echo unknown')
|
|
|
|
|
|
|
|
|
|
|
|
ifneq ($(findstring armv7,$(ARCH)),) |
|
|
|
# Raspberry Pi B+, Zero, etc
|
|
|
|
CXXFLAGS += -mfpu=neon -march=armv7-a -marm
|
|
|
|
ifneq (,$(findstring armv6l,$(machine))) |
|
|
|
|
|
|
|
CPU = -mcpu=arm1176jzf-s
|
|
|
|
|
|
|
|
FPU = -mfpu=vfp
|
|
|
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Raspberry Pi 2 and 3
|
|
|
|
|
|
|
|
ifneq (,$(findstring armv7l,$(machine))) |
|
|
|
|
|
|
|
model = $(shell sh -c 'cat /sys/firmware/devicetree/base/model 2>/dev/null || echo unknown')
|
|
|
|
|
|
|
|
ifneq (,$(findstring 3,$(model))) |
|
|
|
|
|
|
|
CPU = -mcpu=cortex-a53
|
|
|
|
|
|
|
|
FPU = -mfpu=neon-fp-armv8
|
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
CPU = -mcpu=cortex-a7 -mthumb
|
|
|
|
|
|
|
|
FPU = -mfpu=neon-vfpv4
|
|
|
|
|
|
|
|
endif |
|
|
|
|
|
|
|
FPU += -mneon-for-64bits
|
|
|
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ARM A64
|
|
|
|
|
|
|
|
ifneq (,$(findstring aarch64,$(machine))) |
|
|
|
|
|
|
|
CPU = -mcpu=cortex-a53
|
|
|
|
|
|
|
|
PLATFORM += -mabi=lp64 -mcmodel=tiny
|
|
|
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ifneq ($(findstring arm,$(ARCH)),) |
|
|
|
|
|
|
|
CXXFLAGS += -DRASPI
|
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(DEBUG), 1) |
|
|
|
ifeq ($(DEBUG), 1) |
|
|
|
CXXFLAGS += -DDEBUG $(CFLAGS)
|
|
|
|
CXXFLAGS += -DDEBUG $(CFLAGS)
|
|
|
|
else |
|
|
|
else |
|
|
|
CXXFLAGS += -Ofast $(CFLAGS)
|
|
|
|
#CXXFLAGS += -Ofast $(CFLAGS) -DRASPI
|
|
|
|
|
|
|
|
CXXFLAGS += -Ofast $(CFLAGS) $(CPU) $(FPU)
|
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
all: $(BUNDLE) Makefile |
|
|
|
all: $(BUNDLE) Makefile |
|
|
|