YSFClients/YSFGateway/Makefile

44 lines
1.2 KiB
Makefile
Raw Permalink Normal View History

2020-09-06 06:09:31 +02:00
CC = cc
CXX = c++
2020-06-21 18:38:34 +02:00
2020-06-21 18:45:37 +02:00
# Use the following CFLAGS and LIBS if you don't want to use gpsd.
CFLAGS = -g -O3 -Wall -DHAVE_LOG_H -std=c++0x -pthread
2020-06-21 18:45:37 +02:00
LIBS = -lm -lpthread
2020-06-21 18:38:34 +02:00
2020-06-21 18:45:37 +02:00
# Use the following CFLAGS and LIBS if you do want to use gpsd.
#CFLAGS = -g -O3 -Wall -DHAVE_LOG_H -DUSE_GPSD -std=c++0x -pthread
2020-06-25 11:12:38 +02:00
#LIBS = -lm -lpthread -lgps
2020-06-21 18:45:37 +02:00
2016-05-27 18:55:44 +02:00
LDFLAGS = -g
2020-06-01 13:03:34 +02:00
OBJECTS = APRSWriter.o Conf.o CRC.o DTMF.o FCSNetwork.o Golay24128.o GPS.o Log.o StopWatch.o Sync.o Thread.o Timer.o \
2020-06-03 13:41:00 +02:00
UDPSocket.o Utils.o WiresX.o YSFConvolution.o YSFFICH.o YSFGateway.o YSFNetwork.o YSFPayload.o YSFReflectors.o
2016-05-27 18:55:44 +02:00
2016-06-06 20:29:23 +02:00
all: YSFGateway
2016-05-27 18:55:44 +02:00
2016-06-06 20:29:23 +02:00
YSFGateway: $(OBJECTS)
$(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o YSFGateway
2016-05-27 18:55:44 +02:00
%.o: %.cpp
$(CXX) $(CFLAGS) -c -o $@ $<
YSFGateway.o: GitVersion.h FORCE
.PHONY: GitVersion.h
FORCE:
2020-06-25 11:12:38 +02:00
install:
install -m 755 YSFGateway /usr/local/bin/
2016-05-27 18:55:44 +02:00
clean:
$(RM) YSFGateway *.o *.d *.bak *~ GitVersion.h
2020-06-03 13:41:00 +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