diff --git a/Win32/configure b/Win32/configure index 43181688..4f86256e 100755 --- a/Win32/configure +++ b/Win32/configure @@ -7,11 +7,14 @@ import subprocess def main(): args = parser().parse_args() src_path = os.path.dirname(__file__) or '.' - -# shutil.copy(os.path.realpath(src_path) + '/Makefile.in', os.getcwd() + '/Makefile') - + + args.flags = '' + if args.sixfour: + args.flags = '-DENVIRONMENT64' + open('.config.vars', 'w+').write( '''PREFIX={prefix} +FLAGS={flags} '''.format(**vars(args))) @@ -25,6 +28,10 @@ def parser(): '-c', '--compiler', type=str, help='Compiler prefix, such as i686-w64-mingw32-', dest='prefix', metavar='PREFIX', default='' ) + parser.add_argument( + '--64', action='store_const', + help='Sets flag for 64-bit compiliation', dest='sixfour', const=True, default=False + ) return parser main() diff --git a/Win32/game/Makefile b/Win32/game/Makefile index 6f26d752..ea77acb7 100644 --- a/Win32/game/Makefile +++ b/Win32/game/Makefile @@ -10,7 +10,7 @@ LIBS = -mwindows -lwinmm -static-libgcc -static-libstdc++ INCS = -I"include" CXXINCS = BIN = "Blades of Exile.exe" -CXXFLAGS = $(CXXINCS) -Wall -O2 +CXXFLAGS = $(CXXINCS) -Wall -O2 $(FLAGS) CFLAGS = $(INCS) -O2 RM = rm -f diff --git a/Win32/game/boe.main.cpp b/Win32/game/boe.main.cpp index 445d1422..24cb21f5 100644 --- a/Win32/game/boe.main.cpp +++ b/Win32/game/boe.main.cpp @@ -18,24 +18,6 @@ #include "globvar.h" -// Check windows -#if _WIN32 || _WIN64 -#if _WIN64 -#define ENVIRONMENT64 -#else -#define ENVIRONMENT32 -#endif -#endif - -// Check GCC -#if __GNUC__ -#if __x86_64__ || __ppc64__ -#define ENVIRONMENT64 -#else -#define ENVIRONMENT32 -#endif -#endif - void startup_load() { load_file();