From 4051af860ee7daa5495cf724e2675fc20739a464 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sat, 28 May 2022 13:30:38 +0000 Subject: [PATCH] - upd git-svn-id: http://moon:8086/svn/software/trunk/libsrc/cpp@882 b431acfa-c32f-4a4a-93f1-934dc6c82436 --- radio/processor/Makefile | 74 ++++++++-------------------------------- 1 file changed, 15 insertions(+), 59 deletions(-) diff --git a/radio/processor/Makefile b/radio/processor/Makefile index 00db7fc..afc1736 100644 --- a/radio/processor/Makefile +++ b/radio/processor/Makefile @@ -1,69 +1,25 @@ -######################################################################## -####################### Makefile Template ############################## -######################################################################## +MAKE_HOME := /home/jens/work/software/make -# Compiler settings - Can be customized. -CC = g++ -CXXFLAGS = -std=c++11 -Wall -LDFLAGS = +CONFIG ?= debug +TARGET ?= main +BUILD_DIR := ./build/${CONFIG} -# Makefile settings - Can be customized. -APPNAME = myapp -EXT = .cpp -SRCDIR = src -OBJDIR = obj +include ./processor.mk -############## Do not change anything from here downwards! ############# -SRC = $(wildcard $(SRCDIR)/*$(EXT)) -OBJ = $(SRC:$(SRCDIR)/%$(EXT)=$(OBJDIR)/%.o) -DEP = $(OBJ:$(OBJDIR)/%.o=%.d) -# UNIX-based OS variables & settings -RM = rm -DELOBJ = $(OBJ) -# Windows OS variables & settings -DEL = del -EXE = .exe -WDELOBJ = $(SRC:$(SRCDIR)/%$(EXT)=$(OBJDIR)\\%.o) +CXX_SRCS += test/main.cpp test/test01.cpp test/test02.cpp test/TestBlock.cpp test/NullSource.cpp test/NullSink.cpp +LIBS := -lstdc++ -lm -larmadillo +DEFINES += -DPROCESSOR_BUFFER_USE_EXCEPTIONS -######################################################################## -####################### Targets beginning here ######################### -######################################################################## +SRCS := ${CXX_SRCS} ${GCC_SRCS} -all: $(APPNAME) - -# Builds the app -$(APPNAME): $(OBJ) - $(CC) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) - -# Creates the dependecy rules -%.d: $(SRCDIR)/%$(EXT) - @$(CPP) $(CFLAGS) $< -MM -MT $(@:%.d=$(OBJDIR)/%.o) >$@ - -# Includes all .h files --include $(DEP) - -# Building rule for .o files and its .c/.cpp in combination with all .h -$(OBJDIR)/%.o: $(SRCDIR)/%$(EXT) - $(CC) $(CXXFLAGS) -o $@ -c $< - -################### Cleaning rules for Unix-based OS ################### -# Cleans complete project .PHONY: clean +all: ${BUILD_DIR}/${TARGET} + clean: - $(RM) $(DELOBJ) $(DEP) $(APPNAME) + rm -rf ${BUILD_DIR}/* -# Cleans only all files with the extension .d -.PHONY: cleandep -cleandep: - $(RM) $(DEP) +distclean: + rm -rf ${BUILD_DIR} -#################### Cleaning rules for Windows OS ##################### -# Cleans complete project -.PHONY: cleanw -cleanw: - $(DEL) $(WDELOBJ) $(DEP) $(APPNAME)$(EXE) -# Cleans only all files with the extension .d -.PHONY: cleandepw -cleandepw: - $(DEL) $(DEP) \ No newline at end of file +include $(MAKE_HOME)/compile.mk