#20 move install to respective makefiles

pull/32/head
Geoffrey Merck 4 years ago
parent feb5a95b5c
commit 5ec67b9f8a

@ -3,7 +3,8 @@ OBJS = $(SRCS:.cpp=.o)
DEPS = $(SRCS:.cpp=.d)
dgwtimeserver: ../VersionInfo/GitVersion.h $(OBJS) ../DStarBase/DStarBase.a ../BaseCommon/BaseCommon.a
$(CC) $(CPPFLAGS) -o dgwtimeserver $(OBJS) ../DStarBase/DStarBase.a ../BaseCommon/BaseCommon.a $(LDFLAGS)
# $(CC) $(CPPFLAGS) -o dgwtimeserver $(OBJS) ../DStarBase/DStarBase.a ../BaseCommon/BaseCommon.a $(LDFLAGS)
echo bla
%.o : %.cpp
$(CC) -I../BaseCommon -I../DStarBase -I../VersionInfo $(CPPFLAGS) -MMD -MD -c $< -o $@
@ -15,7 +16,7 @@ clean:
.PHONY install:
install: dgwtimeserver
# copy executable
@cp -f dgwtimeserver $(BIN_DIR)
# @cp -f dgwtimeserver $(BIN_DIR)
../BaseCommon/BaseCommon.a:
../DStarBase/DStarBase.a:

@ -22,6 +22,15 @@ install: dstargateway
@sed -i "s|path=/var/log/dstargateway/|path=$(LOG_DIR)|g" $(CFG_DIR)/dstargateway.cfg
@sed -i "s|data=/usr/local/share/dstargateway.d/|data=$(DATA_DIR)|g" $(CFG_DIR)/dstargateway.cfg
# SystemD service install
@cp -f ../debian/dstargateway.service /lib/systemd/system/
@sed -i "s|%CFG_DIR%|$(CFG_DIR)|g" /lib/systemd/system/dstargateway.service
systemctl enable dstargateway.service
@systemctl daemon-reload
@echo "\n"
@echo "DStarGateway Install complete, edit $(CFG_DIR)dstargateway.cfg and start the daemon with 'systemctl start dstargateway.service'"
@echo "\n"
../APRS/APRS.a:
../Common/Common.a:
../DStarBase/DStarBase.a:

@ -120,18 +120,9 @@ install : DStarGateway/dstargateway DGWRemoteControl/dgwremotecontrol
$(MAKE) -C Data install
@chown -R dstar:dstar $(DATA_DIR)
#install executables
# install services executables
$(MAKE) -C DStarGateway install
# SystemD service install
@cp -f debian/dstargateway.service /lib/systemd/system/
@sed -i "s|%CFG_DIR%|$(CFG_DIR)|g" /lib/systemd/system/dstargateway.service
systemctl enable dstargateway.service
@systemctl daemon-reload
@echo "\n\n"
@echo "Install complete, edit $(CFG_DIR)dstargateway.cfg and start the daemon with 'systemctl start dstargateway.service'"
@echo "\n\n"
.PHONY: uninstall
uninstall :
systemctl stop dstargateway.service || true

Loading…
Cancel
Save

Powered by TurnKey Linux.