Skip to content

Commit

Permalink
RPI2 autodetection in ncurses example
Browse files Browse the repository at this point in the history
  • Loading branch information
yozik04 committed Dec 23, 2015
1 parent 91c0ba3 commit 5e9c030
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples_RPi/ncurses/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
#
prefix := /usr/local

ARCH=armv6zk
ifeq "$(shell uname -m)" "armv7l"
ARCH=armv7-a
endif

# Detect the Raspberry Pi from cpuinfo
#Count the matches for BCM2708 or BCM2709 in cpuinfo
RPI=$(shell cat /proc/cpuinfo | grep Hardware | grep -c BCM2708)
Expand All @@ -21,7 +26,7 @@ endif

ifeq "$(RPI)" "1"
# The recommended compiler flags for the Raspberry Pi
CCFLAGS+=-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s
CCFLAGS+=-Ofast -mfpu=vfp -mfloat-abi=hard -march=$(ARCH) -mtune=arm1176jzf-s
endif

# define all programs
Expand Down

0 comments on commit 5e9c030

Please sign in to comment.