Browse Source

Build: Use the new heck_libdaisy build system

master
heck 8 months ago
parent
commit
4b483c4243
  1. 21
      Makefile.conf
  2. 4
      build.conf.example
  3. 24
      src/Makefile

21
Makefile.conf

@ -0,0 +1,21 @@
-include build.conf
FLASH_TARGET ?= main_osp
DEBUG ?= 0
LIBDAISY_DIR ?= ../../heck_libDaisy
DAISYSP_DIR ?= ../../heck_DaisySP
#LIBDIZZY_DIR ?= ../src/
#CXXFLAGS += -I$(LIBDIZZY_DIR)
#LDFLAGS += -L$(LIBDIZZY_DIR)
#LDFLAGS += -ldizzy
CXX_STANDARD ?= -std=c++17
CXXFLAGS += -Wall -Wno-unused -Wno-reorder-ctor -Wno-switch
CXXFLAGS += \
-fdiagnostics-color=always \
-fmessage-length=170 \
-fdiagnostics-path-format=inline-events \
-fdiagnostics-show-template-tree \

4
build.conf.example

@ -3,9 +3,9 @@
# remove this line, and tweak the values as you develop
# The program to compile and flash
# the name of the main cxx file without the prefix 'main_'
# the name of the main cxx file without the suffix
TARGET ?= osp
#FLASH_TARGET ?= main_osp
DEBUG ?= 0
# dependencies relative to dir 'src'

24
src/Makefile

@ -1,21 +1,7 @@
-include ../build.conf
HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
include $(HERE)../Makefile.conf
TARGET ?= osp
DEBUG ?= 0
LIBDAISY_DIR ?= ../../heck_libDaisy
DAISYSP_DIR ?= ../../heck_DaisySP
#TARGET_LIB =
CXX_STANDARD ?= -std=c++17
CXXFLAGS += -Wall -Wno-unused -Wno-reorder-ctor -Wno-switch
CXXFLAGS += -fdiagnostics-color=always
# Eval all sources with exactly one main() based on TARGET
ALL_SRC = $(wildcard *.cc)
TARGET_SRC = main_$(TARGET).cc
MODULES_SRC = $(filter-out main_%,$(ALL_SRC))
CXX_SRC = $(MODULES_SRC) $(TARGET_SRC)
CXX_SOURCES = $(CXX_SRC)
include $(LIBDAISY_DIR)/core/Makefile
SOURCES := $(wildcard *)
include $(LIBDAISY_DIR)/core/Makefile

Loading…
Cancel
Save