You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7 KiB

#copyright(C) 2020 by Thomas A. Early, N7TAE
#################################################################
# Here is the only things you might need to change
ip = 127.0.0.1
# set to true for debugging support
debug = false
#################################################################
# If you are going to change this path, you will
# need to update the systemd service script
BINDIR = /usr/local/bin
GCC = g++
# uncomment the next line to enable gdb debugging help
#DEBUG=true
CFLAGS = -W -MMD -MD -std=c++11
ifeq ($(debug), true)
CFLAGS+=-ggdb3
endif
CFLAGS += -DIP_ADDR=\"$(ip)\"
LDFLAGS = -pthread
SRCS = cagc.cpp cbuffer.cpp cfirfilter.cpp cip.cpp csignalprocessor.cpp cusb3003hrinterface.cpp cvocodecchannel.cpp cvoicepacket.cpp cambepacket.cpp ccallsign.cpp cfixedgain.cpp cpacket.cpp cstream.cpp cusb3000interface.cpp cusb3003interface.cpp cvocodecinterface.cpp main.cpp cambeserver.cpp ccontroller.cpp cftdidevicedescr.cpp cpacketqueue.cpp ctimepoint.cpp cusb3003df2etinterface.cpp cusb3xxxinterface.cpp cvocodecs.cpp cudpsocket.cpp
OBJS = $(SRCS:.cpp=.o)
DEPS = $(SRCS:.cpp=.d)
EXE = ambed
$(EXE) : $(OBJS)
$(GCC) $(LDFLAGS) $(OBJS) -lftd2xx -Wl,-rpath,/usr/local/lib -o $@
%.o : %.cpp
$(GCC) $(CFLAGS) -c $< -o $@
clean :
$(RM) $(EXE) *.o *.d
-include $(DEPS)
# The install and uninstall targets need to be run by root
install : $(EXE) $(EXE).service
cp $(EXE) $(BINDIR)
cp $(EXE).service /etc/systemd/system/
systemctl enable ambed
systemctl daemon-reload
systemctl start ambed
uninstall :
systemctl stop ambed
systemctl disable ambed
systemctl daemon-reload
rm -f /etc/systemd/system/ambed.service
rm -f $(BINDIR)/ambed
systemctl daemon-reload

Powered by TurnKey Linux.