forked from ralph-irving/squeezelite
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.sc-rpi-ux-all
54 lines (40 loc) · 1.15 KB
/
Makefile.sc-rpi-ux-all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# RPI makefile for UX systems that autodetects
# - bitdepth of system
# - RPi standard and CM models 3,4,5
# and applies optimal processor specific compiler options
SHELL := /bin/sh
bitd_s := $(shell getconf LONG_BIT)
#RPI5
CPART := $(shell cat /proc/cpuinfo | grep part | grep -q 0xd0b && echo cortex-a76)
#RPI4
ifndef CPART
CPART := $(shell cat /proc/cpuinfo | grep part | grep -q 0xd08 && echo cortex-a72)
endif
#RPI3
ifndef CPART
CPART := $(shell cat /proc/cpuinfo | grep part | grep -q 0xd03 && echo cortex-a53)
endif
ifndef CPART
$(error "Problems identifiying RPi 3,4 or 5!")
endif
#RPI5
ifeq ($(CPART),cortex-a76)
MARCH := -march=armv8.2-a+crypto+fp16+rcpc+dotprod
#RPI4
else ifeq ($(CPART),cortex-a72)
MARCH := -march=armv8-a+crc
endif
MTUNE := -mtune=$(CPART)
ifeq ($(bitd_s),64)
TUNEOPTS :=
else ifeq ($(bitd_s),32)
TUNEOPTS := -mfpu=neon-fp-armv8 -mfloat-abi=hard
endif
# $(info bitd_s=$(bitd_s))
# $(info rpi_m=$(rpi_m))
# $(info TUNEOPTS=$(TUNEOPTS))
# $(info MARCH=$(MARCH))
# $(info MTUNE=$(MTUNE))
OPTS = -DLINKALL -DRESAMPLE -DDSD
CFLAGS = -Wall -fPIC -O3 $(MARCH) $(MTUNE) $(TUNEOPTS) -pipe
include Makefile.sc-rpi-ux