From de621e8b93c5ff55adafd9bb9362f013f824014f Mon Sep 17 00:00:00 2001 From: heck Date: Thu, 26 Sep 2024 22:49:49 +0200 Subject: [PATCH] Build: Add Makefile for examples using the static lib LIBDIZZY \o/ --- examples/Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 examples/Makefile diff --git a/examples/Makefile b/examples/Makefile new file mode 100644 index 0000000..a3fb84a --- /dev/null +++ b/examples/Makefile @@ -0,0 +1,18 @@ +HERE:=$(dir $(lastword $(MAKEFILE_LIST))) +-include $(HERE)../Makefile.conf + +TARGET ?= main_blink +DEBUG ?= 0 + +LIBDIZZY_DIR ?= ../src/ +CXXFLAGS += -I$(LIBDIZZY_DIR) +LDFLAGS += -L$(LIBDIZZY_DIR)build/ +LDFLAGS += -ldizzy + +ALL_SRC = $(wildcard *.cc) +TARGET_SRC = $(TARGET).cc +MODULES_SRC = $(filter-out main_%,$(ALL_SRC)) +CXX_SRC = $(MODULES_SRC) $(TARGET_SRC) + +CXX_SOURCES = $(CXX_SRC) +include $(LIBDAISY_DIR)/core/Makefile