mirror of https://github.com/n7tae/tcd.git
parent
a80c6fcc4a
commit
07deaa2a58
@ -0,0 +1,30 @@
|
|||||||
|
// urfd -- The universal reflector
|
||||||
|
// Copyright © 2021 Thomas A. Early N7TAE
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
#include "Controller.h"
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
CController controller;
|
||||||
|
if (controller.Start())
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
|
controller.Stop();
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
#Copyright (C) 2021 by Thomas A. Early, N7TAE
|
||||||
|
|
||||||
|
include configure.mk
|
||||||
|
|
||||||
|
# If you are going to change this path, you will
|
||||||
|
# need to update the systemd service script
|
||||||
|
BINDIR = /usr/local/bin
|
||||||
|
|
||||||
|
GCC = g++
|
||||||
|
|
||||||
|
ifeq ($(debug), true)
|
||||||
|
CFLAGS = -ggdb3 -W -Werror -Icodec2 -MMD -MD -std=c++11
|
||||||
|
else
|
||||||
|
CFLAGS = -W -Werror -Icodec2 -MMD -MD -std=c++11
|
||||||
|
endif
|
||||||
|
|
||||||
|
LDFLAGS = -pthread
|
||||||
|
|
||||||
|
SRCS = $(wildcard *.cpp) $(wildcard codec2/*.cpp)
|
||||||
|
OBJS = $(SRCS:.cpp=.o)
|
||||||
|
DEPS = $(SRCS:.cpp=.d)
|
||||||
|
EXE = tcd
|
||||||
|
|
||||||
|
$(EXE) : $(OBJS)
|
||||||
|
$(GCC) $(LDFLAGS) $(OBJS) -o $@
|
||||||
|
|
||||||
|
%.o : %.cpp
|
||||||
|
$(GCC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
clean :
|
||||||
|
$(RM) $(EXE) $(OBJS) $(DEPS)
|
||||||
|
|
||||||
|
-include $(DEPS)
|
||||||
|
|
||||||
|
# The install and uninstall targets need to be run by root
|
||||||
|
install : $(EXE)
|
||||||
|
cp $(EXE) $(BINDIR)
|
||||||
|
cp ../systemd/$(EXE).service /etc/systemd/system/
|
||||||
|
systemctl enable $(EXE)
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl start $(EXE)
|
||||||
|
|
||||||
|
uninstall :
|
||||||
|
systemctl stop $(EXE)
|
||||||
|
systemctl disable $(EXE)
|
||||||
|
systemctl daemon-reload
|
||||||
|
rm -f /etc/systemd/system/$(EXE).service
|
||||||
|
rm -f $(BINDIR)/$(EXE)
|
||||||
|
systemctl daemon-reload
|
||||||
Loading…
Reference in new issue