2019-10-22 22:48:04 +02:00
|
|
|
CC = cc
|
|
|
|
|
CXX = c++
|
2020-08-26 15:20:04 +02:00
|
|
|
|
|
|
|
|
# Use the following CFLAGS and LIBS if you don't want to use gpsd.
|
2020-09-09 12:45:23 +02:00
|
|
|
CFLAGS = -g -O3 -Wall -DHAVE_LOG_H -std=c++0x -pthread
|
2017-04-20 21:51:30 +02:00
|
|
|
LIBS = -lpthread
|
2020-08-26 15:20:04 +02:00
|
|
|
|
|
|
|
|
# Use the following CFLAGS and LIBS if you do want to use gpsd.
|
2020-09-09 12:45:23 +02:00
|
|
|
#CFLAGS = -g -O3 -Wall -DHAVE_LOG_H -DUSE_GPSD -std=c++0x -pthread
|
2020-08-26 15:20:04 +02:00
|
|
|
#LIBS = -lpthread -lgps
|
|
|
|
|
|
2017-04-20 21:51:30 +02:00
|
|
|
LDFLAGS = -g
|
|
|
|
|
|
2020-09-03 12:16:10 +02:00
|
|
|
OBJECTS = APRSWriter.o BPTC19696.o Conf.o CRC.o DMRCSBK.o DMRData.o DMRDataHeader.o DMREmbeddedData.o DMREMB.o DMRFullLC.o DMRGateway.o \
|
|
|
|
|
DMRLC.o DMRNetwork.o DMRSlotType.o DynVoice.o Golay2087.o GPSD.o Hamming.o Log.o MMDVMNetwork.o PassAllPC.o PassAllTG.o \
|
2021-03-20 13:03:19 +01:00
|
|
|
QR1676.o Reflectors.o RemoteControl.o Rewrite.o RewriteDstId.o RewriteDynTGNet.o RewriteDynTGRF.o RewritePC.o RewriteSrc.o RewriteSrcId.o \
|
2020-09-03 12:16:10 +02:00
|
|
|
RewriteTG.o RewriteType.o RS129.o SHA256.o StopWatch.o Sync.o Thread.o Timer.o UDPSocket.o Utils.o XLXVoice.o
|
2017-04-20 21:51:30 +02:00
|
|
|
|
|
|
|
|
all: DMRGateway
|
|
|
|
|
|
2017-05-23 10:07:44 +02:00
|
|
|
DMRGateway: GitVersion.h $(OBJECTS)
|
2017-04-20 21:51:30 +02:00
|
|
|
$(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o DMRGateway
|
|
|
|
|
|
|
|
|
|
%.o: %.cpp
|
|
|
|
|
$(CXX) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
2017-05-23 15:41:22 +02:00
|
|
|
DMRGateway.o: GitVersion.h FORCE
|
|
|
|
|
|
2017-05-23 15:20:06 +02:00
|
|
|
.PHONY: GitVersion.h
|
|
|
|
|
|
2017-05-23 15:41:22 +02:00
|
|
|
FORCE:
|
|
|
|
|
|
2017-04-20 21:51:30 +02:00
|
|
|
clean:
|
2017-05-23 10:07:44 +02:00
|
|
|
$(RM) DMRGateway *.o *.d *.bak *~ GitVersion.h
|
|
|
|
|
|
2020-06-25 11:00:57 +02:00
|
|
|
install:
|
|
|
|
|
install -m 755 DMRGateway /usr/local/bin/
|
|
|
|
|
|
2017-05-23 10:07:44 +02:00
|
|
|
# Export the current git version if the index file exists, else 000...
|
|
|
|
|
GitVersion.h:
|
|
|
|
|
ifneq ("$(wildcard .git/index)","")
|
|
|
|
|
echo "const char *gitversion = \"$(shell git rev-parse HEAD)\";" > $@
|
|
|
|
|
else
|
|
|
|
|
echo "const char *gitversion = \"0000000000000000000000000000000000000000\";" > $@
|
|
|
|
|
endif
|
|
|
|
|
|