From fd8d4ebf7352d8bd4ed0319f13fbbb6bb713afca Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Wed, 1 Jun 2022 15:14:40 +0000 Subject: [PATCH] - use own build system git-svn-id: http://moon:8086/svn/software/trunk/projects/mpsk_rx_gui@914 b431acfa-c32f-4a4a-93f1-934dc6c82436 --- JuceLibraryCode/Makefile | 3 - JuceLibraryCode/config.mk | 6 +- Makefile | 140 ++++---------------------------------- Radio/Makefile | 12 ++++ Radio/config.mk | 6 ++ Source/Makefile | 18 +++++ Source/config.mk | 8 +++ config.mk | 7 ++ 8 files changed, 71 insertions(+), 129 deletions(-) create mode 100644 Radio/Makefile create mode 100644 Radio/config.mk create mode 100644 Source/Makefile create mode 100644 Source/config.mk create mode 100644 config.mk diff --git a/JuceLibraryCode/Makefile b/JuceLibraryCode/Makefile index cba8ffe..c84e583 100644 --- a/JuceLibraryCode/Makefile +++ b/JuceLibraryCode/Makefile @@ -1,8 +1,5 @@ include ./config.mk -JUCE_PATH ?= $(realpath ../../../extlib/JUCE) -JUCE_MODULES := ${JUCE_PATH}/modules - NAME := Juce SOURCES := juce_audio_basics/juce_audio_basics.cpp diff --git a/JuceLibraryCode/config.mk b/JuceLibraryCode/config.mk index fb09cc7..9e93518 100644 --- a/JuceLibraryCode/config.mk +++ b/JuceLibraryCode/config.mk @@ -1,4 +1,8 @@ -MAKE_HOME := /home/jens/work/software/make +MAKE_HOME ?= /home/jens/work/software/make CONFIG ?= debug BUILD_DIR ?= ./build/${CONFIG} MAKEFLAGS += --no-print-directory + +JUCE_PATH ?= $(realpath ../../../extlib/JUCE) +JUCE_MODULES := ${JUCE_PATH}/modules + diff --git a/Makefile b/Makefile index 05de621..28f3880 100644 --- a/Makefile +++ b/Makefile @@ -1,128 +1,18 @@ -# -# There exist several targets which are by default empty and which can be -# used for execution of your targets. These targets are usually executed -# before and after some main targets. They are: -# -# .build-pre: called before 'build' target -# .build-post: called after 'build' target -# .clean-pre: called before 'clean' target -# .clean-post: called after 'clean' target -# .clobber-pre: called before 'clobber' target -# .clobber-post: called after 'clobber' target -# .all-pre: called before 'all' target -# .all-post: called after 'all' target -# .help-pre: called before 'help' target -# .help-post: called after 'help' target -# -# Targets beginning with '.' are not intended to be called on their own. -# -# Main targets can be executed directly, and they are: -# -# build build a specific configuration -# clean remove built files from a configuration -# clobber remove all built files -# all build all configurations -# help print help mesage -# -# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and -# .help-impl are implemented in nbproject/makefile-impl.mk. -# -# Available make variables: -# -# CND_BASEDIR base directory for relative paths -# CND_DISTDIR default top distribution directory (build artifacts) -# CND_BUILDDIR default top build directory (object files, ...) -# CONF name of current configuration -# CND_PLATFORM_${CONF} platform name (current configuration) -# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) -# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) -# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) -# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) -# CND_PACKAGE_NAME_${CONF} name of package (current configuration) -# CND_PACKAGE_PATH_${CONF} path to package (current configuration) -# -# NOCDDL +include ./config.mk +CXXFLAGS += -std=c++11 +TARGET_ARCH := -march=native -# Environment -MKDIR=mkdir -CP=cp -CCADMIN=CCadmin +LIBDIR := -L$(LIBSRC_PATH)/fir -L$(LIBSRC_PATH)/crc -L$(LIBSRC_PATH)/radio +LIBS := -lstdc++ -lm -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt -lradio -lfir -lcrc +LDFLAGS += $(TARGET_ARCH) $(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ +DEFINES += -DPROCESSOR_BUFFER_USE_EXCEPTIONS - -# build -build: .build-post - -.build-pre: -# Add your pre 'build' code here... - -.build-post: .build-impl -# Add your post 'build' code here... - - -# clean -clean: .clean-post - -.clean-pre: -# Add your pre 'clean' code here... - -.clean-post: .clean-impl -# Add your post 'clean' code here... - - -# clobber -clobber: .clobber-post - -.clobber-pre: -# Add your pre 'clobber' code here... - -.clobber-post: .clobber-impl -# Add your post 'clobber' code here... - - -# all -all: .all-post - -.all-pre: -# Add your pre 'all' code here... - -.all-post: .all-impl -# Add your post 'all' code here... - - -# build tests -build-tests: .build-tests-post - -.build-tests-pre: -# Add your pre 'build-tests' code here... - -.build-tests-post: .build-tests-impl -# Add your post 'build-tests' code here... - - -# run tests -test: .test-post - -.test-pre: build-tests -# Add your pre 'test' code here... - -.test-post: .test-impl -# Add your post 'test' code here... - - -# help -help: .help-post - -.help-pre: -# Add your pre 'help' code here... - -.help-post: .help-impl -# Add your post 'help' code here... - - - -# include project implementation makefile -include nbproject/Makefile-impl.mk - -# include project make variables -include nbproject/Makefile-variables.mk +all: app +app: objects link +objects: + @$(MAKE) -C JuceLibraryCode BUILD_DIR=$(BUILD_DIR) + @$(MAKE) -C Source BUILD_DIR=$(BUILD_DIR) + @$(MAKE) -C Radio BUILD_DIR=$(BUILD_DIR) + +include $(MAKE_HOME)/compile.mk diff --git a/Radio/Makefile b/Radio/Makefile new file mode 100644 index 0000000..92d01d0 --- /dev/null +++ b/Radio/Makefile @@ -0,0 +1,12 @@ +include ./config.mk + +NAME := Radio + +CXX_SRCS := $(LIBSRC_PATH)/cpp/radio/Formatter.cpp +CXX_SRCS += $(LIBSRC_PATH)/cpp/radio/Symbolizer.cpp +CXX_SRCS += $(LIBSRC_PATH)/cpp/radio/Scrambler.cpp +CXX_SRCS += $(LIBSRC_PATH)/cpp/radio/Frame.cpp + +INCLUDES += -I $(LIBSRC_PATH)/cpp -I $(LIBSRC_PATH) + +include $(MAKE_HOME)/compile.mk diff --git a/Radio/config.mk b/Radio/config.mk new file mode 100644 index 0000000..6ee737d --- /dev/null +++ b/Radio/config.mk @@ -0,0 +1,6 @@ +MAKE_HOME ?= /home/jens/work/software/make +CONFIG ?= debug +BUILD_DIR ?= ./build/${CONFIG} +MAKEFLAGS += --no-print-directory + +LIBSRC_PATH ?= $(realpath ../../../libsrc) diff --git a/Source/Makefile b/Source/Makefile new file mode 100644 index 0000000..c699132 --- /dev/null +++ b/Source/Makefile @@ -0,0 +1,18 @@ +include ./config.mk + +NAME := Source + +SOURCES := GraphComponent.cpp +SOURCES += LogComponent.cpp +SOURCES += Receiver.cpp +SOURCES += Transmitter.cpp +SOURCES += ControlComponent.cpp +SOURCES += IQPoint.cpp +SOURCES += IQPlaneComponent.cpp +SOURCES += MainComponent.cpp +SOURCES += Main.cpp + +CXX_SRCS += $(SOURCES) +INCLUDES += -I . -I $(realpath ../JuceLibraryCode) -I $(JUCE_PATH) -I $(LIBSRC_PATH) -I $(EIGEN_PATH) + +include $(MAKE_HOME)/compile.mk diff --git a/Source/config.mk b/Source/config.mk new file mode 100644 index 0000000..699d07e --- /dev/null +++ b/Source/config.mk @@ -0,0 +1,8 @@ +MAKE_HOME ?= /home/jens/work/software/make +CONFIG ?= debug +BUILD_DIR ?= ./build/${CONFIG} +MAKEFLAGS += --no-print-directory + +JUCE_PATH ?= $(realpath ../../../extlib/JUCE) +LIBSRC_PATH ?= $(realpath ../../../libsrc) +EIGEN_PATH ?= $(realpath ../../../extlib/eigen) diff --git a/config.mk b/config.mk new file mode 100644 index 0000000..345ed56 --- /dev/null +++ b/config.mk @@ -0,0 +1,7 @@ +MAKE_HOME ?= /home/jens/work/software/make +CONFIG ?= debug +TARGET ?= mpsk_receiver +BUILD_DIR ?= $(CURDIR)/build/${CONFIG} +MAKEFLAGS += --no-print-directory + +LIBSRC_PATH ?= $(realpath ../../libsrc)