Index

auto-plow / bccaf55

A wheelchair motor-propelled battery-powered ESP32-driven remote control snow plow.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
730 Nov 2018 18:36bccaf55Update Makefile for building ArduinoJoshua1287N

Blob @ auto-plow / Makefile

text/plain943 bytesdownload raw
1# Raspberry Pi settings
2CC = gcc --std=c11
3CCFLAGS = -Wall -Wextra -pedantic -O3 -g
4SOURCES = $(shell find src/rpi -name '*.c')
5OBJECTS = $(SOURCES:%.c=bin/%.o)
6OUT = autoplow
7
8
9# Arduino Settings
10F_CPU = 16000000L
11MCU = atmega328p
12ARDUINO_CC = avr-gcc
13ARDUINO_CXX = avr-g++
14ARDUINO_AR = avr-ar
15ARDUINO_FLAGS = -c -g -Os -Wall -Wextra -pedantic -MMD -ffunction-sections -fdata-sections -mmcu=$(MCU) -DF_CPU=$(F_CPU) -DUSB_VID=null -DUSB_PID=null -DARDUINO=106
16ARDUINO_CC_FLAGS = $(ARDUINO_FLAGS)
17ARDUINO_CPP_FLAGS = $(ARDUINO_FLAGS) -fno-exceptions
18ARDUINO_INCLUDE = "include/arduino/"
19ARD1_SOURCES = $(shell find src/ard1 -name '*.c')
20# ARD2_SOURCES = $(shell find src/ard2 -name '*.c')
21
22
23.PHONY: all ard1-build ard1-upload
24
25all: $(EXEC) $(OBJECTS)
26
27$(EXEC): $(OBJECTS)
28 $(CC) $(CXXFLAGS) $(OBJECTS) -o $(OUT)
29
30ard1-build: $(ARD1_SOURCES)
31 $(ARDUINO_CXX) $(ARDUINO_CC_FLAGS) -I$(ARDUINO_INCLUDE) $(ARD1_SOURCES) -o bin/$(ARD1_SOURCES:%.c=%.o)
32