mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-10-01 20:20:05 +00:00
Print server version when starting up.
Also added -ldl to fix cmake compilation on Unix systems.
This commit is contained in:
12
Makefile
12
Makefile
@@ -107,6 +107,8 @@ ifneq ($(shell $(WIN_CXX) --version | head -1 | egrep -o [0-9]+ | tail -3 | head
|
||||
WIN_CXX_OPT_DISABLES=$(WIN_CXX_VANILLA_MINGW_OPT_DISABLES)
|
||||
endif
|
||||
|
||||
CXXFLAGS+= -DGIT_VERSION=\"$(shell git describe --tags)\"
|
||||
|
||||
.SUFFIX: .o .c .cpp .h .hpp
|
||||
|
||||
.c.o:
|
||||
@@ -122,13 +124,19 @@ $(SERVER): $(OBJ) $(CHDR) $(CXXHDR)
|
||||
mkdir -p bin
|
||||
$(CXX) $(OBJ) $(LDFLAGS) -o $(SERVER)
|
||||
|
||||
# compatibility with how cmake injects GIT_VERSION
|
||||
version.h:
|
||||
touch version.h
|
||||
|
||||
src/main.o: version.h
|
||||
|
||||
.PHONY: all windows clean nuke
|
||||
|
||||
# only gets rid of OpenFusion objects, so we don't need to
|
||||
# recompile the libs every time
|
||||
clean:
|
||||
rm -f src/*.o $(SERVER) $(WIN_SERVER)
|
||||
rm -f src/*.o $(SERVER) $(WIN_SERVER) version.h
|
||||
|
||||
# gets rid of all compiled objects, including the libraries
|
||||
nuke:
|
||||
rm -f $(OBJ) $(SERVER) $(WIN_SERVER)
|
||||
rm -f $(OBJ) $(SERVER) $(WIN_SERVER) version.h
|
||||
|
Reference in New Issue
Block a user