# Compiler to use g++ = g++ -Wall # Where are things located INC_DIR=inc SRC_DIR=src # What the final executable is called EXE_NAME=crazyflieGroundStation # All the libraries needed LIBS=-lquat -lvrpn -lpthread -lusb-1.0 -lbluetooth # The compile flags FLAGS=-g -o0 -Wall # Determine what source files exist STRUCTURE := $(shell find $(SRC_DIR) -type d) ALL_FILES := $(addsuffix /*,$(STRUCTURE)) ALL_FILES := $(wildcard $(ALL_FILES)) SRC_FILES := $(filter %.cpp,$(ALL_FILES)) SRC_FILES += $(filter %.cc,$(ALL_FILES)) all: $(g++) -I$(INC_DIR) $(FLAGS) -o $(EXE_NAME) $(SRC_FILES) $(LIBS) clean: rm -f *.o $(EXE_NAME) rm -f test_connection test: gcc -g -o test_connection test_connection.c serial: cd src/serial && make serial_clean: cd serial && make clean