SkyLok/chip_test_example/Makefile
2026-05-21 15:23:13 +02:00

29 lines
601 B
Makefile

# Build on device:
# apt install g++
# make
# All deps (spidev, gpiochip, i2c-dev, termios) are kernel headers — no apt libs needed.
CXX ?= g++
CXXFLAGS ?= -O2 -std=c++17 -Wall -Wextra
TARGETS = lora_tx lora_rx imu_test gps_test
all: $(TARGETS)
lora_tx: lora_tx.cpp lr1121_malnus.hpp
$(CXX) $(CXXFLAGS) $< -lpthread -o $@
lora_rx: lora_rx.cpp lr1121_malnus.hpp
$(CXX) $(CXXFLAGS) $< -lpthread -o $@
imu_test: imu_test.cpp icm20948.hpp
$(CXX) $(CXXFLAGS) $< -lpthread -o $@
gps_test: gps_test.cpp gps.hpp
$(CXX) $(CXXFLAGS) $< -o $@
clean:
rm -f $(TARGETS)
.PHONY: all clean