Skip to content

Commit

Permalink
Update Makefile to conform to OpenHornet directory layout. Use ROOTDI…
Browse files Browse the repository at this point in the history
…R instead of relative directories
  • Loading branch information
calvintatari committed Mar 15, 2024
1 parent 950de62 commit 0e5f3af
Show file tree
Hide file tree
Showing 28 changed files with 114 additions and 109 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
*.bak
.venv/
.DS_Store
~*.*
doxyHtml
doc
html
docs/html
release/
embedded/**/build/
5 changes: 4 additions & 1 deletion embedded/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
MAKEFILES = $(wildcard **/Makefile)
MAKEFILES = $(wildcard */*/Makefile)
SKETCHES := $(dir $(MAKEFILES))
ROOTDIR := $(abspath $(CURDIR)/..)
RELEASE_DIR := $(abspath $(CURDIR)/../release)

export

all: $(SKETCHES)

$(SKETCHES):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH1_Upper_Instrument_Panel/1A3-L_DDI_AND_EWI/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH1_Upper_Instrument_Panel/1A6-SPIN_RCVY_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH1_Upper_Instrument_Panel/1A7-HUD_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH3_Center_Tub/3A2A1-SEAT_CONTROLS/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 ArduinoJoystickLibrary
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire ArduinoJoystickLibrary

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH4_Left_Console/4A2A1-LDG_GEAR_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH4_Left_Console/4A3A1-SELECT_JETT_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH4_Left_Console/4A4A2-EXT_LIGHTS_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH4_Left_Console/4A5A1-FUEL_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH4_Left_Console/4A5A2-APU_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH4_Left_Console/4A6A1-FCS_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH4_Left_Console/4A7A1-COMM_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire

# Uncomment one of the following to choose the target board
include ../../include/mega2560.mk
# include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
include $(ROOTDIR)/include/mega2560.mk
# include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH4_Left_Console/4A7A2-OBOGS_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH5_Right_Console/5A10-DEFOG_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 ArduinoJoystickLibrary
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire ArduinoJoystickLibrary

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH5_Right_Console/5A6A1-INTR_LT_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 ArduinoJoystickLibrary
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire ArduinoJoystickLibrary

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH5_Right_Console/5A7A1-SNSR_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 ArduinoJoystickLibrary
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire ArduinoJoystickLibrary

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH5_Right_Console/5A8A1-SIM_CNTL_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 ArduinoJoystickLibrary
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire ArduinoJoystickLibrary

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/OH5_Right_Console/5A9A1-KY58_PANEL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 ArduinoJoystickLibrary
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire ArduinoJoystickLibrary

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
10 changes: 5 additions & 5 deletions embedded/templates/OHSketchTemplate/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 ArduinoJoystickLibrary
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library TCA9534 Wire ArduinoJoystickLibrary

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
# include $(ROOTDIR)/include/mega2560.mk
include $(ROOTDIR)/include/promicro.mk
# include $(ROOTDIR)/include/promini.mk
# include $(ROOTDIR)/include/s2mini.mk
6 changes: 3 additions & 3 deletions include/avr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
OBJDIR = build
# Set the compiled firmware filename to the directory name (OpenHornet component name)
TARGET = $(notdir $(CURDIR))
ARDUINO_SKETCHBOOK = $(dir $(realpath $(CURDIR)/..))
ARDMK_DIR = $(dir $(realpath $(CURDIR)/..))include/Arduino-Makefile
ARDUINO_SKETCHBOOK = $(ROOTDIR)
ARDMK_DIR = $(ROOTDIR)/include/Arduino-Makefile
ARDUINO_LIBS = $(LIBRARIES)

include $(dir $(realpath $(CURDIR)/..))include/openhornet.mk
include $(ROOTDIR)/include/openhornet.mk
include $(ARDMK_DIR)/Arduino.mk

release: all
Expand Down
8 changes: 4 additions & 4 deletions include/esp.mk
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ifndef ESP_ROOT
# Path to the ESP32 Arduino core.
ESP_ROOT = $(dir $(realpath $(CURDIR)/..))libraries/arduino-esp32
ESP_ROOT = $(ROOTDIR)/libraries/arduino-esp32
endif

LIBRARY_DIR = $(dir $(realpath $(CURDIR)/..))libraries
ESPMK_DIR = $(dir $(realpath $(CURDIR)/..))include/makeEspArduino
LIBRARY_DIR = $(ROOTDIR)/libraries
ESPMK_DIR = $(ROOTDIR)/include/makeEspArduino
# Include libraries from the libraries directory for linking.
CUSTOM_LIBS = $(LIBRARY_DIR)
# Exclude platform libraries to avoid compilation and linking errors.
Expand All @@ -18,7 +18,7 @@ MAIN_NAME = $(notdir $(CURDIR))
# Override them so that the debug build output doesn't fail.
BUILD_EXTRA_FLAGS = -DARDUINO_HOST_OS=\"linux\" -DARDUINO_FQBN=\"esp32:esp32:esp32s2\"

include $(dir $(realpath $(CURDIR)/..))include/openhornet.mk
include $(ROOTDIR)/include/openhornet.mk
include $(ESPMK_DIR)/makeEspArduino.mk


Expand Down
2 changes: 1 addition & 1 deletion include/mega2560.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BOARD_TAG = mega
BOARD_SUB = atmega2560

include $(dir $(realpath $(CURDIR)/..))include/avr.mk
include $(ROOTDIR)/include/avr.mk
2 changes: 1 addition & 1 deletion include/openhornet.mk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
RELEASE_DIR = $(dir $(realpath $(CURDIR)/..))release
RELEASE_DIR = $(ROOTDIR)/release
4 changes: 2 additions & 2 deletions include/promicro.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ifndef PROMICRO_DIR
PROMICRO_DIR = $(dir $(realpath $(CURDIR)/..))libraries/Arduino_Boards/sparkfun
PROMICRO_DIR = $(ROOTDIR)/libraries/Arduino_Boards/sparkfun
endif

ALTERNATE_CORE = promicro
Expand All @@ -14,4 +14,4 @@ BOOTLOADER_FILE = Caterina-promicro16.hex
ISP_PROG = usbasp
USB_PID = 0x9206

include $(dir $(realpath $(CURDIR)/..))include/avr.mk
include $(ROOTDIR)/include/avr.mk
2 changes: 1 addition & 1 deletion include/promini.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BOARD_TAG = pro
BOARD_SUB = 8MHzatmega328

include $(dir $(realpath $(CURDIR)/..))include/avr.mk
include $(ROOTDIR)/include/avr.mk
2 changes: 1 addition & 1 deletion include/s2mini.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
BOARD = lolin_s2_mini

include $(dir $(realpath $(CURDIR)/..))include/esp.mk
include $(ROOTDIR)/include/esp.mk

0 comments on commit 0e5f3af

Please sign in to comment.