-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (41 loc) · 1.64 KB
/
Makefile
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
#*********************************************************************
# This is the makefile for the Adafruit SSD1306 OLED library driver
#
# 02/18/2013 Charles-Henri Hallard (http://hallard.me)
# 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 http://hallard.me/arduipi
#
# 08/26/2015 Lorenzo Delana ([email protected])
# added bananapi specific CCFLAGS and conditional macro BANANPI
#
# *********************************************************************
# Makefile itself dir
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
# hw platform as from autogen.sh 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=-g -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s
CCFLAGS=-Wall -g
endif
prefix := /usr/local
# define all programs
PROGRAMS = statusd
SOURCES = ${PROGRAMS:=.cpp}
all: ${PROGRAMS}
${PROGRAMS}: ${SOURCES}
g++ ${CCFLAGS} -Wall -lArduiPi_OLED [email protected] -o $@
clean:
rm -rf $(PROGRAMS)
install: all
test -d $(prefix) || mkdir $(prefix)
test -d $(prefix)/sbin || mkdir $(prefix)/sbin
for prog in $(PROGRAMS); do \
install -m 0755 $$prog $(prefix)/sbin; \
done
.PHONY: install