--- sauerbraten/src/engine/engine.h +++ sauerbraten/src/engine/engine.h @@ -2,6 +2,7 @@ #include "iengine.h" #include "igame.h" +#ifndef STANDALONE #include "world.h" #include "octa.h" #include "lightmap.h" @@ -199,6 +200,7 @@ extern const uchar faceedgesidx[6][4]; extern Texture *crosshair; extern bool inbetweenframes; +#endif extern int curtime; // current frame time extern int lastmillis; // last time @@ -210,6 +212,7 @@ extern vector entgroup; +#ifndef STANDALONE // rendergl extern bool hasVBO, hasOQ, hasFBO, hasCM, hasTC; @@ -341,6 +344,7 @@ extern void drawreflections(); extern void renderwater(); extern void rendermaterials(float zclip = 0, bool refract = false); +#endif // server @@ -353,6 +357,7 @@ extern void localconnect(); extern bool serveroption(char *opt); +#ifndef STANDALONE // serverbrowser extern bool resolverwait(const char *name, ENetAddress *address); extern void addserver(char *servername); @@ -429,3 +434,4 @@ extern bool g3d_windowhit(bool on, bool act); extern void g3d_mainmenu(); +#endif --- sauerbraten/src/shared/pch.h +++ sauerbraten/src/shared/pch.h @@ -28,6 +28,7 @@ #endif #include +#ifndef STANDALONE #include #define GL_GLEXT_LEGACY @@ -36,6 +37,7 @@ #include #undef __glext_h__ #include "GL/glext.h" +#endif #include --- sauerbraten/src/Makefile +++ sauerbraten/src/Makefile @@ -40,7 +40,7 @@ SERVER_LIBS=-Lenet -lenet SERVER_OBJS= \ - shared/tools.o \ + shared/tools-standalone.o \ engine/server-standalone.o \ fpsgame/fps-standalone.o @@ -57,6 +57,9 @@ clean: enet/Makefile -$(RM) $(SERVER_OBJS) $(CLIENT_OBJS) sauer_server sauer_client $(MAKE) -C enet/ clean + +shared/tools-standalone.o: + $(CXX) $(CXXFLAGS) -DSTANDALONE -c -o shared/tools-standalone.o shared/tools.cpp engine/server-standalone.o: $(CXX) $(CXXFLAGS) -DSTANDALONE -c -o engine/server-standalone.o engine/server.cpp