Commit f1aec344 authored by Philipp Kutin's avatar Philipp Kutin
Browse files

GNUmakefile: compile enet.cpp only if NETCODE!=0.

Background: gcc (Raspbian 8.3.0-6+rpi1) 8.3.0
I'm getting a missing compiler-provided symbol:

 /usr/bin/ld: obj/build/enet.o: in function `enet_time_get':
 source/build/include/enet.h:4948: undefined reference to `__atomic_load_8'
 /usr/bin/ld: source/build/include/enet.h:4958: undefined reference to `__atomic_compare_exchange_8'
 collect2: error: ld returned 1 exit status

so have a means of omitting the object file when it is not actually needed.
parent 54883815
......@@ -215,7 +215,6 @@ engine_objs := \
crc32.cpp \
defs.cpp \
dxtfilter.cpp \
enet.cpp \
engine.cpp \
fix16.cpp \
hash.cpp \
......@@ -275,6 +274,9 @@ else
engine_objs += a64.yasm
ifneq (0,$(NETCODE))
engine_objs += enet.cpp
ifeq (1,$(USE_OPENGL))
engine_objs += glsurface.cpp voxmodel.cpp mdsprite.cpp tilepacker.cpp
engine_deps += glad
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment