diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common index c47ecde53..d4490eb1c 100644 --- a/polymer/eduke32/Makefile.common +++ b/polymer/eduke32/Makefile.common @@ -93,7 +93,7 @@ BASELDFLAGS= LIBS=-lm ifneq (0,$(USE_LIBPNG)) - LIBS+= -lpng + LIBS+= -lpng -lz endif ifneq (0,$(USE_LIBVPX)) # On Windows, we link statically to libvpx diff --git a/polymer/eduke32/build/Makefile b/polymer/eduke32/build/Makefile index 2241c8dfc..5facca72d 100644 --- a/polymer/eduke32/build/Makefile +++ b/polymer/eduke32/build/Makefile @@ -44,7 +44,6 @@ ifneq ($(RELEASE),0) else # Debugging enabled debug+= -DNOSDLPARACHUTE - LIBS+= $(L_SSP) -Wl,--enable-auto-import endif include Makefile.shared @@ -72,19 +71,6 @@ else ENGINEOBJS+= $(OBJ)/a-c.$o endif -ifneq ($(PLATFORM),WINDOWS) - LIBS+= -ldl -pthread - ifneq ($(USE_LIBPNG),0) - LIBS+= -LWindows/lib -lpng -lz - OURCFLAGS+= -IWindows/include - endif -endif -ifeq ($(PLATFORM),DARWIN) - ifneq ($(USE_LIBPNG),0) - OURCFLAGS+= -I/opt/local/include -I/usr/local/include - LIBS+= -L/opt/local/lib -L/usr/local/lib -lpng -lz - endif -endif ENGINEOBJS+= \ @@ -141,7 +127,6 @@ ifeq ($(PLATFORM),BSD) endif ifeq ($(PLATFORM),WINDOWS) OURCFLAGS+= -DUNDERSCORES -I$(DXROOT)/include -I$(FMODROOTWIN)/inc # -I$(ENETROOT)/include - LIBS+= -lwsock32 -lws2_32 -lwinmm #-L$(ENETROOT) OURASFLAGS+= -DUNDERSCORES -f win32 endif ifeq ($(PLATFORM),BEOS) @@ -160,7 +145,7 @@ ifeq ($(RENDERTYPE),SDL) OURCFLAGS += -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \ -I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers UTILLIBS += -read_only_relocs suppress \ - -Wl,-framework,SDL -Wl,-framework,SDL_mixer Apple/lib/libSDLmain.a + -Wl,-framework,SDL -Wl,-framework,SDL_mixer ../Apple/lib/libSDLmain.a else OURCFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL UTILLIBS += -read_only_relocs suppress -lSDL_mixer diff --git a/polymer/eduke32/build/Makefile.shared b/polymer/eduke32/build/Makefile.shared index 1d6bb0e23..34724082f 100644 --- a/polymer/eduke32/build/Makefile.shared +++ b/polymer/eduke32/build/Makefile.shared @@ -245,6 +245,31 @@ ifeq (0,$(STATICSTDCPP)) STATICSTDCPP= -shared endif + +ifneq ($(PLATFORM),WINDOWS) + LIBS+= -ldl -pthread +endif + +ifeq ($(PLATFORM),WINDOWS) + ifneq ($(USE_LIBPNG),0) + LIBS+= -LWindows/lib -lpng -lz + BUILDCFLAGS+= -IWindows/include + endif +endif +ifeq ($(PLATFORM),DARWIN) + ifneq ($(USE_LIBPNG),0) + BUILDCFLAGS+= -I/opt/local/include -I/usr/local/include + LIBS+= -L/opt/local/lib -L/usr/local/lib -lpng -lz + endif +endif + +LIBS+= $(L_SSP) -Wl,--enable-auto-import + +ifeq ($(PLATFORM),WINDOWS) + LIBS+= -lwsock32 -lws2_32 -lwinmm #-L$(ENETROOT) +endif + + ifeq ($(PRETTY_OUTPUT),1) BUILD_STARTED = printf "\033[K\033[1;36mBuild started using \"$(CC) $(OURCFLAGS) $(OURCONLYFLAGS) $(OURCXXFLAGS)\"\033[0m\n" BUILD_ECHOFLAGS = printf "\033[K\033[1;36mEnded compilation in this directory using \"$(CC) $(OURCFLAGS) $(OURCONLYFLAGS) $(OURCXXFLAGS)\"\033[0m\n" diff --git a/polymer/eduke32/build/src/util/arttool.cc b/polymer/eduke32/build/src/util/arttool.cc index 19db3e2da..de3c6c1d6 100644 --- a/polymer/eduke32/build/src/util/arttool.cc +++ b/polymer/eduke32/build/src/util/arttool.cc @@ -4,11 +4,10 @@ * @license Artistic License 2.0 (http://www.perlfoundation.org/artistic_license_2_0) */ -#include +#include #include #include #include -#include #include "compat.h" @@ -16,35 +15,35 @@ using namespace std; void usage() { - cout << "BUILD ART file editing tool" << endl; - cout << "Copyright (C) 2008 Jonathon Fowler " << endl; - cout << "Released under the Artistic License 2.0" << endl; - cout << endl; - cout << " arttool create [options]" << endl; - cout << " -f Selects which numbered ART file to create (default 0)" << endl; - cout << " -o Specifies the first tile in the file (default 0)" << endl; - cout << " -n The number of tiles for the art file (default 256)" << endl; - cout << " Creates an empty ART file named 'tilesXXX.art'" << endl; - cout << endl; - cout << " arttool addtile [options] " << endl; - cout << " -x X-centre" << endl; - cout << " -y Y-centre" << endl; - cout << " -ann Animation frame span" << endl; - cout << " -ant Animation type (0=none, 1=oscillate, 2=forward, 3=reverse)" << endl; - cout << " -ans Animation speed" << endl; - cout << " Adds a tile to the 'tilesXXX.art' set from a TGA or PCX source" << endl; - cout << endl; - cout << " arttool rmtile " << endl; - cout << " Removes a tile from the 'tilesXXX.art' set" << endl; - cout << endl; - cout << " arttool tileprop [options] " << endl; - cout << " -x X-centre" << endl; - cout << " -y Y-centre" << endl; - cout << " -ann Animation frame span, may be -ve" << endl; - cout << " -ant Animation type (0=none, 1=oscillate, 2=forward, 3=reverse)" << endl; - cout << " -ans Animation speed" << endl; - cout << " Changes tile properties" << endl; - cout << endl; + Bprintf("BUILD ART file editing tool\n"); + Bprintf("Copyright (C) 2008 Jonathon Fowler \n"); + Bprintf("Released under the Artistic License 2.0\n"); + Bprintf("\n"); + Bprintf(" arttool create [options]\n"); + Bprintf(" -f Selects which numbered ART file to create (default 0)\n"); + Bprintf(" -o Specifies the first tile in the file (default 0)\n"); + Bprintf(" -n The number of tiles for the art file (default 256)\n"); + Bprintf(" Creates an empty ART file named 'tilesXXX.art'\n"); + Bprintf("\n"); + Bprintf(" arttool addtile [options] \n"); + Bprintf(" -x X-centre\n"); + Bprintf(" -y Y-centre\n"); + Bprintf(" -ann Animation frame span\n"); + Bprintf(" -ant Animation type (0=none, 1=oscillate, 2=forward, 3=reverse)\n"); + Bprintf(" -ans Animation speed\n"); + Bprintf(" Adds a tile to the 'tilesXXX.art' set from a TGA or PCX source\n"); + Bprintf("\n"); + Bprintf(" arttool rmtile \n"); + Bprintf(" Removes a tile from the 'tilesXXX.art' set\n"); + Bprintf("\n"); + Bprintf(" arttool tileprop [options] \n"); + Bprintf(" -x X-centre\n"); + Bprintf(" -y Y-centre\n"); + Bprintf(" -ann Animation frame span, may be -ve\n"); + Bprintf(" -ant Animation type (0=none, 1=oscillate, 2=forward, 3=reverse)\n"); + Bprintf(" -ans Animation speed\n"); + Bprintf(" Changes tile properties\n"); + Bprintf("\n"); } class ARTFile { @@ -893,7 +892,7 @@ int main(int argc, char ** argv) switch (err = oper->setOption(opt, value)) { case Operation::ERR_NO_ERROR: break; default: - cerr << "error: " << Operation::translateResult(err) << endl; + Bfprintf(stderr, "error: %s\n", Operation::translateResult(err)); showusage = 2; break; } @@ -902,7 +901,7 @@ int main(int argc, char ** argv) switch (oper->setParameter(unnamedParm, value)) { case Operation::ERR_NO_ERROR: break; default: - cerr << "error: " << Operation::translateResult(err) << endl; + Bfprintf(stderr, "error: %s\n", Operation::translateResult(err)); showusage = 2; break; } @@ -923,7 +922,7 @@ int main(int argc, char ** argv) switch (err) { case Operation::ERR_NO_ERROR: return 0; default: - cerr << "error: " << Operation::translateResult(err) << endl; + Bfprintf(stderr, "error: %s\n", Operation::translateResult(err)); return 1; } } diff --git a/polymer/eduke32/build/src/util/generateicon.c b/polymer/eduke32/build/src/util/generateicon.c index 207195d5f..c42aeec61 100644 --- a/polymer/eduke32/build/src/util/generateicon.c +++ b/polymer/eduke32/build/src/util/generateicon.c @@ -1,3 +1,5 @@ + +#include #include "inttypes.h" #include "kplib.h" #include "compat.h" diff --git a/polymer/eduke32/build/src/util/kmd2tool.c b/polymer/eduke32/build/src/util/kmd2tool.c index c45ead5d7..576e3713c 100644 --- a/polymer/eduke32/build/src/util/kmd2tool.c +++ b/polymer/eduke32/build/src/util/kmd2tool.c @@ -1,11 +1,5 @@ -#if 0 -kmd2tool.exe: kmd2tool.c; cl kmd2tool.c /Ox /G6fy /MD /link /opt:nowin98 - del kmd2tool.obj -!if 0 -#endif #include -#include #include #include "compat.h" @@ -95,7 +89,3 @@ int main (const int argc, const char **argv) return(0); } - -#if 0 -!endif -#endif