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 $@ $<
|
|
|
|
|
2022-01-07 15:35:27 +01:00
|
|
|
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:
|
2022-01-07 15:35:27 +01:00
|
|
|
$(RM) YSFParrot *.o *.d *.bak *~ GitVersion.h
|
2016-10-18 12:14:07 +02:00
|
|
|
|
2022-01-07 15:35:27 +01:00
|
|
|
GitVersion.h:
|
|
|
|
ifneq ("$(wildcard ../.git/index)","")
|
|
|
|
echo "const char *gitversion = \"$(shell git rev-parse HEAD)\";" > $@
|
|
|
|
else
|
|
|
|
echo "const char *gitversion = \"0000000000000000000000000000000000000000\";" > $@
|
|
|
|
endif
|