24 lines
530 B
Makefile
24 lines
530 B
Makefile
prefix := /usr/local
|
|
|
|
# Detect the Raspberry Pi by the existence of the bcm_host.h file
|
|
BCMLOC=/opt/vc/include/bcm_host.h
|
|
|
|
ifneq ("$(wildcard $(BCMLOC))","")
|
|
# The recommended compiler flags for the Raspberry Pi
|
|
CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s
|
|
endif
|
|
|
|
# define all programs
|
|
PROGRAM = spark_counter_receiver
|
|
SOURCES = ${PROGRAM:=.cpp} aes.c crc16.c
|
|
|
|
all: ${PROGRAM}
|
|
|
|
${PROGRAM}: ${SOURCES}
|
|
g++ ${CCFLAGS} -Wall -I. -lrf24-bcm -lcurl -o $@ $^
|
|
|
|
clean:
|
|
rm -rf $(PROGRAM)
|
|
|
|
.PHONY: install
|