Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (40 sloc) 1.6 KB
# This is the makefile for the Adafruit SSD1306 OLED library driver
# 02/18/2013 Charles-Henri Hallard (
# Modified for compiling and use on Raspberry ArduiPi Board
# LCD size and connection are now passed as arguments on
# the command line (no more #define on compilation needed)
# ArduiPi project documentation
# 08/26/2015 Lorenzo Delana (
# added bananapi specific CCFLAGS and conditional macro BANANPI
# *********************************************************************
# Makefile itself dir
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
# hw platform as from choose
HWPLAT:=$(shell cat $(ROOT_DIR)/../hwplatform)
# sets CCFLAGS hw platform dependant
ifeq ($(HWPLAT),BananaPI)
CCFLAGS=-Wall -Ofast -mfpu=vfpv4 -mfloat-abi=hard -march=armv7 -mtune=cortex-a7 -DBANANAPI
else # fallback to raspberry
# The recommended compiler flags for the Raspberry Pi
CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s
prefix := /usr/local
# define all programs
PROGRAMS = toast
all: ${PROGRAMS}
g++ ${CCFLAGS} -Wall -lArduiPi_OLED $@.cpp -o $@
rm -rf $(PROGRAMS)
install: all
test -d $(prefix) || mkdir $(prefix)
test -d $(prefix)/bin || mkdir $(prefix)/bin
for prog in $(PROGRAMS); do \
install -m 0755 $$prog $(prefix)/bin; \
.PHONY: install
You can’t perform that action at this time.