Commit Graph

102 Commits

Author SHA1 Message Date
hendricks266 61f31c36ad Three Mac patches from rhoenie:
-sdlayer: Apple and GTK are not mutually exclusive.
-Makefile.common: Specify WITHOUT_GTK?=1 by default.
-Makefile: Limit linking with the QuickTime framework to OS X 10.6 and below.
One fix from me:
-osxbuild.sh: Fix building tools.

git-svn-id: https://svn.eduke32.com/eduke32@4548 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-22 11:19:45 +00:00
hendricks266 68b56adbe2 Deal with a few common themes in downstream patches applied by OpenBSD, FreeBSD, Gentoo Linux, and possibly others.
-Respect CC and CXX if already set in the environment.
-Respect CFLAGS, CXXFLAGS, and LDFLAGS if set or specified.
-Give packagers the setting "PACKAGE_REPOSITORY=1" to prevent us from adding our own optimization parameters.

git-svn-id: https://svn.eduke32.com/eduke32@4547 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-22 11:19:25 +00:00
hendricks266 b332189ae5 Ball-busting Makefile restructure.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4543 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-22 07:25:54 +00:00
hendricks266 304a13e259 Fix build with GCC 4.9.
git-svn-id: https://svn.eduke32.com/eduke32@4513 1a8010ca-5511-0410-912e-c29ae57300e0
2014-06-16 23:16:23 +00:00
helixhorned b4a050b0cf Makefile.common: pass Clang sanitizer flags in release DEBUGANYWAY builds, too.
Also,
 - add a static assertion to engine.c
 - gameexec.c: compile out an unused function in Lunatic builds

git-svn-id: https://svn.eduke32.com/eduke32@4451 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-19 22:42:22 +00:00
terminx cf14fef6c5 *nix ENet build fix. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4390 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-22 13:21:03 +00:00
hendricks266 14db3b178d Build system: Detect the SVN revision and generate rev.h directly from the Makefile, if applicable.
git-svn-id: https://svn.eduke32.com/eduke32@4343 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 08:02:41 +00:00
helixhorned 23ecf8cce0 Amend r4318: Lunatic doesn't need the safety check.
git-svn-id: https://svn.eduke32.com/eduke32@4328 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-12 21:02:59 +00:00
hendricks266 fd3712ab22 Windows: Full library refresh.
git-svn-id: https://svn.eduke32.com/eduke32@4319 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:58:38 +00:00
hendricks266 8db0c9c729 Fix errors and warnings with LLVM/clang 3.4 Windows.
git-svn-id: https://svn.eduke32.com/eduke32@4315 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:55:13 +00:00
helixhorned 0d0f3a1cd2 Add Makefile.common switch ALLOCACHE_AS_MALLOC, remove DEBUG_WITH_VALGRIND.
git-svn-id: https://svn.eduke32.com/eduke32@4298 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:41 +00:00
helixhorned 842cce37b7 Lunatic: Fix compilation of C++ build, but not starting up yet.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4286 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-31 21:13:03 +00:00
hendricks266 3e6fc00474 Remove "-fpermissive" from C++ builds because we don't need it.
git-svn-id: https://svn.eduke32.com/eduke32@4273 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-27 10:31:20 +00:00
hendricks266 3b1b5bb41d For DISABLEINLINING=1, apply __fastcall to make up for the lack of inlining.
git-svn-id: https://svn.eduke32.com/eduke32@4247 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:04:02 +00:00
helixhorned e71df2b6e3 Lunatic/m32: make Mapster23 actually start stand-alone, oops.
git-svn-id: https://svn.eduke32.com/eduke32@4238 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-02 00:08:36 +00:00
helixhorned 7791f94073 Lunatic: make it possible to build with LuaJIT 2.1, add -Lopts=profile there.
git-svn-id: https://svn.eduke32.com/eduke32@4107 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-16 19:43:06 +00:00
hendricks266 401a73862a Wii: Fix build and add custom headers and libs to SVN. (It's helpful to set up a build system from scratch.)
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4102 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-13 09:08:31 +00:00
hendricks266 b40f0aba04 Fix ebacktrace1 under MinGW's GCC 4.8 and binutils 2.23.2.
We keep needing more and more hacks as libbfd keeps becoming dependent on additional libraries we don't need...

git-svn-id: https://svn.eduke32.com/eduke32@4076 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:02:33 +00:00
helixhorned eac9dd04bf Add WIP x86_64 assembly texture mapping routines.
- Currently: only tvlineasm1 and tvlineasm2, but incomplete (no reverse
  translucency, nonpow2 textures will crash)
- For System V AMD64 calling conventions; requires YASM

git-svn-id: https://svn.eduke32.com/eduke32@4066 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-21 13:37:31 +00:00
helixhorned 77dc57aee7 When building Lunatic from synthesis, tell LuaJIT to generate PE object files.
BUILD_LUNATIC, third attempt.

git-svn-id: https://svn.eduke32.com/eduke32@4023 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-18 21:14:37 +00:00
helixhorned bac4265a0b For Clang debugging build, only pass selected UBSanitizer options.
This makes CLANG=1 RELEASE=0 DEBUGANYWAY=2 OPTLEVEL=1 builds definitely pretty
playable (only Polymost tested) while having a decent amount of sanitization.

git-svn-id: https://svn.eduke32.com/eduke32@4020 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-18 19:24:15 +00:00
helixhorned e947f1fe87 Lunatic: prepare Makefiles for synthesis build.
- libs and headers are expected in platform/Windows/* (not there yet)
- prefix Lua #includes with luajit-2.0/
- build bytecode objects with absolute path name (used for debug info)

git-svn-id: https://svn.eduke32.com/eduke32@4000 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-11 15:28:42 +00:00
hendricks266 62cdb8a9e6 Patch from johnnyonflame to fix the GCW and Dingoo build process.
git-svn-id: https://svn.eduke32.com/eduke32@3972 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-20 03:36:54 +00:00
helixhorned 4872adb3c8 Makefile.common: disable -Wstrict-overflow.
It didn't turn out that useful and was giving a warning with one of the
preceding changes.

git-svn-id: https://svn.eduke32.com/eduke32@3963 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-18 18:08:16 +00:00
helixhorned 8c9f0b740d Makefile.common: make LUNATIC be set to 0 if not set from env ("?=0").
Also override LTO to 0 in Lunatic builds.

git-svn-id: https://svn.eduke32.com/eduke32@3957 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-13 21:05:05 +00:00
helixhorned 750fbb0a0e Lunatic: slight Makefile tweak for Windows preparation.
Add doc/how_to_build_lunatic.txt and doc/lpeg-lunatic.patch.

git-svn-id: https://svn.eduke32.com/eduke32@3938 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-07 20:59:14 +00:00
helixhorned a082ec76dd Lunatic: fix randgen module after md4 removal, run DEFS_BC_SIZE cmd only once.
git-svn-id: https://svn.eduke32.com/eduke32@3785 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-17 10:41:57 +00:00
Plagman c2a5b60a14 Fix Makefile fuckery.
git-svn-id: https://svn.eduke32.com/eduke32@3728 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 03:12:29 +00:00
helixhorned 6deabcdb5d Makefiles: allow overriding the optimization level with debugging builds.
git-svn-id: https://svn.eduke32.com/eduke32@3725 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-04 16:36:10 +00:00
helixhorned bdecbc45db Fix debugging builds with Clang 3.2 and up.
In those Clang versions, -fcatch-undefined-behavior was replaced by
-fsanitize=<what>.  For Clang 3.2, we enable the address sanitizer
and for 3.3 also the miscellaneous undefined behavior one.
Currently, there's no version auto-detection from the Makefiles, it's
set to 3.3 and the others are commented out.

git-svn-id: https://svn.eduke32.com/eduke32@3716 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-29 19:24:15 +00:00
helixhorned e64ecfbf4f OS X: Pass -Wno-narrowing only with GCC 4.3+, fixing arttool build on my setup.
git-svn-id: https://svn.eduke32.com/eduke32@3691 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-17 20:34:51 +00:00
terminx 3e4ea93b20 Directory cleanup. Move the "Apple", "Windows", and "Wii" directories to a new "platform" dir, move the contents of "psd" to "rsrc/source", move eobj* and obj* directories so that they're under the "source" dir.
git-svn-id: https://svn.eduke32.com/eduke32@3551 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-04 04:14:19 +00:00
helixhorned 1685228ab7 Lunatic: compile defs.ilua as bytecode and load it from the executable.
git-svn-id: https://svn.eduke32.com/eduke32@3517 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-24 16:05:31 +00:00
hendricks266 719efefbf0 Wii: Take advantage of libogc features: PNG screenshots (libpng/zlib), Ogg Vorbis audio (libtremor), and high-resolution profiling timers.
FLAC and VPX remain out in the cold.

git-svn-id: https://svn.eduke32.com/eduke32@3497 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-18 08:50:42 +00:00
hendricks266 624841257c Wii: Fix most warnings. Three remain: two are labeled with FIXMEs; the third consists of signed/unsigned comparisons involving LSWAPIB() in kplib.c.
git-svn-id: https://svn.eduke32.com/eduke32@3496 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-18 08:50:08 +00:00
helixhorned f10a0fb086 Makefiles: fix wrongly stripping debug binaries...
... when 'make' is invoked like "make ... STRIP=some_strip".

git-svn-id: https://svn.eduke32.com/eduke32@3423 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-21 21:18:10 +00:00
helixhorned 17d62458f4 Makefiles: simplify how to determine whether the final binary is stripped.
Whenever it should be not, STRIP is set to the empty string.
This fixes the Lunatic RELEASE=1 build.

git-svn-id: https://svn.eduke32.com/eduke32@3422 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 21:17:36 +00:00
helixhorned 2b0b8d34cc Remove mixed Lunatic/legacy build option.
git-svn-id: https://svn.eduke32.com/eduke32@3410 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-19 18:29:00 +00:00
hendricks266 748e217a19 Bring the SDL.h include in SDLMain.m up to speed with driver_sdl.c in jaudiolib and sdl_inc.h in the engine. Also address some Apple macro problems.
git-svn-id: https://svn.eduke32.com/eduke32@3368 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-04 17:28:13 +00:00
helixhorned 80ee967b8e Lunatic: beginning to glue things together. Introducing LUNATIC_ONLY.
git-svn-id: https://svn.eduke32.com/eduke32@3343 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 15:21:24 +00:00
hendricks266 95dd57154e Clean up some file and directory structure.
* Renamed source/jaudiolib/third-party/mingw32 to source/jaudiolib/third-party/Windows.
* Moved source/jaudiolib/third-party/Windows/include to source/jaudiolib/third-party/common/include to use both on Windows and Apple.
* Deleted Apple/lib/include/{ogg,vorbis}/, see previous point.
* Deleted Apple/lib/libvorbisenc.a, 6MB saved.
* Moved Apple/lib/lib{ogg,vorbis,vorbisfile}.a to source/jaudiolib/third-party/Apple/lib, where they belong.
* Moved source files in Apple/ to source/, where they belong. (SDLMain.[mh] stay.)
* Deleted source/jaudiolib/third-party/{ogg,vorbis}.framework, not used any more.
* Renamed "StartupWinController*" to "startosx*".

git-svn-id: https://svn.eduke32.com/eduke32@3334 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 10:54:35 +00:00
helixhorned d7132e587f Fix CLANG=1 NOASM=1 build.
git-svn-id: https://svn.eduke32.com/eduke32@3292 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 19:28:20 +00:00
hendricks266 dac94ce284 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
hendricks266 9fcba228b1 Build tweaks:
Set up the use of {Windows,Apple}/{include,lib} regardless of feature toggles in Makefile.common using $(abspath ) in reference to the directory Makefile.common is in.
Add the three DirectX headers that are actually used to the repo. (from: http://alleg.sourceforge.net/files/dx9mgw.zip)
Since current MinGW versions include DirectX libs (for dynamic linking), remove "-L$(DXROOT)/lib".
The DirectX headers are no longer a separate dependency for building.
Add $(SDLROOT_OVERRIDE). $(SDLROOT) only functions for Windows and Mac OS X.
Factor handling of $(DXROOT_OVERRIDE) and $(SDLROOT_OVERRIDE) into Makefile.shared using $(abspath ).

git-svn-id: https://svn.eduke32.com/eduke32@3275 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:34:30 +00:00
hendricks266 ae59db2390 Makefiles: Replace all "ifeq ($(PLATFORM),LINUX)" with "ifeq ($(SUBPLATFORM),LINUX)" and set SUBPLATFORM=LINUX when PLATFORM equals LINUX, DINGOO, GCW, or CAANOO.
git-svn-id: https://svn.eduke32.com/eduke32@3272 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:32:59 +00:00
helixhorned fc048658dc Experimental NETCODE Makefile variable, enabled by default.
Disabling netcode compilation can be interesting on memory-constrained
systems, or those that have no means of accessing the network anyway.
Note: I'm OK with maintaining this myself, i.e. it's fine if netcode dev
breaks compilation with NETCODE=0.

git-svn-id: https://svn.eduke32.com/eduke32@3260 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-09 13:24:44 +00:00
hendricks266 b6f41b6ae5 Add FORCEWARNINGS Makefile flag to prevent disabling compiler warnings within the source.
git-svn-id: https://svn.eduke32.com/eduke32@3237 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-26 08:25:26 +00:00
hendricks266 be899ba3af For novelty, add support for RENDERTYPE=SDL under Windows.
This needs improvements to bring it up to par with winlayer, but it is functional. In particular, a good amount of code from winlayer could be used for both layers, including the profiling timers, the version printing code, and the hInstance and hModule sharing.

Known problems: the mouse cursor is not trapped, and the game starts before the startup window shows options.

git-svn-id: https://svn.eduke32.com/eduke32@3219 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-24 09:13:29 +00:00
helixhorned f20a001618 Split r3159..r3161, part 1: Makefile and MSVC project file changes.
git-svn-id: https://svn.eduke32.com/eduke32@3166 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:27:49 +00:00
helixhorned 1cd11d06ef Revert "Fix the warnings when building with C++, add MSVC C++ build support."
This reverts r3159..r3161.

Conflicts:
	eduke32/build/include/compat.h
(Handled so that r3163's changes are kept applied.)

git-svn-id: https://svn.eduke32.com/eduke32@3165 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:27:45 +00:00