Skip to content

Commit

Permalink
Fix example Makefile for non-RPi
Browse files Browse the repository at this point in the history
- Thanks to @desertgourd for identifying issue
  • Loading branch information
TMRh20 committed Mar 4, 2015
1 parent c1c3a45 commit ebc57bd
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions examples_RPi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,18 @@
#
prefix := /usr/local

# 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)
ifneq "${RPI}" "1"
RPI=$(shell cat /proc/cpuinfo | grep Hardware | grep -c BCM2709)
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=
CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -std=c++0x
endif


# define all programs
PROGRAMS = rx-test helloworld_rx helloworld_tx
Expand Down

1 comment on commit ebc57bd

@TMRh20
Copy link
Member Author

@TMRh20 TMRh20 commented on ebc57bd Mar 4, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#42

Please sign in to comment.