From fbe9fdaa9b853fc6cf5e9fe7eda39654584e7fd5 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sun, 30 Jan 2022 20:26:28 +0100 Subject: [PATCH] #17 Add DGWRemoteControl --- DGWRemoteControl/Makefile | 27 +++++++++++++++++++++++++++ Makefile | 17 +++++++---------- 2 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 DGWRemoteControl/Makefile diff --git a/DGWRemoteControl/Makefile b/DGWRemoteControl/Makefile new file mode 100644 index 0000000..ca08e63 --- /dev/null +++ b/DGWRemoteControl/Makefile @@ -0,0 +1,27 @@ +SRCS = $(wildcard *.cpp) +OBJS = $(SRCS:.cpp=.o) +DEPS = $(SRCS:.cpp=.d) + +dgwremotecontrol: ../VersionInfo/GitVersion.h $(OBJS) ../DStarBase/DStarBase.a ../BaseCommon/BaseCommon.a + $(CC) $(CPPFLAGS) -o dgwremotecontrol $(OBJS) ../DStarBase/DStarBase.a ../BaseCommon/BaseCommon.a $(LDFLAGS) + +%.o : %.cpp + $(CC) -I../APRS -I../Common -I../BaseCommon -I../DStarBase -I../IRCDDB -I../VersionInfo $(CPPFLAGS) -MMD -MD -c $< -o $@ + +.PHONY clean: +clean: + $(RM) *.o *.d dgwremotecontrol.a + +.PHONY install: +install: dgwremotecontrol +# copy executable + @cp -f dgwremotecontrol $(BIN_DIR) + +# copy and adjust config + @cp -fn example.cfg $(CFG_DIR)/dgwremotecontrol.cfg + @sed -i "s|path=/var/log/dgwremotecontrol/|path=$(LOG_DIR)|g" $(CFG_DIR)/dgwremotecontrol.cfg + @sed -i "s|data=/usr/local/share/dgwremotecontrol.d/|data=$(DATA_DIR)|g" $(CFG_DIR)/dgwremotecontrol.cfg + +../BaseCommon/BaseCommon.a: +../DStarBase/DStarBase.a: +../VersionInfo/GitVersion.h: diff --git a/Makefile b/Makefile index fc595b6..1b56e12 100644 --- a/Makefile +++ b/Makefile @@ -38,18 +38,9 @@ export CPPFLAGS+= -DUSE_GPSD export LDFLAGS+= -lgps endif -SRCS = $(wildcard *.cpp) -OBJS = $(SRCS:.cpp=.o) -DEPS = $(SRCS:.cpp=.d) .PHONY: all -all: DStarGateway/dstargateway tests - -DStarGateway/dstargateway : VersionInfo/GitVersion.h $(OBJS) APRS/APRS.a Common/Common.a DStarBase/DStarBase.a IRCDDB/IRCDDB.a BaseCommon/BaseCommon.a - $(MAKE) -C DStarGateway - -%.o : %.cpp - $(CC) -IAPRS/ -IBaseCommon/ -IDStarBase/ -IIRCDDB/ -IVersionInfo/ $(CPPFLAGS) -MMD -MD -c $< -o $@ +all: DStarGateway/dstargateway DGWRemoteControl/dgwremotecontrol tests APRS/APRS.a: BaseCommon/BaseCommon.a FORCE $(MAKE) -C APRS @@ -63,6 +54,12 @@ BaseCommon/BaseCommon.a: FORCE DStarBase/DStarBase.a: BaseCommon/BaseCommon.a FORCE $(MAKE) -C DStarBase +DStarGateway/dstargateway : VersionInfo/GitVersion.h $(OBJS) APRS/APRS.a Common/Common.a DStarBase/DStarBase.a IRCDDB/IRCDDB.a BaseCommon/BaseCommon.a FORCE + $(MAKE) -C DStarGateway + +DGWRemoteControl/dgwremotecontrol: VersionInfo/GitVersion.h $(OBJS) DStarBase/DStarBase.a BaseCommon/BaseCommon.a FORCE + $(MAKE) -C DGWRemoteControl + IRCDDB/IRCDDB.a: VersionInfo/GitVersion.h BaseCommon/BaseCommon.a FORCE $(MAKE) -C IRCDDB