2010-12-19 22:29:01 +00:00
2014-07-22 11:19:25 +00:00
# OS package maintainers: Please try invoking make with PACKAGE_REPOSITORY=1 to see if that meets your needs before patching out our optimizations entirely.
PACKAGE_REPOSITORY ?= 0
# Use colored output. Disable for build system debugging.
2011-02-12 13:25:24 +00:00
PRETTY_OUTPUT ?= 1
2010-12-19 22:29:01 +00:00
2012-10-29 04:26:25 +00:00
# Tools
2013-07-20 03:36:54 +00:00
CROSS=
2014-07-22 11:19:25 +00:00
ifneq ($(CROSS),)
undefine CC
undefine CXX
undefine AR
undefine RC
undefine RANLIB
undefine STRIP
endif
2014-10-19 00:44:23 +00:00
CC=$(CROSS)gcc
CXX=$(CROSS)g++
AR=$(CROSS)ar
RC=$(CROSS)windres
RANLIB=$(CROSS)ranlib
STRIP=$(CROSS)strip
AS=nasm
PKG_CONFIG=pkg-config
2014-07-22 11:19:25 +00:00
2014-12-09 23:56:31 +00:00
DONT_PRINT = > /dev/null 2>&1
DONT_FAIL = ; exit 0
2014-07-22 11:19:25 +00:00
# Override defaults that absolutely will not work.
ifeq ($(CC),cc)
override CC=gcc
endif
ifeq ($(AS),as)
override AS=nasm
endif
2012-10-29 04:26:25 +00:00
2014-10-16 21:03:24 +00:00
COMPILER_OBJC=$(CC)
2012-11-06 07:49:44 +00:00
L_CC=$(CC)
L_CXX=$(CXX)
2014-07-22 07:25:54 +00:00
CCFULLPATH=$(CC)
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 ($(PLATFORM),WII)
ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
endif
include $(DEVKITPPC)/wii_rules
2014-07-22 07:25:54 +00:00
CCFULLPATH=$(DEVKITPPC)/bin/$(CC)
2014-10-19 00:44:23 +00:00
CROSS=powerpc-eabi-
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
RANLIB=powerpc-eabi-ranlib
STRIP=powerpc-eabi-strip
2014-12-18 18:15:05 +00:00
ELF2DOL=elf2dol
DOLSUFFIX=.dol
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
endif
2014-10-16 21:03:24 +00:00
CLANG?=0
CLANG_POTENTIAL_VERSION := $(shell $(CCFULLPATH) --version)
ifeq ($(findstring clang,$(CC)),clang)
override CLANG=1
endif
# detect clang symlinked as gcc, as in OS X
ifeq ($(findstring clang,$(CLANG_POTENTIAL_VERSION)),clang)
override CLANG=1
endif
ifneq (0,$(CLANG))
override CC=clang -x c
override CXX=clang -x c++
override COMPILER_OBJC=clang -x objective-c
override L_CC=clang
override L_CXX=clang
endif
2012-10-29 04:26:25 +00:00
# GCC version, for conditional selection of flags.
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
ifndef GCC_MAJOR
2014-07-22 07:25:54 +00:00
GCC_MAJOR := $(shell $(CCFULLPATH) -dumpversion 2>&1 | cut -d'.' -f1)
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
endif
ifeq ($(GCC_MAJOR),)
GCC_MAJOR := 4
endif
ifndef GCC_MINOR
2014-07-22 07:25:54 +00:00
GCC_MINOR := $(shell $(CCFULLPATH) -dumpversion 2>&1 | cut -d'.' -f2)
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
endif
ifeq ($(GCC_MINOR),)
2014-07-22 07:25:54 +00:00
GCC_MINOR := 8
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
endif
2012-10-29 04:26:25 +00:00
# Detect machine architecture
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
ifndef SYSARCH
SYSARCH:=$(strip $(shell uname -m))
endif
2014-07-22 07:25:54 +00:00
SYSBITS=32
2012-10-29 04:26:25 +00:00
# Detect the platform if it wasn't explicitly given to us from
# the outside world. This allows cross-compilation by overriding
# CC and giving us PLATFORM specifically.
#
2014-12-09 23:56:31 +00:00
ifndef HOST
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
uname:=$(strip $(shell uname -s))
2014-12-09 23:56:31 +00:00
HOST=UNKNOWN
2012-10-29 04:26:25 +00:00
ifeq ($(findstring Linux,$(uname)),Linux)
2014-12-09 23:56:31 +00:00
HOST=LINUX
2012-10-29 04:26:25 +00:00
endif
ifeq ($(findstring BSD,$(uname)),BSD)
2014-12-09 23:56:31 +00:00
HOST=BSD
2012-10-29 04:26:25 +00:00
endif
ifeq ($(findstring MINGW,$(uname)),MINGW)
2014-12-09 23:56:31 +00:00
HOST=WINDOWS
2012-10-29 04:26:25 +00:00
endif
ifeq ($(findstring Darwin,$(uname)),Darwin)
2014-12-09 23:56:31 +00:00
HOST=DARWIN
2012-10-29 04:26:25 +00:00
endif
ifeq ($(findstring BeOS,$(uname)),BeOS)
2014-12-09 23:56:31 +00:00
HOST=BEOS
2012-10-29 04:26:25 +00:00
endif
ifeq ($(findstring skyos,$(uname)),skyos)
2014-12-09 23:56:31 +00:00
HOST=SKYOS
2012-10-29 04:26:25 +00:00
endif
ifeq ($(findstring QNX,$(uname)),QNX)
2014-12-09 23:56:31 +00:00
HOST=QNX
2012-10-29 04:26:25 +00:00
endif
ifeq ($(findstring SunOS,$(uname)),SunOS)
2014-12-09 23:56:31 +00:00
HOST=SUNOS
2012-10-29 04:26:25 +00:00
endif
ifeq ($(findstring syllable,$(uname)),syllable)
2014-12-09 23:56:31 +00:00
HOST=SYLLABLE
2012-10-29 04:26:25 +00:00
endif
endif
2014-12-09 23:56:31 +00:00
ifndef PLATFORM
PLATFORM=$(HOST)
endif
2012-10-29 04:26:25 +00:00
2012-12-13 02:32:59 +00:00
ifndef SUBPLATFORM
SUBPLATFORM=
ifeq ($(PLATFORM),LINUX)
SUBPLATFORM=LINUX
endif
ifeq ($(PLATFORM),DINGOO)
SUBPLATFORM=LINUX
2013-07-20 03:36:54 +00:00
CROSS=mipsel-linux-
2012-12-13 02:32:59 +00:00
endif
ifeq ($(PLATFORM),GCW)
SUBPLATFORM=LINUX
2013-07-20 03:36:54 +00:00
CROSS=mipsel-linux-
2012-12-13 02:32:59 +00:00
endif
ifeq ($(PLATFORM),CAANOO)
SUBPLATFORM=LINUX
endif
endif
2012-03-14 06:27:45 +00:00
# Binary suffix override:
EXESUFFIX_OVERRIDE ?=
2013-08-18 21:14:37 +00:00
# Are we running from synthesis?
SYNTHESIS ?= 0
2012-03-04 09:31:37 +00:00
# Mac OS X Frameworks location
# Like above, use absolute paths.
APPLE_FRAMEWORKS ?=/Library/Frameworks
2013-01-04 17:28:13 +00:00
# Without the resource files packaged in the .app bundle, the startupwindow produces errors, so give it an off switch.
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
OSX_STARTUPWINDOW ?= 1
2012-03-04 09:31:37 +00:00
2010-12-19 22:29:01 +00:00
# Engine options
2011-03-04 08:50:58 +00:00
# USE_OPENGL - enables basic OpenGL Polymost renderer
# POLYMER - enables fancy Polymer renderer
2010-12-19 22:29:01 +00:00
# NOASM - disables the use of inline assembly pragmas
# LINKED_GTK - enables compile-time linkage to GTK
#
POLYMER = 1
USE_OPENGL = 1
NOASM = 0
LINKED_GTK = 0
2011-06-17 13:11:19 +00:00
BUILD32_ON_64 ?= 0
2012-07-20 21:57:53 +00:00
USE_LIBPNG ?= 1
2011-10-11 16:53:52 +00:00
USE_LIBVPX ?= 1
2014-11-02 05:34:49 +00:00
HAVE_VORBIS ?= 1
HAVE_FLAC ?= 1
2012-12-09 13:24:44 +00:00
NETCODE ?= 1
2013-10-16 19:43:06 +00:00
2013-07-13 21:05:05 +00:00
LUNATIC ?= 0
2013-10-16 19:43:06 +00:00
USE_LUAJIT_2_1 ?= 0
2012-10-29 04:26:25 +00:00
2013-09-21 13:37:31 +00:00
# EXPERIMENTAL, unfinished x86_64 assembly routines. DO NOT ENABLE.
USE_ASM64 ?= 0
2010-12-19 22:29:01 +00:00
ifeq (0,$(USE_OPENGL))
POLYMER = 0
2011-07-18 19:06:29 +00:00
USE_LIBVPX = 0
2010-12-19 22:29:01 +00:00
endif
# Debugging/Build options
2012-11-05 02:49:08 +00:00
# CPLUSPLUS - 1 = enable C++ building
2010-12-19 22:29:01 +00:00
# RELEASE - 1 = no debugging
2014-11-22 18:37:19 +00:00
# DEBUGANYWAY:
# 1 = Include debug symbols even when generating release code.
# 2 = Also enable sanitizers with Clang. On the C side, make 'sprite' etc. be real arrays.
2014-01-12 14:04:02 +00:00
# DISABLEINLINING - 1 = compile inline functions as extern __fastcall instead of static inline
2010-12-19 22:29:01 +00:00
# KRANDDEBUG - 1 = include logging of krand() calls for debugging the demo system
2014-07-22 07:25:54 +00:00
# MEMMAP - 1 = produce .memmap file when linking
2010-12-19 22:29:01 +00:00
# EFENCE - 1 = compile with Electric Fence for malloc() debugging
# OPTLEVEL - 0..3 = GCC optimization strategy
2011-03-25 11:42:07 +00:00
# LTO - 1 = enable link-time optimization, for GCC 4.5 and up
2010-12-19 22:29:01 +00:00
#
2014-10-29 17:07:21 +00:00
CPLUSPLUS?=1
2010-12-19 22:29:01 +00:00
RELEASE?=1
DEBUGANYWAY?=0
KRANDDEBUG?=0
2014-07-22 07:25:54 +00:00
MEMMAP?=0
2012-11-05 02:49:08 +00:00
DISABLEINLINING?=0
2010-12-19 22:29:01 +00:00
EFENCE?=0
2012-01-12 20:49:34 +00:00
DMALLOC?=0
2010-12-19 22:29:01 +00:00
PROFILER?=0
2011-03-19 17:59:09 +00:00
MUDFLAP?=0
2012-11-06 07:49:44 +00:00
2014-02-08 14:37:41 +00:00
# Make allocache() a wrapper around malloc()? Useful for debugging
# allocache()-allocated memory accesses with e.g. Valgrind.
# For debugging with Valgrind + GDB, see
# http://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.gdbserver
ALLOCACHE_AS_MALLOC?=0
2013-05-04 16:36:10 +00:00
# Select the default optimization level for release and debug builds.
2013-05-06 03:12:29 +00:00
ifeq ($(RELEASE),0)
2013-05-04 16:36:10 +00:00
OPTLEVEL?=0
else
OPTLEVEL?=2
endif
2013-01-20 21:17:36 +00:00
ifeq ($(RELEASE),0)
2013-01-21 21:18:10 +00:00
override STRIP=
2013-01-20 21:17:36 +00:00
endif
ifneq ($(DEBUGANYWAY),0)
2013-01-21 21:18:10 +00:00
override STRIP=
2013-01-20 21:17:36 +00:00
endif
2013-07-13 21:05:05 +00:00
ifneq ($(LUNATIC),0)
# FIXME: Lunatic builds with LTO don't start up properly as the required
# symbol names are apparently not exported.
override LTO=0
2015-02-10 17:50:23 +00:00
ifneq ($(LUNATIC),0)
$(error "Lunatic C++ build not supported")
endif
2013-07-13 21:05:05 +00:00
endif
2012-11-06 07:49:44 +00:00
ifndef LTO
LTO=1
ifneq (0,$(CLANG))
ifeq ($(PLATFORM), WINDOWS)
LTO=0
endif
endif
endif
2014-07-22 11:19:25 +00:00
COMMONFLAGS=$(ARCH)
2014-07-22 07:25:54 +00:00
COMPILERFLAGS=
2014-07-22 11:19:25 +00:00
ifeq ($(PACKAGE_REPOSITORY),0)
COMMONFLAGS += $(OPTIMIZATIONS)
2014-07-22 07:25:54 +00:00
endif
2014-07-22 11:19:25 +00:00
OPTIMIZATIONS=-O$(OPTLEVEL) $(OPTOPT)
2014-07-22 07:25:54 +00:00
2014-07-22 11:19:25 +00:00
DEBUGFLAG=-g
2014-11-28 08:14:00 +00:00
ifeq (0,$(CLANG))
2014-07-22 11:19:25 +00:00
ifneq ($(PLATFORM),WII)
2014-12-15 19:50:52 +00:00
DEBUGFLAG=-ggdb -fno-omit-frame-pointer
2014-07-22 11:19:25 +00:00
endif
endif
2014-07-22 07:25:54 +00:00
ifneq ($(RELEASE)$(DEBUGANYWAY),10)
# debug build or DEBUGANYWAY=1 --> -g flag
2014-07-22 11:19:25 +00:00
OPTIMIZATIONS += $(DEBUGFLAG)
2014-07-22 07:25:54 +00:00
endif
2014-11-24 08:19:50 +00:00
CONLYFLAGS=-std=gnu99 -Wimplicit -Werror-implicit-function-declaration
2014-07-22 11:19:25 +00:00
CPPONLYFLAGS= -fno-exceptions -fno-rtti -Wno-write-strings
2014-07-22 07:25:54 +00:00
ASFORMAT=elf$(SYSBITS)
ASFLAGS=-s -f $(ASFORMAT) #-g
LINKERFLAGS=
LIBS=-lm
LIBDIRS=
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)))
2012-10-29 04:26:25 +00:00
F_NO_STACK_PROTECTOR := -fno-stack-protector
# there are some link-time issues with stack protectors, so make it possible to override
F_STACK_PROTECTOR_ALL ?= -fstack-protector-all
ifeq (0,$(CLANG))
F_JUMP_TABLES := -fjump-tables
endif
M_TUNE_GENERIC := -mtune=generic
M_STACKREALIGN := -mstackrealign
2013-07-18 18:08:16 +00:00
W_STRICT_OVERFLOW := -Wno-strict-overflow
2012-10-29 04:26:25 +00:00
endif
2014-12-09 23:56:31 +00:00
ifeq ($(HOST),WINDOWS)
2015-01-16 06:30:48 +00:00
# MSYS2 lets you create files named NUL but has a /dev/null. Go figure.
ifeq (,$(wildcard /dev/null))
DONT_PRINT = > NUL 2>&1
endif
2014-12-09 23:56:31 +00:00
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 ($(PLATFORM),WINDOWS)
ifndef COMPILERTARGET
COMPILERTARGET:=$(strip $(shell $(CC) -dumpmachine))
endif
ifeq ($(findstring x86_64,$(COMPILERTARGET)),x86_64)
SYSARCH:=x86_64
2014-07-23 06:04:44 +00:00
SYSBITS=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
endif
2014-07-22 07:25:54 +00:00
WINLIB?=/$(SYSBITS)
2014-07-23 06:04:44 +00:00
else
ifneq (1,$(BUILD32_ON_64))
ifeq ($(findstring x86_64,$(ARCH)),x86_64)
SYSBITS=64
endif
ifeq ($(ARCH),)
ifeq ($(findstring x86_64,$(SYSARCH)),x86_64)
SYSBITS=64
endif
endif
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
endif
2012-10-29 04:26:25 +00:00
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
ifndef DARWINVERSION
DARWINVERSION:=$(strip $(shell uname -r | cut -d . -f 1))
endif
2014-10-16 21:03:24 +00:00
DARWIN9 ?= 0
DARWIN10 ?= 0
2012-10-29 04:26:25 +00:00
ifeq (1,$(strip $(shell expr $(DARWINVERSION) \< 10)))
2014-10-16 21:03:24 +00:00
override DARWIN9 := 1
endif
ifeq (1,$(strip $(shell expr $(DARWINVERSION) \< 11)))
override DARWIN10 := 1
2012-10-29 04:26:25 +00:00
endif
2014-07-22 07:25:54 +00:00
# COMMONFLAGS += -fno-leading-underscore
2012-10-29 04:26:25 +00:00
ifeq (1,$(DARWIN9))
F_JUMP_TABLES :=
W_STRICT_OVERFLOW :=
endif
ifeq (1,$(BUILD32_ON_64))
2014-07-22 07:25:54 +00:00
COMMONFLAGS += $(F_NO_STACK_PROTECTOR)
2012-10-29 04:26:25 +00:00
else
ifeq ($(findstring ppc,$(ARCH)),ppc)
2014-07-22 07:25:54 +00:00
COMMONFLAGS += $(F_NO_STACK_PROTECTOR)
2012-10-29 04:26:25 +00:00
endif
endif
2012-12-29 10:54:35 +00:00
ifneq (0,$(OSX_STARTUPWINDOW))
2014-07-22 07:25:54 +00:00
COMPILERFLAGS+= -DOSX_STARTUPWINDOW
2012-12-29 10:54:35 +00:00
endif
2012-10-29 04:26:25 +00:00
endif
2014-07-22 07:25:54 +00:00
2014-07-24 14:01:44 +00:00
ifneq (0,$(RELEASE))
# Debugging disabled
COMMONFLAGS += $(F_NO_STACK_PROTECTOR)
else
# Debugging enabled
ifneq (0,$(KRANDDEBUG))
COMMONFLAGS += -fno-inline -fno-inline-functions -fno-inline-functions-called-once
endif
ifeq (1,$(SDL_TARGET))
COMPILERFLAGS += -DNOSDLPARACHUTE
endif
endif
2012-10-29 04:26:25 +00:00
ifndef OPTOPT
ifeq ($(PLATFORM), WII)
OPTOPT=
else
OPTOPTARCH=$(ARCH)
ifeq (,$(OPTOPTARCH))
OPTOPTARCH=$(SYSARCH)
endif
ifeq (i686,$(findstring i686, $(OPTOPTARCH)))
OPTOPT=-march=pentium3 $(M_TUNE_GENERIC) -mmmx
# -msse2 -mfpmath=sse,387 -malign-double $(M_STACKREALIGN)
else
OPTOPT=
endif
endif
endif
2010-12-19 22:29:01 +00:00
ifneq (0,$(KRANDDEBUG))
RELEASE=0
endif
ifneq (0,$(PROFILER))
2014-11-22 18:37:19 +00:00
# XXX: Why?
2010-12-19 22:29:01 +00:00
DEBUGANYWAY=1
endif
2012-03-12 04:49:16 +00:00
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)))
ifeq (1,$(strip $(shell expr $(GCC_MINOR) \>= 1)))
2014-07-22 07:25:54 +00:00
COMPILERFLAGS+= -Wno-attributes
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
endif
endif
2012-05-20 07:25:25 +00:00
ifeq ($(PLATFORM),WII)
override USE_LIBVPX = 0
2014-03-22 13:21:03 +00:00
override NETCODE = 0
2014-11-02 05:34:49 +00:00
override HAVE_FLAC = 0
2012-05-20 07:25:25 +00:00
endif
2013-07-20 03:36:54 +00:00
ifeq ($(PLATFORM),GCW)
override USE_LIBVPX = 0
endif
ifeq ($(PLATFORM),DINGOO)
override USE_LIBVPX = 0
endif
2012-05-20 07:25:25 +00:00
2011-07-18 19:06:29 +00:00
ifneq (0,$(USE_LIBVPX))
2011-09-21 22:38:37 +00:00
# On Windows, we link statically to libvpx
2014-07-22 07:25:54 +00:00
LIBS+= -lvpx
2011-07-18 19:06:29 +00:00
endif
2011-03-19 18:07:12 +00:00
2012-01-28 14:36:52 +00:00
2014-02-08 14:37:41 +00:00
ifneq ($(ALLOCACHE_AS_MALLOC),0)
2014-07-22 07:25:54 +00:00
COMPILERFLAGS += -DDEBUG_ALLOCACHE_AS_MALLOC
2014-02-08 14:37:41 +00:00
endif
2013-08-18 19:24:15 +00:00
# See http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
# for a list of possible UBSan options.
# Clang 3.2 does only supports -fsanitize=address for the AddressSanitizer
2014-11-22 18:37:19 +00:00
CLANG_DEBUG_FLAGS := -fsanitize=address -fsanitize=bounds,enum,float-cast-overflow,object-size
#CLANG_DEBUG_FLAGS := $(CLANG_DEBUG_FLAGS),signed-integer-overflow
#CLANG_DEBUG_FLAGS := $(CLANG_DEBUG_FLAGS),unsigned-integer-overflow
#CLANG_DEBUG_FLAGS := $(CLANG_DEBUG_FLAGS) -fsanitize-undefined-trap-on-error
2013-08-18 19:24:15 +00:00
2010-12-19 22:29:01 +00:00
ifneq (0,$(RELEASE))
2014-11-22 18:37:19 +00:00
## Debugging disabled
2012-05-18 21:40:38 +00:00
ifeq (0,$(CLANG))
2014-07-22 07:25:54 +00:00
COMMONFLAGS += -funswitch-loops
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)))
2014-10-25 10:17:15 +00:00
override LTO=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
endif
ifeq (1,$(strip $(shell expr $(GCC_MAJOR) = 4)))
2014-10-25 10:17:15 +00:00
ifeq ($(PLATFORM),WII)
ifeq (1,$(strip $(shell expr $(GCC_MINOR) \< 8)))
override LTO=0
endif
else
ifeq (1,$(strip $(shell expr $(GCC_MINOR) \< 6)))
override LTO=0
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
endif
endif
2011-12-15 22:43:01 +00:00
endif
2014-11-22 18:37:19 +00:00
2011-09-22 16:52:55 +00:00
ifeq (0,$(DEBUGANYWAY))
2014-07-22 07:25:54 +00:00
COMMONFLAGS += -fomit-frame-pointer
COMPILERFLAGS += -DNDEBUG
2012-11-09 22:31:02 +00:00
else
2014-11-22 18:37:19 +00:00
# Our $(DEBUGANYWAY) -> DEBUGGINGAIDS #define
COMPILERFLAGS += -DDEBUGGINGAIDS=$(DEBUGANYWAY)
ifneq (0,$(CLANG))
ifeq (2,$(DEBUGANYWAY))
COMMONFLAGS += $(CLANG_DEBUG_FLAGS)
endif
endif
2011-09-22 16:52:55 +00:00
endif
2014-11-22 18:37:19 +00:00
2011-03-25 11:42:07 +00:00
ifneq (0,$(LTO))
2014-07-22 07:25:54 +00:00
COMPILERFLAGS += -DUSING_LTO
COMMONFLAGS += -flto
2011-03-25 11:42:07 +00:00
endif
2010-12-19 22:29:01 +00:00
else
2014-11-22 18:37:19 +00:00
## Debugging enabled
# Our $(DEBUGANYWAY) -> DEBUGGINGAIDS #define
COMPILERFLAGS += -DDEBUGGINGAIDS=$(DEBUGANYWAY)
ifneq (0,$(CLANG))
ifeq (2,$(DEBUGANYWAY))
COMMONFLAGS += $(CLANG_DEBUG_FLAGS)
endif
Inreased debugging level for catching oob accesses to 'main' arrays.
If enabled, this makes the following arrays be allocated statically:
spriteext, spritesmooth, sector, wall, sprite, tsprite, while
necessarily disabling the clipshape feature (because it relies on
setting sector/wall to different malloc'd block temporarily).
To compile, pass DEBUGANYWAY=1 in addition to RELEASE=0 to 'make',
and it's really only useful with CC=clang, of course.
git-svn-id: https://svn.eduke32.com/eduke32@2270 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-19 23:17:34 +00:00
endif
2012-12-13 02:32:59 +00:00
ifeq ($(SUBPLATFORM),LINUX)
2014-07-22 07:25:54 +00:00
LIBS+=-rdynamic
2011-01-16 07:19:29 +00:00
endif
2014-11-22 18:37:19 +00:00
2011-03-19 17:59:09 +00:00
ifneq (0,$(MUDFLAP))
2014-07-22 07:25:54 +00:00
LIBS+= -lmudflapth
COMMONFLAGS += -fmudflapth
2011-03-19 17:59:09 +00:00
endif
2010-12-19 22:29:01 +00:00
ifneq (0,$(PROFILER))
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 ($(PLATFORM),DARWIN)
2014-07-22 07:25:54 +00:00
LIBS+= -lprofiler
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
endif
2014-07-22 07:25:54 +00:00
COMMONFLAGS += -pg
2010-12-19 22:29:01 +00:00
endif
ifneq (0,$(KRANDDEBUG))
2014-07-22 07:25:54 +00:00
COMPILERFLAGS += -DKRANDDEBUG=1
2010-12-19 22:29:01 +00:00
endif
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
W_NO_UNUSED_RESULT :=
2012-05-18 21:40:38 +00:00
ifeq (0,$(CLANG))
2012-08-27 03:48:27 +00:00
# W_NO_UNUSED_RESULT := $(shell echo '' | $(CC) -E -Wno-unused-result - 2>/dev/null && echo -Wno-unused-result)
# W_NO_UNUSED_RESULT := $(findstring -Wno-unused-result,$(W_NO_UNUSED_RESULT))
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)))
ifeq (1,$(strip $(shell expr $(GCC_MINOR) \>= 4)))
W_NO_UNUSED_RESULT := -Wno-unused-result
endif
endif
2011-12-09 19:08:47 +00:00
endif
2011-02-12 13:25:24 +00:00
2014-11-24 08:19:50 +00:00
CWARNS := -W -Wall \
2012-07-01 22:11:35 +00:00
-Wpointer-arith \
-Wextra \
2014-07-22 07:25:54 +00:00
-Wno-char-subscripts \
2012-07-01 22:11:35 +00:00
#-Wstrict-prototypes \
#-Waggregate-return \
#-Wwrite-strings \
#-Wcast-qual -Wcast-align \
#-Waddress -Wlogical-op
2012-05-18 21:40:38 +00:00
ifneq (0,$(CLANG))
2014-07-22 07:25:54 +00:00
CWARNS+= -Wno-unused-value -Wno-parentheses
2011-12-09 19:08:47 +00:00
endif
2014-07-22 07:25:54 +00:00
COMMONFLAGS+= -funsigned-char -fno-strict-aliasing $(F_JUMP_TABLES)
2012-12-09 13:24:44 +00:00
2014-11-22 12:33:57 +00:00
COMPILERFLAGS+= $(CWARNS) $(W_NO_UNUSED_RESULT) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
2012-11-10 20:59:00 +00:00
2014-07-22 07:25:54 +00:00
ifeq (0,$(NETCODE))
COMPILERFLAGS+= -DNETCODE_DISABLE
2013-07-20 03:36:54 +00:00
endif
2012-12-13 02:34:30 +00:00
2014-07-22 07:25:54 +00:00
2013-07-13 21:05:05 +00:00
#### Lunatic development
# LuaJIT standalone interpreter executable:
2013-08-11 15:28:42 +00:00
LUAJIT:=luajit
2013-08-18 21:14:37 +00:00
# Options to "luajit -b" for synthesis. Since it runs on Linux, we need to tell
# the native LuaJIT to emit PE object files.
2014-02-10 10:58:38 +00:00
ifeq ($(PLATFORM),WINDOWS)
LUAJIT_BCOPTS := -o windows
2014-07-22 07:25:54 +00:00
ifeq (32,$(SYSBITS))
2014-02-10 10:58:38 +00:00
LUAJIT_BCOPTS += -a x86
endif
2014-07-22 07:25:54 +00:00
ifeq (64,$(SYSBITS))
2014-02-10 10:58:38 +00:00
LUAJIT_BCOPTS += -a x64
endif
2013-08-18 21:14:37 +00:00
endif
2012-11-10 20:59:00 +00:00
ifneq ($(LUNATIC),0)
# FIXME: Lunatic doesn't build with inlining because of wacky include
# chains!
override DISABLEINLINING=1
2014-01-31 21:13:03 +00:00
ifneq ($(CPLUSPLUS),0)
# FIXME: Lunatic C++ doesn't build because otherwise it doesn't find
# INT32_MIN and the like.
2014-07-22 07:25:54 +00:00
COMPILERFLAGS+= -D__STDC_LIMIT_MACROS
2014-01-31 21:13:03 +00:00
endif
2014-07-22 07:25:54 +00:00
COMPILERFLAGS+= -Isource/lunatic -DLUNATIC
2013-10-16 19:43:06 +00:00
ifneq ($(USE_LUAJIT_2_1),0)
2014-07-22 07:25:54 +00:00
COMPILERFLAGS+= -DUSE_LUAJIT_2_1
2013-10-16 19:43:06 +00:00
endif
2012-11-10 20:59:00 +00:00
2013-05-17 10:41:57 +00:00
# Determine size of defs.ilua bytecode once.
ifndef DEFS_BC_SIZE
2014-07-22 07:25:54 +00:00
DEFS_BC_SIZE := $(shell $(LUAJIT) -bg -t h source/lunatic/defs.ilua -)
2013-05-17 10:41:57 +00:00
DEFS_BC_SIZE := $(word 3, $(DEFS_BC_SIZE))
2014-01-02 00:08:36 +00:00
# Pass it to the sub-makes, too.
2013-05-17 10:41:57 +00:00
export DEFS_BC_SIZE
endif
2014-01-02 00:08:36 +00:00
# Determine size of defs_m32.ilua bytecode once.
ifndef DEFS_M32_BC_SIZE
2014-07-22 07:25:54 +00:00
DEFS_M32_BC_SIZE := $(shell $(LUAJIT) -bg -t h source/lunatic/defs_m32.ilua -)
2014-01-02 00:08:36 +00:00
DEFS_M32_BC_SIZE := $(word 3, $(DEFS_M32_BC_SIZE))
export DEFS_M32_BC_SIZE
endif
2014-07-22 07:25:54 +00:00
COMPILERFLAGS+= -DLUNATIC_DEFS_BC_SIZE=$(DEFS_BC_SIZE) -DLUNATIC_DEFS_M32_BC_SIZE=$(DEFS_M32_BC_SIZE)
2013-02-24 16:05:31 +00:00
2012-11-10 20:59:00 +00:00
ifeq ($(PLATFORM),WINDOWS)
2014-07-22 07:25:54 +00:00
LIBS+= -lluajit
2012-11-10 20:59:00 +00:00
else
2014-07-22 07:25:54 +00:00
LIBS+= -lluajit-5.1
2012-11-10 20:59:00 +00:00
endif
endif
####
2012-11-05 02:49:08 +00:00
ifneq (0,$(DISABLEINLINING))
2014-07-22 07:25:54 +00:00
COMPILERFLAGS+= -DDISABLE_INLINING
2012-11-05 02:49:08 +00:00
endif
2012-06-01 20:09:27 +00:00
# This should come from the environment:
ifdef EDUKE32_MY_DEVELOPER_ID
2014-07-22 07:25:54 +00:00
COMPILERFLAGS+= -DMY_DEVELOPER_ID=$(EDUKE32_MY_DEVELOPER_ID)
2012-06-01 20:09:27 +00:00
endif
2011-03-19 18:07:12 +00:00
ifneq (0,$(USE_LIBPNG))
2014-07-22 07:25:54 +00:00
COMPILERFLAGS+= -DUSE_LIBPNG
2011-03-19 18:07:12 +00:00
endif
2011-07-18 19:06:29 +00:00
ifneq (0,$(USE_LIBVPX))
2014-07-22 07:25:54 +00:00
COMPILERFLAGS+= -DUSE_LIBVPX
2011-07-18 19:06:29 +00:00
endif
2010-12-19 22:29:01 +00:00
2014-11-02 05:34:49 +00:00
ifneq (0,$(HAVE_VORBIS))
COMPILERFLAGS+= -DHAVE_VORBIS
endif
ifneq (0,$(HAVE_FLAC))
COMPILERFLAGS+= -DHAVE_FLAC
endif
2011-10-02 07:16:57 +00:00
ifneq (0,$(EFENCE))
2014-07-22 07:25:54 +00:00
LIBS+= -lefence
COMPILERFLAGS+= -DEFENCE
2011-10-02 07:16:57 +00:00
endif
2012-01-12 20:49:34 +00:00
ifneq (0,$(DMALLOC))
2014-07-22 07:25:54 +00:00
LIBS+= -ldmalloc
COMPILERFLAGS+= -DDMALLOC
2012-01-12 20:49:34 +00:00
endif
2011-10-02 07:16:57 +00:00
2014-07-22 07:25:54 +00:00
# may be overridden
2010-12-19 22:29:01 +00:00
EXESUFFIX=
2014-07-22 07:25:54 +00:00
DLLSUFFIX=.so
SDL_TARGET ?= 2
2014-10-16 21:03:24 +00:00
SDL_FRAMEWORK ?= 0
2014-07-22 07:25:54 +00:00
ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
L_SSP := -lssp
endif
# NOTE: If your setup doesn't have libstdc++, you can try using libsupc++.
# Search for STDCPPLIB below and change it to -lsupc++.
SDL_INCLUDES=-I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
SDL_LIB=-l$(SDLNAME)
SDL_MIXER_LIB=-l$(SDLNAME)_mixer
ifeq ($(SUBPLATFORM),LINUX)
RENDERTYPE=SDL
MIXERTYPE=SDL
COMPILERFLAGS+= -DHAVE_INTTYPES
GTKCOMPAT32=0
SDL_FRAMEWORK=0
# On Linux, we don't need to specify libstdc++ manually, the linker will
# presumably take care for us.
STDCPPLIB:=
ifeq ($(PLATFORM),GCW)
override USE_OPENGL=0
override NOASM=1
endif
ifeq ($(PLATFORM),DINGOO)
override USE_OPENGL=0
override NOASM=1
endif
ifeq ($(findstring x86_64,$(SYSARCH)),x86_64)
ifeq (1,$(BUILD32_ON_64))
# On my 64bit Gentoo these are the 32bit emulation libs
LIBS+= -m32
LIBDIRS+= -L/emul/linux/x86/usr/lib
COMMONFLAGS+= -m32
# Override WITHOUT_GTK=0
GTKCOMPAT32=1
else
override NOASM=1
endif
endif
2014-07-24 14:01:44 +00:00
LIBS+= -lrt
ifeq (0,$(CLANG))
COMMONFLAGS += -fno-pic
endif
2014-07-22 07:25:54 +00:00
endif
ifeq ($(PLATFORM),DARWIN)
COMPILERFLAGS+= -DUNDERSCORES
ASFORMAT=macho$(SYSBITS)
ASFLAGS+= -DUNDERSCORES
2014-11-28 08:14:00 +00:00
# ASM on OS X crashes in mmxoverlay()
override NOASM=1
2014-07-22 07:25:54 +00:00
2014-10-18 04:50:47 +00:00
# LIBDIRS+= -Lplatform/Apple/lib
# COMPILERFLAGS+= -Iplatform/Apple/include
2014-10-16 21:03:24 +00:00
ifneq ($(shell port --version &>/dev/null; echo $$?),127)
LIBDIRS+= -L/opt/local/lib
COMPILERFLAGS+= -I/opt/local/include
endif
ifneq ($(shell brew --version &>/dev/null; echo $$?),127)
LIBDIRS+= -L/usr/local/lib
COMPILERFLAGS+= -I/usr/local/include
endif
ifneq ($(shell fink --version &>/dev/null; echo $$?),127)
LIBDIRS+= -L/sw/lib
COMPILERFLAGS+= -I/sw/include
endif
2014-07-22 07:25:54 +00:00
RENDERTYPE = SDL
MIXERTYPE = SDL
STDCPPLIB:=-lstdc++
COMPILERFLAGS += -DHAVE_INTTYPES
2014-10-16 21:03:24 +00:00
DLLSUFFIX=.dylib
2014-07-22 07:25:54 +00:00
GTKCOMPAT32 = 0
2014-07-22 11:19:45 +00:00
WITHOUT_GTK ?= 1
2014-07-22 07:25:54 +00:00
ifeq (1,$(SDL_FRAMEWORK))
SDL_INCLUDES=-I$(APPLE_FRAMEWORKS)/SDL.framework/Headers -I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
SDL_LIB=-l$(SDLNAME)main -Wl,-framework,SDL -Wl,-rpath -Wl,"@loader_path/../Frameworks"
SDL_MIXER_LIB=-Wl,-framework,SDL_mixer
endif
ifeq (1,$(DARWIN9))
COMPILERFLAGS += -DDARWIN9
endif
2014-06-16 23:16:23 +00:00
2014-07-22 07:25:54 +00:00
ifeq (1,$(BUILD32_ON_64))
ARCH=-arch i386
endif
ifneq ($(findstring x86_64,$(ARCH)),x86_64)
ifeq (,$(ARCH))
ifneq ($(findstring x86_64,$(SYSARCH)),x86_64)
LINKERFLAGS += -read_only_relocs suppress
endif
else
LINKERFLAGS += -read_only_relocs suppress
endif
endif
2014-07-24 14:01:44 +00:00
2014-11-28 08:14:00 +00:00
ifeq (0,$(CLANG))
COMMONFLAGS += -fno-pic
endif
2014-07-22 07:25:54 +00:00
endif
ifeq ($(PLATFORM),WINDOWS)
COMPILERFLAGS+= -DUNDERSCORES -DHAVE_INTTYPES -Iplatform/Windows/include
LINKERFLAGS+= -static-libgcc
ASFORMAT=win$(SYSBITS)
ASFLAGS+= -DUNDERSCORES
# Windows types can be SDL or WIN
RENDERTYPE?=SDL
MIXERTYPE?=WIN
ifneq ($(RENDERTYPE),SDL)
ifeq ($(MIXERTYPE),SDL)
MIXERTYPE:=WIN
endif
endif
SDL_INCLUDES=
ifeq ($(SDL_TARGET),1)
SDL_MIXER_LIB=platform/Windows/lib$(WINLIB)/SDL_mixer.lib
endif
WITHOUT_GTK?=1
SDLCONFIG=
SDL_FRAMEWORK=1
EXESUFFIX=.exe
DLLSUFFIX=.dll
2014-07-23 07:21:29 +00:00
LIBDIRS+= -Lplatform/Windows/lib$(WINLIB)
2014-07-22 07:25:54 +00:00
LIBS+= -Wl,--enable-auto-import -lmingwex -lgdi32 -lcomctl32 -lwinmm $(L_SSP) -lwsock32 -lws2_32 -lshlwapi
ifeq (0,$(CLANG))
LIBS+= -mwindows
endif
#-lshfolder
STDCPPLIB:=-lstdc++
ifeq ($(findstring x86_64,$(SYSARCH)),x86_64)
ifneq (1,$(BUILD32_ON_64))
override NOASM=1
endif
endif
2014-07-24 14:01:44 +00:00
COMMONFLAGS += -fno-pic
2014-07-22 07:25:54 +00:00
endif
ifeq ($(PLATFORM),BSD)
COMPILERFLAGS+= -I/usr/X11R6/include
RENDERTYPE=SDL
MIXERTYPE=SDL
COMPILERFLAGS+= -DHAVE_INTTYPES
ifneq ($(findstring i386,$(SYSARCH)),i386)
override NOASM=1
endif
STDCPPLIB:=-lstdc++
endif
ifeq ($(PLATFORM),BEOS)
override NOASM=1
RENDERTYPE=SDL
MIXERTYPE=SDL
STDCPPLIB:=-lstdc++
endif
ifeq ($(PLATFORM),SKYOS)
RENDERTYPE=SDL
MIXERTYPE=SDL
EXESUFFIX=.app
override NOASM=1
COMPILERFLAGS+= -DUNDERSCORES -I/boot/programs/sdk/include/sdl
SDLCONFIG=
LIBS+= -lSDL -lnet
endif
ifeq ($(PLATFORM),WII)
RENDERTYPE=SDL
MIXERTYPE=SDL
SDL_INCLUDES=
EXESUFFIX=.elf
override USE_OPENGL=0
override POLYMER=0
override NOASM=1
override WITHOUT_GTK=1
# -msdata=eabi
COMMONFLAGS+= -g -mtune=750 -meabi -mhard-float
COMPILERFLAGS+= -DGEKKO -DHAVE_INTTYPES -D__POWERPC__ -I$(LIBOGC_INC) -I$(PORTLIBS)/include -Iplatform/Wii/include
SDLCONFIG=
SDL_TARGET=1
SDL_FRAMEWORK=1
2014-07-23 07:21:29 +00:00
LIBDIRS += -L$(LIBOGC_LIB) -L$(PORTLIBS)/lib -Lplatform/Wii/lib
2014-07-22 07:25:54 +00:00
endif
ifeq ($(PLATFORM),QNX)
RENDERTYPE=SDL
MIXERTYPE=SDL
override USE_OPENGL=0
override NOASM=1
STDCPPLIB:=-lstdc++
LIBS+= -lsocket
endif
ifeq ($(PLATFORM),SUNOS)
RENDERTYPE=SDL
MIXERTYPE=SDL
override USE_OPENGL=0
override NOASM=1
STDCPPLIB:=-lstdc++
LIBS+= -lsocket -lnsl
endif
ifeq ($(PLATFORM),SYLLABLE)
RENDERTYPE=SDL
MIXERTYPE=SDL
override USE_OPENGL=0
override NOASM=1
endif
ifeq ($(PLATFORM),GCW)
COMPILERFLAGS += -D__OPENDINGUX__
endif
ifeq ($(PLATFORM),DINGOO)
COMPILERFLAGS += -D__OPENDINGUX__
endif
ifneq ($(EXESUFFIX_OVERRIDE),)
EXESUFFIX=$(EXESUFFIX_OVERRIDE)
endif
ifneq (0,$(CLANG))
ifneq (,$(STDCPPLIB))
STDCPPLIB:=-Xlinker $(STDCPPLIB)
endif
endif
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
SDL_STATIC?=1
ifeq ($(RENDERTYPE),SDL)
COMPILERFLAGS += -DSDL_TARGET=$(SDL_TARGET)
ifeq ($(SDL_FRAMEWORK),1)
COMPILERFLAGS += -DSDL_FRAMEWORK
endif
ifneq ($(PLATFORM),WINDOWS)
ifeq ($(SDL_FRAMEWORK),1)
ifeq ($(PLATFORM),DARWIN)
LIBS += -Wl,-framework,SDL
COMPILERFLAGS+= -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
-I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
endif
else
ifneq ($(SDLCONFIG),)
SDLCONFIG_COMMONFLAGS:=$(subst -Dmain=SDL_main,,$(strip $(shell $(SDLCONFIG) --cflags)))
SDLCONFIG_LIBS:=$(strip $(shell $(SDLCONFIG) --libs))
LIBS+= $(SDLCONFIG_LIBS)
COMMONFLAGS+= $(SDLCONFIG_COMMONFLAGS)
endif
endif
else
COMPILERFLAGS += -D_GNU_SOURCE=1
ifneq ($(SDL_STATIC),0)
ifneq ($(SDL_TARGET),1) # Since SDL2 is under the zlib license, link statically if possible.
LIBS+= -static
endif
endif
LIBS+= -l$(SDLNAME)main -l$(SDLNAME) -lmingw32 -lgdi32 -limm32 -lole32 -loleaut32 -lwinmm -lversion
endif
ifeq (1,$(WITHOUT_GTK))
HAVE_GTK2=0
else
2014-07-22 11:19:25 +00:00
ifneq (No,$(shell $(PKG_CONFIG) --exists gtk+-2.0 || echo No))
2014-07-22 07:25:54 +00:00
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)
2014-07-22 11:19:25 +00:00
LIBS+= $(shell $(PKG_CONFIG) --libs gtk+-2.0 | sed 's/\s-l\(pango\)\{0,1\}cairo\S*\s/ /g')
2014-07-22 07:25:54 +00:00
else
2014-07-22 11:19:25 +00:00
LIBS+= $(shell $(PKG_CONFIG) --libs gtk+-2.0)
2014-07-22 07:25:54 +00:00
endif
endif
2014-07-22 11:19:25 +00:00
COMPILERFLAGS += -DHAVE_GTK2 $(shell $(PKG_CONFIG) --cflags gtk+-2.0)
2014-07-22 07:25:54 +00:00
else
HAVE_GTK2=0
endif
endif
COMPILERFLAGS += $(SDL_INCLUDES)
ifneq ($(MIXERTYPE),WIN)
LIBS += $(SDL_MIXER_LIB)
endif
LIBS += $(SDL_LIB)
endif
ifeq ($(RENDERTYPE),WIN)
LIBS+= -ldxguid
endif
# SDL depends on these
ifeq ($(PLATFORM),WINDOWS)
ifeq ($(RENDERTYPE),SDL)
SDL_LIB:=-l$(SDLNAME)main $(SDL_LIB)
ifeq ($(MIXERTYPE),WIN)
LIBS+= -ldxguid_sdl
endif
endif
endif
ifeq ($(PLATFORM),WII)
LIBS+= -laesnd_tueidj -lpng -lfat -lwiiuse -lbte -logc -lm -lwiikeyboard
endif
COMPILERFLAGS+= -DRENDERTYPE$(RENDERTYPE)=1 -DMIXERTYPE$(MIXERTYPE)=1 $(W_STRICT_OVERFLOW)
ifneq (0,$(USE_OPENGL))
COMPILERFLAGS+= -DUSE_OPENGL
endif
ifneq (0,$(NOASM))
COMPILERFLAGS+= -DNOASM
endif
ifneq (0,$(USE_ASM64))
COMPILERFLAGS+= -DUSE_ASM64
endif
ifneq (0,$(LINKED_GTK))
COMPILERFLAGS+= -DLINKED_GTK
endif
ifneq (0,$(POLYMER))
ifneq (0,$(USE_OPENGL))
COMPILERFLAGS+= -DPOLYMER
endif
endif
STATICSTDCPP?=
ifeq (1,$(STATICSTDCPP))
STATICSTDCPP= -static
endif
ifeq (0,$(STATICSTDCPP))
STATICSTDCPP= -shared
endif
ifneq ($(PLATFORM),WINDOWS)
ifneq ($(PLATFORM),WII)
LIBS+= -ldl
2014-10-25 10:17:15 +00:00
ifneq ($(PLATFORM),DARWIN)
LIBS+= -pthread
endif
2014-10-16 21:03:24 +00:00
endif
2014-07-22 07:25:54 +00:00
endif
ifeq ($(PLATFORM),WINDOWS)
ifneq ($(USE_LIBPNG),0)
LIBS+= -lpng_mini -lz_mini
endif
else
ifeq ($(PLATFORM),DARWIN)
ifneq ($(USE_LIBPNG),0)
LIBS+= -lpng # -lz
endif
else
ifneq ($(USE_LIBPNG),0)
LIBS+= -lpng -lz
endif
endif
endif
ifeq ($(PLATFORM),WINDOWS)
ifneq ($(findstring x86_64,$(COMPILERTARGET)),x86_64)
LINKERFLAGS+= -Wl,--large-address-aware
endif
endif
ifneq (0,$(MEMMAP))
ifeq ($(PLATFORM),DARWIN)
LINKERFLAGS+=-Wl,-map -Wl,$@.memmap
else
LINKERFLAGS+=-Wl,-Map=$@.memmap
endif
endif
ifneq (0,$(PROFILER))
LINKERFLAGS+=-pg
endif
ifeq ($(PLATFORM),WII)
LINKERFLAGS+= -mrvl -meabi -mhard-float -Wl,--gc-sections
# -msdata=eabi
endif
2014-07-28 08:59:58 +00:00
# Detect version control revision, if applicable
ifeq (,$(VC_REV))
ifneq (,$(wildcard EDUKE32_REVISION))
VC_REV := $(shell cat EDUKE32_REVISION)
endif
endif
ifeq (,$(VC_REV))
VC_REV := $(shell svn info 2>&1 | grep Revision | cut -d' ' -f2)
endif
ifeq (,$(VC_REV))
VC_REV := $(shell git svn info 2>&1 | grep Revision | cut -d' ' -f2)
endif
ifneq (,$(VC_REV)$(VC_REV_CUSTOM))
REVFLAG += -DREV="\"r$(VC_REV)$(VC_REV_CUSTOM)\""
endif
2014-07-22 07:25:54 +00:00
COMPILER=$(CC) $(CONLYFLAGS)
LINKER=$(L_CC)
ifneq ($(CPLUSPLUS),0)
2014-07-22 11:19:25 +00:00
COMPILER=$(CXX) $(CPPONLYFLAGS)
2014-07-22 07:25:54 +00:00
LINKER=$(L_CXX)
endif
2014-06-16 23:16:23 +00:00
ifneq (,$(CUSTOMOPT))
2014-07-22 07:25:54 +00:00
COMMONFLAGS+= $(CUSTOMOPT)
endif
ifneq (,$(CFLAGS))
COMMONFLAGS+= $(CFLAGS)
endif
2014-07-22 11:19:25 +00:00
ifneq (,$(CXXFLAGS))
CPPONLYFLAGS+= $(CXXFLAGS)
endif
ifneq (,$(LDFLAGS))
LINKERFLAGS+= $(LDFLAGS)
endif
2014-07-22 07:25:54 +00:00
ifeq ($(PRETTY_OUTPUT),1)
RECIPE_IF = if
BUILD_SETTINGS_COMPILER = \033[1;36mcompiler: \033[0;36m\"$(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS)\"
BUILD_SETTINGS_ASSEMBLER = \033[1;36massembler: \033[0;36m\"$(AS) $(ASFLAGS)\"
BUILD_SETTINGS_LINKER = \033[1;36mlinker: \033[0;36m\"$(LINKER) $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB)\"
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"
BUILD_FINISHED = printf "\033[K\033[1;36mBuild successful:\033[0m\n"
COMPILE_STATUS = printf "\033[K\033[0mBuilding object \033[1m$@\033[0m...\033[0m\r"
COMPILE_OK = printf "\033[K\033[0;32mBuilt object \033[1;32m$@\033[0;32m \033[0m\n"
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
RECIPE_RESULT_COMPILE = ; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
ONESTEP_STATUS = printf "\033[K\033[0mBuilding executable \033[1m$@\033[0m...\033[0m\r"
ONESTEP_OK = printf "\033[K\033[0;32mBuilt executable \033[1;32m$@\033[0;32m \033[0m\n"
ONESTEP_FAILED = printf "\033[K\033[0;31mFailed building executable \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1
RECIPE_RESULT_ONESTEP = ; then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
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
RECIPE_RESULT_ARCHIVE = ; then $(ARCHIVE_OK); else $(ARCHIVE_FAILED); fi
LINK_STATUS = printf "\033[K\033[0;0mLinking executable \033[1m$@\033[0;0m...\033[0m\r"
LINK_OK = printf "\033[K\033[0;32mLinked executable \033[1;32m$@\033[0;32m \033[0m\n"
LINK_FAILED = printf "\033[K\033[0;31mFailed linking executable \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1
RECIPE_RESULT_LINK = ; then $(LINK_OK); else $(LINK_FAILED); fi
else
RECIPE_IF =
BUILD_STARTED =
BUILD_ECHOFLAGS =
BUILD_FINISHED =
COMPILE_STATUS =
COMPILE_OK = true
COMPILE_FAILED = false; exit 1
RECIPE_RESULT_COMPILE =
ONESTEP_STATUS =
ONESTEP_OK = true
ONESTEP_FAILED = false; exit 1
RECIPE_RESULT_ONESTEP =
ARCHIVE_STATUS =
ARCHIVE_OK = true
ARCHIVE_FAILED = false; exit 1
RECIPE_RESULT_ARCHIVE =
LINK_STATUS =
LINK_OK = true
LINK_FAILED = false; exit 1
RECIPE_RESULT_LINK =
2014-06-16 23:16:23 +00:00
endif