mirror of
https://github.com/ShaYmez/P25Clients.git
synced 2025-06-14 12:12:25 -04:00
Create the GitVersion.h file under Linux.
This commit is contained in:
parent
512f53e05f
commit
71059ec44e
@ -8,15 +8,30 @@ OBJECTS = Conf.o DMRLookup.o Log.o Mutex.o P25Gateway.o P25Network.o Reflectors.
|
||||
|
||||
all: P25Gateway
|
||||
|
||||
P25Gateway: $(OBJECTS)
|
||||
P25Gateway: GitVersion.h $(OBJECTS)
|
||||
$(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o P25Gateway
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
P25Gateway.o: GitVersion.h FORCE
|
||||
|
||||
.PHONY: GitVersion.h
|
||||
|
||||
FORCE:
|
||||
|
||||
|
||||
install:
|
||||
install -m 755 P25Gateway /usr/local/bin/
|
||||
|
||||
clean:
|
||||
$(RM) P25Gateway *.o *.d *.bak *~
|
||||
|
||||
|
||||
# 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
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "Timer.h"
|
||||
#include "Utils.h"
|
||||
#include "Log.h"
|
||||
#include "GitVersion.h""
|
||||
#include "GitVersion.h"
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#include <WS2tcpip.h>
|
||||
|
@ -8,14 +8,30 @@ OBJECTS = Network.o P25Parrot.o Parrot.o StopWatch.o Thread.o Timer.o UDPSocket.
|
||||
|
||||
all: P25Parrot
|
||||
|
||||
P25Parrot: $(OBJECTS)
|
||||
P25Parrot: GitVersion.h $(OBJECTS)
|
||||
$(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o P25Parrot
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
P25Parrot.o: GitVersion.h FORCE
|
||||
|
||||
.PHONY: GitVersion.h
|
||||
|
||||
FORCE:
|
||||
|
||||
|
||||
install:
|
||||
install -m 755 P25Parrot /usr/local/bin/
|
||||
|
||||
clean:
|
||||
$(RM) P25Parrot *.o *.d *.bak *~
|
||||
|
||||
# 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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user