YSFClients/YSFParrot/Makefile

35 lines
713 B
Makefile
Raw Permalink Normal View History

2020-09-06 06:09:31 +02:00
CC = cc
CXX = c++
2016-10-18 12:14:07 +02:00
CFLAGS = -g -O3 -Wall -std=c++0x -pthread
LIBS = -lpthread
2016-05-19 18:36:54 +02:00
LDFLAGS = -g
2018-01-29 23:07:08 +01:00
OBJECTS = Network.o Parrot.o StopWatch.o Thread.o Timer.o UDPSocket.o YSFParrot.o
2016-05-19 18:36:54 +02:00
all: YSFParrot
YSFParrot: $(OBJECTS)
$(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o YSFParrot
%.o: %.cpp
$(CXX) $(CFLAGS) -c -o $@ $<
YSFParrot.o: GitVersion.h FORCE
.PHONY: GitVersion.h
FORCE:
2020-06-25 11:12:38 +02:00
install:
install -m 755 YSFParrot /usr/local/bin/
2016-05-19 18:36:54 +02:00
clean:
$(RM) YSFParrot *.o *.d *.bak *~ GitVersion.h
2016-10-18 12:14:07 +02:00
GitVersion.h:
ifneq ("$(wildcard ../.git/index)","")
echo "const char *gitversion = \"$(shell git rev-parse HEAD)\";" > $@
else
echo "const char *gitversion = \"0000000000000000000000000000000000000000\";" > $@
endif