YSFClients/DGIdGateway/Makefile

45 lines
1.1 KiB
Makefile
Raw Permalink Normal View History

2020-09-06 17:26:36 +02:00
CC = cc
CXX = c++
2020-08-19 14:01:40 +02:00
# Use the following CFLAGS and LIBS if you don't want to use gpsd.
2020-11-02 15:56:06 +01:00
CFLAGS = -g -O3 -Wall -DHAVE_LOG_H -std=c++0x -pthread
2020-08-19 14:01:40 +02:00
LIBS = -lm -lpthread
# Use the following CFLAGS and LIBS if you do want to use gpsd.
2020-11-02 15:56:06 +01:00
#CFLAGS = -g -O3 -Wall -DHAVE_LOG_H -DUSE_GPSD -std=c++0x -pthread
2020-08-19 14:01:40 +02:00
#LIBS = -lm -lpthread -lgps
LDFLAGS = -g
2020-08-19 17:09:41 +02:00
OBJECTS = APRSWriter.o Conf.o CRC.o DGIdGateway.o DGIdNetwork.o FCSNetwork.o Golay24128.o GPS.o IMRSNetwork.o \
2020-09-28 10:59:43 +02:00
Log.o StopWatch.o Sync.o Thread.o Timer.o UDPSocket.o Utils.o YSFConvolution.o YSFFICH.o YSFNetwork.o \
YSFPayload.o YSFReflectors.o
2020-08-19 14:01:40 +02:00
all: DGIdGateway
DGIdGateway: $(OBJECTS)
$(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o DGIdGateway
%.o: %.cpp
$(CXX) $(CFLAGS) -c -o $@ $<
DGIdGateway.o: GitVersion.h FORCE
.PHONY: GitVersion.h
FORCE:
2020-08-19 14:01:40 +02:00
install:
install -m 755 DGIdGateway /usr/local/bin/
clean:
$(RM) DGIdGateway *.o *.d *.bak *~ GitVersion.h
GitVersion.h:
ifneq ("$(wildcard ../.git/index)","")
echo "const char *gitversion = \"$(shell git rev-parse HEAD)\";" > $@
else
echo "const char *gitversion = \"0000000000000000000000000000000000000000\";" > $@
endif