2006-04-13 20:47:06 +00:00
|
|
|
# Shared make information between Build engine and games
|
|
|
|
|
2012-12-13 02:34:30 +00:00
|
|
|
MAKEFILE_SHARED:=$(lastword $(MAKEFILE_LIST))
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
ENGINELIB=libengine.a
|
|
|
|
EDITORLIB=libbuild.a
|
|
|
|
|
2012-12-13 02:34:30 +00:00
|
|
|
|
|
|
|
# SDK locations - adjust to match your setup
|
|
|
|
# Overrides must use absolute paths since this Makefile is included at different directory levels
|
|
|
|
#
|
|
|
|
DXROOT=$(abspath $(dir $(MAKEFILE_COMMON))../sdk/dx)
|
|
|
|
#DXROOT=/c/sdks/directx/dx8
|
|
|
|
SDLROOT=$(abspath $(dir $(MAKEFILE_COMMON))../sdk/SDL)
|
|
|
|
|
|
|
|
DXROOT_OVERRIDE ?=
|
|
|
|
SDLROOT_OVERRIDE ?=
|
|
|
|
ifneq ($(DXROOT_OVERRIDE),)
|
|
|
|
DXROOT=$(DXROOT_OVERRIDE)
|
|
|
|
endif
|
|
|
|
ifneq ($(SDLROOT_OVERRIDE),)
|
|
|
|
SDLROOT=$(SDLROOT_OVERRIDE)
|
|
|
|
endif
|
|
|
|
|
2013-10-13 06:17:27 +00:00
|
|
|
SDL_TARGET ?= 2
|
2013-10-06 07:49:53 +00:00
|
|
|
SDL_FRAMEWORK ?= 1
|
|
|
|
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
|
2010-08-12 21:06:51 +00:00
|
|
|
L_SSP := -lssp
|
2010-07-03 08:53:57 +00:00
|
|
|
endif
|
|
|
|
|
2012-11-06 07:49:44 +00:00
|
|
|
BUILDCOMMONFLAGS=$(ARCH)
|
2012-11-24 09:13:29 +00:00
|
|
|
BUILDLIBS=
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
BUILDLIBDIRS=
|
2012-03-23 20:22:10 +00:00
|
|
|
|
2013-05-01 17:42:03 +00:00
|
|
|
# NOTE: If your setup doesn't have libstdc++, you can try using libsupc++.
|
|
|
|
# Search for STDCPPLIB below and change it to -lsupc++.
|
2012-05-29 20:01:50 +00:00
|
|
|
|
2012-12-13 02:32:59 +00:00
|
|
|
ifeq ($(SUBPLATFORM),LINUX)
|
2010-08-12 21:06:51 +00:00
|
|
|
RENDERTYPE=SDL
|
2013-10-07 10:05:03 +00:00
|
|
|
MIXERTYPE=SDL
|
2012-11-06 07:49:44 +00:00
|
|
|
BUILDCOMMONFLAGS+= -DHAVE_INTTYPES
|
2010-08-12 21:06:51 +00:00
|
|
|
GTKCOMPAT32=0
|
2012-12-13 12:41:23 +00:00
|
|
|
SDL_FRAMEWORK=0
|
2010-08-12 21:06:51 +00:00
|
|
|
|
2013-05-01 17:42:03 +00:00
|
|
|
# On Linux, we don't need to specify libstdc++ manually, the linker will
|
|
|
|
# presumably take care for us.
|
|
|
|
STDCPPLIB:=
|
|
|
|
|
2013-07-20 03:36:54 +00:00
|
|
|
ifeq ($(PLATFORM),GCW)
|
|
|
|
override USE_OPENGL=0
|
|
|
|
override NOASM=1
|
|
|
|
endif
|
|
|
|
ifeq ($(PLATFORM),DINGOO)
|
|
|
|
override USE_OPENGL=0
|
|
|
|
override NOASM=1
|
|
|
|
endif
|
|
|
|
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
ifeq ($(findstring x86_64,$(SYSARCH)),x86_64)
|
2010-08-12 21:06:51 +00:00
|
|
|
ifeq (1,$(BUILD32_ON_64))
|
|
|
|
# On my 64bit Gentoo these are the 32bit emulation libs
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
BUILDLIBS+= -m32
|
|
|
|
BUILDLIBDIRS+= -L/emul/linux/x86/usr/lib
|
2012-11-06 07:49:44 +00:00
|
|
|
BUILDCOMMONFLAGS+= -m32
|
2010-08-12 21:06:51 +00:00
|
|
|
# Override WITHOUT_GTK=0
|
|
|
|
GTKCOMPAT32=1
|
|
|
|
else
|
|
|
|
override NOASM=1
|
|
|
|
endif
|
|
|
|
endif
|
2006-04-13 20:47:06 +00:00
|
|
|
endif
|
2008-08-20 22:58:09 +00:00
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
2010-08-12 21:06:51 +00:00
|
|
|
RENDERTYPE = SDL
|
2013-10-07 10:05:03 +00:00
|
|
|
MIXERTYPE = SDL
|
2012-11-15 06:42:37 +00:00
|
|
|
STDCPPLIB:=-lstdc++
|
2012-11-06 07:49:44 +00:00
|
|
|
BUILDCOMMONFLAGS += -DHAVE_INTTYPES
|
2010-08-12 21:06:51 +00:00
|
|
|
GTKCOMPAT32 = 0
|
2012-03-09 07:43:49 +00:00
|
|
|
|
|
|
|
ifeq (1,$(DARWIN9))
|
2012-11-06 07:49:44 +00:00
|
|
|
BUILDCOMMONFLAGS += -DDARWIN9
|
2012-03-09 07:43:49 +00:00
|
|
|
endif
|
|
|
|
|
2011-06-17 11:53:41 +00:00
|
|
|
ifeq (1,$(BUILD32_ON_64))
|
2012-03-23 20:22:10 +00:00
|
|
|
ARCH=-arch i386
|
2011-06-17 11:53:41 +00:00
|
|
|
else
|
2011-10-11 16:53:52 +00:00
|
|
|
# ASM won't work on PowerPC or x86_64
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
override NOASM=1
|
2011-06-17 11:53:41 +00:00
|
|
|
endif
|
2008-08-20 22:58:09 +00:00
|
|
|
endif
|
2006-04-13 20:47:06 +00:00
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
2013-10-13 06:17:27 +00:00
|
|
|
# Windows types can be SDL or WIN
|
|
|
|
RENDERTYPE?=SDL
|
2013-10-07 10:05:03 +00:00
|
|
|
MIXERTYPE?=WIN
|
|
|
|
ifneq ($(RENDERTYPE),SDL)
|
|
|
|
ifeq ($(MIXERTYPE),SDL)
|
|
|
|
MIXERTYPE:=WIN
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2012-11-24 09:13:29 +00:00
|
|
|
WITHOUT_GTK?=1
|
2013-10-13 09:08:31 +00:00
|
|
|
SDLCONFIG=
|
2012-11-24 09:13:29 +00:00
|
|
|
SDL_FRAMEWORK=1
|
2012-11-06 07:49:44 +00:00
|
|
|
BUILDCOMMONFLAGS+= -DHAVE_INTTYPES
|
2010-08-12 21:06:51 +00:00
|
|
|
EXESUFFIX=.exe
|
2014-02-10 10:55:13 +00:00
|
|
|
BUILDLIBS+= -Wl,--enable-auto-import -lmingwex -lgdi32 -lcomctl32 -lwinmm $(L_SSP) -lwsock32 -lws2_32 -lshlwapi
|
|
|
|
ifeq (0,$(CLANG))
|
|
|
|
BUILDLIBS+= -mwindows
|
|
|
|
endif
|
2012-10-29 04:26:25 +00:00
|
|
|
#-lshfolder
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
#BUILDLIBDIRS+= -L$(ENETROOT)
|
2013-05-01 17:42:03 +00:00
|
|
|
STDCPPLIB:=-lstdc++
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
ifeq ($(findstring x86_64,$(SYSARCH)),x86_64)
|
|
|
|
ifneq (1,$(BUILD32_ON_64))
|
|
|
|
override NOASM=1
|
|
|
|
endif
|
|
|
|
endif
|
2006-04-13 20:47:06 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(PLATFORM),BSD)
|
2010-08-12 21:06:51 +00:00
|
|
|
RENDERTYPE=SDL
|
2013-10-07 10:05:03 +00:00
|
|
|
MIXERTYPE=SDL
|
2012-11-06 07:49:44 +00:00
|
|
|
BUILDCOMMONFLAGS+= -DHAVE_INTTYPES
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
ifneq ($(findstring i386,$(SYSARCH)),i386)
|
2011-05-11 21:58:19 +00:00
|
|
|
override NOASM=1
|
|
|
|
endif
|
2012-11-15 06:42:37 +00:00
|
|
|
STDCPPLIB:=-lstdc++
|
2006-04-13 20:47:06 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(PLATFORM),BEOS)
|
2010-08-12 21:06:51 +00:00
|
|
|
RENDERTYPE=SDL
|
2013-10-07 10:05:03 +00:00
|
|
|
MIXERTYPE=SDL
|
2012-11-15 06:42:37 +00:00
|
|
|
STDCPPLIB:=-lstdc++
|
2006-04-13 20:47:06 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(PLATFORM),SKYOS)
|
2010-08-12 21:06:51 +00:00
|
|
|
RENDERTYPE=SDL
|
2013-10-07 10:05:03 +00:00
|
|
|
MIXERTYPE=SDL
|
2010-08-12 21:06:51 +00:00
|
|
|
EXESUFFIX=.app
|
|
|
|
override NOASM=1
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
BUILDCOMMONFLAGS+= -DUNDERSCORES -I/boot/programs/sdk/include/sdl
|
2010-08-12 21:06:51 +00:00
|
|
|
SDLCONFIG=
|
2012-11-24 09:13:29 +00:00
|
|
|
BUILDLIBS+= -lSDL -lnet
|
2006-04-13 20:47:06 +00:00
|
|
|
endif
|
2012-05-01 12:37:53 +00:00
|
|
|
ifeq ($(PLATFORM),WII)
|
|
|
|
RENDERTYPE=SDL
|
2013-10-07 10:05:03 +00:00
|
|
|
MIXERTYPE=SDL
|
2012-05-01 12:37:53 +00:00
|
|
|
EXESUFFIX=.elf
|
2012-05-20 07:25:25 +00:00
|
|
|
override USE_OPENGL=0
|
2014-02-10 10:56:14 +00:00
|
|
|
override POLYMER=0
|
2012-05-20 07:25:25 +00:00
|
|
|
override NOASM=1
|
2012-05-01 12:37:53 +00:00
|
|
|
override WITHOUT_GTK=1
|
2012-05-20 07:25:25 +00:00
|
|
|
# -msdata=eabi
|
2012-11-06 07:49:44 +00:00
|
|
|
BUILDCOMMONFLAGS+= -g -mtune=750 -meabi -mhard-float \
|
2012-05-20 07:25:25 +00:00
|
|
|
-DGEKKO -DHAVE_INTTYPES -D__POWERPC__ \
|
2013-10-13 09:08:31 +00:00
|
|
|
-I$(LIBOGC_INC) -I$(PORTLIBS)/include
|
2012-05-01 12:37:53 +00:00
|
|
|
SDLCONFIG=
|
2013-10-13 09:08:31 +00:00
|
|
|
SDL_TARGET=1
|
|
|
|
SDL_FRAMEWORK=1
|
|
|
|
BUILDLIBS+= -lSDL_mixer -lSDL -laesnd_tueidj -lpng -lvorbisidec -lfat -lwiiuse -lbte -logc -lm -lwiikeyboard
|
2013-02-18 08:48:18 +00:00
|
|
|
BUILDLIBDIRS += -L$(LIBOGC_LIB) -L$(PORTLIBS)/lib
|
2012-05-01 12:37:53 +00:00
|
|
|
endif
|
2006-04-13 20:47:06 +00:00
|
|
|
ifeq ($(PLATFORM),QNX)
|
2010-08-12 21:06:51 +00:00
|
|
|
RENDERTYPE=SDL
|
2013-10-07 10:05:03 +00:00
|
|
|
MIXERTYPE=SDL
|
2010-08-12 21:06:51 +00:00
|
|
|
override USE_OPENGL=0
|
|
|
|
override NOASM=1
|
2012-11-15 06:42:37 +00:00
|
|
|
STDCPPLIB:=-lstdc++
|
2012-11-24 09:13:29 +00:00
|
|
|
BUILDLIBS+= -lsocket
|
2006-04-13 20:47:06 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(PLATFORM),SUNOS)
|
2010-08-12 21:06:51 +00:00
|
|
|
RENDERTYPE=SDL
|
2013-10-07 10:05:03 +00:00
|
|
|
MIXERTYPE=SDL
|
2010-08-12 21:06:51 +00:00
|
|
|
override USE_OPENGL=0
|
|
|
|
override NOASM=1
|
2012-11-15 06:42:37 +00:00
|
|
|
STDCPPLIB:=-lstdc++
|
2012-11-24 09:13:29 +00:00
|
|
|
BUILDLIBS+= -lsocket -lnsl
|
2006-04-13 20:47:06 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(PLATFORM),SYLLABLE)
|
2010-08-12 21:06:51 +00:00
|
|
|
RENDERTYPE=SDL
|
2013-10-07 10:05:03 +00:00
|
|
|
MIXERTYPE=SDL
|
2010-08-12 21:06:51 +00:00
|
|
|
override USE_OPENGL=0
|
|
|
|
override NOASM=1
|
2006-04-13 20:47:06 +00:00
|
|
|
endif
|
|
|
|
|
2012-11-15 06:42:37 +00:00
|
|
|
ifneq (0,$(CLANG))
|
|
|
|
ifneq (,$(STDCPPLIB))
|
|
|
|
STDCPPLIB:=-Xlinker $(STDCPPLIB)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2013-10-13 09:08:31 +00:00
|
|
|
ifeq ($(SDL_TARGET),2)
|
|
|
|
SDLCONFIG ?= sdl2-config
|
|
|
|
SDLNAME ?= SDL2
|
|
|
|
endif
|
|
|
|
ifeq ($(SDL_TARGET),1)
|
|
|
|
SDLCONFIG ?= sdl-config
|
|
|
|
SDLNAME ?= SDL
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(SDLCONFIG),)
|
|
|
|
SDLVERSION:=$(strip $(shell $(SDLCONFIG) --version))
|
|
|
|
ifneq ($(SDLVERSION),)
|
|
|
|
SDLROOT:=$(strip $(shell $(SDLCONFIG) --prefix))
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2013-10-06 07:49:53 +00:00
|
|
|
SDL_STATIC?=1
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
ifeq ($(RENDERTYPE),SDL)
|
2013-10-06 07:49:53 +00:00
|
|
|
BUILDCOMMONFLAGS += -DSDL_TARGET=$(SDL_TARGET)
|
|
|
|
|
2010-08-12 21:06:51 +00:00
|
|
|
ifeq ($(SDL_FRAMEWORK),1)
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
BUILDCOMMONFLAGS += -DSDL_FRAMEWORK
|
2010-08-12 21:06:51 +00:00
|
|
|
endif
|
2012-11-24 09:13:29 +00:00
|
|
|
|
|
|
|
ifneq ($(PLATFORM),WINDOWS)
|
|
|
|
ifeq ($(SDL_FRAMEWORK),1)
|
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
BUILDLIBS += -Wl,-framework,SDL
|
|
|
|
BUILDCOMMONFLAGS+= -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers
|
2012-11-24 09:13:29 +00:00
|
|
|
endif
|
|
|
|
else
|
|
|
|
ifneq ($(SDLCONFIG),)
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
SDLCONFIG_COMMONFLAGS:=$(subst -Dmain=SDL_main,,$(strip $(shell $(SDLCONFIG) --cflags)))
|
|
|
|
SDLCONFIG_LIBS:=$(strip $(shell $(SDLCONFIG) --libs))
|
|
|
|
|
|
|
|
BUILDLIBS+= $(SDLCONFIG_LIBS)
|
|
|
|
BUILDCOMMONFLAGS+= $(SDLCONFIG_COMMONFLAGS)
|
2012-11-24 09:13:29 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
else
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
BUILDCOMMONFLAGS += -D_GNU_SOURCE=1
|
2013-10-06 07:49:53 +00:00
|
|
|
ifneq ($(SDL_STATIC),0)
|
|
|
|
ifneq ($(SDL_TARGET),1) # Since SDL2 is under the zlib license, link statically if possible.
|
|
|
|
BUILDLIBS+= -static
|
|
|
|
endif
|
|
|
|
endif
|
2014-02-10 10:55:13 +00:00
|
|
|
BUILDLIBS+= -l$(SDLNAME)main -l$(SDLNAME) -lmingw32 -lgdi32 -limm32 -lole32 -loleaut32 -lwinmm -lversion
|
2010-08-12 21:06:51 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq (1,$(WITHOUT_GTK))
|
|
|
|
HAVE_GTK2=0
|
|
|
|
else
|
|
|
|
ifneq (No,$(shell pkg-config --exists gtk+-2.0 || echo No))
|
|
|
|
HAVE_GTK2=1
|
|
|
|
# On my 64bit Gentoo box I have Cairo enabled which means the libs list includes
|
|
|
|
# -lpangocairo-1.0 and -lcairo, however the 32bit compatibility libraries don't
|
|
|
|
# include cairo, so we need to filter out those -l switches in order to link
|
|
|
|
ifneq ($(LINKED_GTK),0)
|
|
|
|
ifeq ($(GTKCOMPAT32),1)
|
2012-11-24 09:13:29 +00:00
|
|
|
BUILDLIBS+= $(shell pkg-config --libs gtk+-2.0 | sed 's/\s-l\(pango\)\{0,1\}cairo\S*\s/ /g')
|
2010-08-12 21:06:51 +00:00
|
|
|
else
|
2012-11-24 09:13:29 +00:00
|
|
|
BUILDLIBS+= $(shell pkg-config --libs gtk+-2.0)
|
2010-08-12 21:06:51 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
HAVE_GTK2=0
|
|
|
|
endif
|
|
|
|
endif
|
2013-10-07 10:05:03 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(RENDERTYPE),WIN)
|
|
|
|
BUILDLIBS+= -ldxguid
|
2006-04-13 20:47:06 +00:00
|
|
|
endif
|
|
|
|
|
2013-10-07 10:05:03 +00:00
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
|
|
|
ifeq ($(MIXERTYPE),WIN)
|
|
|
|
ifeq ($(RENDERTYPE),SDL)
|
|
|
|
BUILDLIBS+= -ldxguid_sdl
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
2008-11-11 13:24:05 +00:00
|
|
|
|
2013-10-07 10:05:03 +00:00
|
|
|
BUILDCOMMONFLAGS+= -DRENDERTYPE$(RENDERTYPE)=1 -DMIXERTYPE$(MIXERTYPE)=1 $(W_STRICT_OVERFLOW)
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
ifneq (0,$(USE_OPENGL))
|
2012-11-06 07:49:44 +00:00
|
|
|
BUILDCOMMONFLAGS+= -DUSE_OPENGL
|
2006-04-13 20:47:06 +00:00
|
|
|
endif
|
|
|
|
ifneq (0,$(NOASM))
|
2012-11-06 07:49:44 +00:00
|
|
|
BUILDCOMMONFLAGS+= -DNOASM
|
2006-04-13 20:47:06 +00:00
|
|
|
endif
|
2013-09-21 13:37:31 +00:00
|
|
|
ifneq (0,$(USE_ASM64))
|
|
|
|
BUILDCOMMONFLAGS+= -DUSE_ASM64
|
|
|
|
endif
|
2007-08-17 19:32:56 +00:00
|
|
|
ifneq (0,$(LINKED_GTK))
|
2012-11-06 07:49:44 +00:00
|
|
|
BUILDCOMMONFLAGS+= -DLINKED_GTK
|
2007-08-17 19:32:56 +00:00
|
|
|
endif
|
2007-08-16 23:25:24 +00:00
|
|
|
|
2008-05-10 01:29:37 +00:00
|
|
|
ifneq (0,$(POLYMER))
|
2011-03-04 08:50:58 +00:00
|
|
|
ifneq (0,$(USE_OPENGL))
|
2012-11-06 07:49:44 +00:00
|
|
|
BUILDCOMMONFLAGS+= -DPOLYMER
|
2008-05-10 01:29:37 +00:00
|
|
|
endif
|
|
|
|
endif
|
2008-10-18 12:37:26 +00:00
|
|
|
|
2012-03-14 06:27:45 +00:00
|
|
|
ifneq ($(EXESUFFIX_OVERRIDE),)
|
|
|
|
EXESUFFIX=$(EXESUFFIX_OVERRIDE)
|
|
|
|
endif
|
|
|
|
|
2012-03-20 19:29:11 +00:00
|
|
|
STATICSTDCPP?=
|
|
|
|
ifeq (1,$(STATICSTDCPP))
|
|
|
|
STATICSTDCPP= -static
|
|
|
|
endif
|
|
|
|
ifeq (0,$(STATICSTDCPP))
|
|
|
|
STATICSTDCPP= -shared
|
|
|
|
endif
|
|
|
|
|
2012-03-24 08:30:28 +00:00
|
|
|
|
|
|
|
ifneq ($(PLATFORM),WINDOWS)
|
2012-05-20 07:25:25 +00:00
|
|
|
ifneq ($(PLATFORM),WII)
|
2012-11-24 09:13:29 +00:00
|
|
|
BUILDLIBS+= -ldl
|
2012-05-20 07:25:25 +00:00
|
|
|
endif
|
2012-11-24 09:13:29 +00:00
|
|
|
BUILDLIBS+= -pthread
|
2012-03-24 08:30:28 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
|
|
|
ifneq ($(USE_LIBPNG),0)
|
2012-12-13 02:34:30 +00:00
|
|
|
BUILDLIBS+= -lpng_mini -lz_mini
|
2012-03-24 08:30:28 +00:00
|
|
|
endif
|
2014-02-10 10:58:38 +00:00
|
|
|
BUILDLIBS+= -lcompat-from-mingw-w64
|
2012-07-20 21:57:53 +00:00
|
|
|
else
|
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
|
|
|
ifneq ($(USE_LIBPNG),0)
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
BUILDLIBS+= -lpng # -lz
|
2012-07-20 21:57:53 +00:00
|
|
|
endif
|
|
|
|
else
|
2012-10-03 15:29:07 +00:00
|
|
|
ifneq ($(USE_LIBPNG),0)
|
2012-11-24 09:13:29 +00:00
|
|
|
BUILDLIBS+= -lpng -lz
|
2012-10-03 15:29:07 +00:00
|
|
|
endif
|
2012-03-24 08:30:28 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2008-10-19 12:14:04 +00:00
|
|
|
ifeq ($(PRETTY_OUTPUT),1)
|
2012-11-06 07:49:44 +00:00
|
|
|
BUILD_SETTINGS_COMPILER = \033[1;36mcompiler: \033[0;36m\"$(COMPILER) $(OURCFLAGS)\"
|
2012-11-05 02:49:08 +00:00
|
|
|
BUILD_SETTINGS_ASSEMBLER = \033[1;36massembler: \033[0;36m\"$(AS) $(OURASFLAGS)\"
|
2012-11-24 09:13:29 +00:00
|
|
|
BUILD_SETTINGS_LINKER = \033[1;36mlinker: \033[0;36m\"$(PRINTLDFLAGS) $(OURLIBS) $(STATICSTDCPP) $(STDCPPLIB)\"
|
2012-10-29 04:26:25 +00:00
|
|
|
ifeq (0,$(NOASM))
|
|
|
|
BUILD_SETTINGS = printf "$(BUILD_SETTINGS_COMPILER)\n$(BUILD_SETTINGS_ASSEMBLER)\n$(BUILD_SETTINGS_LINKER)\033[0m\n"
|
|
|
|
else
|
|
|
|
BUILD_SETTINGS = printf "$(BUILD_SETTINGS_COMPILER)\n$(BUILD_SETTINGS_LINKER)\033[0m\n"
|
|
|
|
endif
|
|
|
|
BUILD_STARTED = printf "\033[K\033[1;36mBuild started using:\033[0m\n"; $(BUILD_SETTINGS)
|
|
|
|
BUILD_ECHOFLAGS = printf "\033[K\033[1;36mEnded compilation in this directory using:\n$(BUILD_SETTINGS_COMPILER)\033[0m\n"
|
2008-10-18 13:25:23 +00:00
|
|
|
BUILD_FINISHED = printf "\033[K\033[1;36mBuild successful:\033[0m\n"
|
2008-10-31 10:08:51 +00:00
|
|
|
COMPILE_STATUS = printf "\033[K\033[0mBuilding object \033[1m$@\033[0m...\033[0m\r"
|
2012-03-04 20:11:49 +00:00
|
|
|
ONESTEP_STATUS = printf "\033[K\033[0mBuilding executable \033[1m$@\033[0m...\033[0m\r"
|
2008-11-20 14:06:36 +00:00
|
|
|
COMPILE_OK = printf "\033[K\033[0;32mBuilt object \033[1;32m$@\033[0;32m \033[0m\n"
|
2012-03-04 20:11:49 +00:00
|
|
|
ONESTEP_OK = printf "\033[K\033[0;32mBuilt executable \033[1;32m$@\033[0;32m \033[0m\n"
|
2008-10-20 03:09:19 +00:00
|
|
|
COMPILE_FAILED = printf "\033[K\033[0;31mFailed building \033[1;31m$@\033[0;31m from\033[0m \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1
|
2012-11-15 06:42:37 +00:00
|
|
|
ONESTEP_FAILED = printf "\033[K\033[0;31mFailed building executable \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1
|
2010-12-19 22:29:01 +00:00
|
|
|
ARCHIVE_STATUS = printf "\033[K\033[0mCreating library archive \033[1m$@\033[0m...\033[0m\r"
|
|
|
|
ARCHIVE_OK = printf "\033[K\033[0;32mCreated library archive \033[1;32m$@\033[0;32m \033[0m\n"
|
|
|
|
ARCHIVE_FAILED = printf "\033[K\033[0;31mFailed creating library archive \033[1;31m$@\033[0;31m from\033[0m \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1
|
2008-10-31 10:08:51 +00:00
|
|
|
LINK_STATUS = printf "\033[K\033[0;0mLinking executable \033[1m$@\033[0;0m...\033[0m\r"
|
2008-11-20 14:06:36 +00:00
|
|
|
LINK_OK = printf "\033[K\033[0;32mLinked executable \033[1;32m$@\033[0;32m \033[0m\n"
|
2008-10-20 03:09:19 +00:00
|
|
|
LINK_FAILED = printf "\033[K\033[0;31mFailed linking executable \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1
|
2008-10-19 12:14:04 +00:00
|
|
|
else
|
|
|
|
BUILD_STARTED =
|
2012-10-29 04:26:25 +00:00
|
|
|
BUILD_ECHOFLAGS =
|
2008-10-19 12:14:04 +00:00
|
|
|
BUILD_FINISHED =
|
|
|
|
COMPILE_STATUS =
|
2012-03-04 20:11:49 +00:00
|
|
|
ONESTEP_STATUS =
|
2008-10-20 03:09:19 +00:00
|
|
|
COMPILE_OK = true
|
2012-03-04 20:11:49 +00:00
|
|
|
ONESTEP_OK = true
|
2008-10-20 03:09:19 +00:00
|
|
|
COMPILE_FAILED = false; exit 1
|
2012-11-15 06:42:37 +00:00
|
|
|
ONESTEP_FAILED = false; exit 1
|
2010-12-19 22:29:01 +00:00
|
|
|
ARCHIVE_STATUS =
|
|
|
|
ARCHIVE_OK = true
|
|
|
|
ARCHIVE_FAILED = false; exit 1
|
2008-10-19 12:14:04 +00:00
|
|
|
LINK_STATUS =
|
2008-10-20 03:09:19 +00:00
|
|
|
LINK_OK = true
|
|
|
|
LINK_FAILED = false; exit 1
|
2008-10-20 12:33:29 +00:00
|
|
|
endif
|