Commit graph

86 commits

Author SHA1 Message Date
richard42
123e63e220 Update msvc11 project file to visual studio 2012 (msvc11) 2013-06-01 08:00:39 -07:00
richard42
a35e3dd2d9 removed -lstdc++ flag in makefile, I just need to use CXX=clang++ instead 2013-05-30 07:56:53 -07:00
richard42
060b8fe36e clang needs to link against libstdc++ 2013-05-29 08:49:47 -07:00
Sven Eckelmann
cbd8a77542 Allow to statically set *_(CFLAGS|LIBS) without pkg-config
n.pepinpe requested in #540 to allow overwriting the automatically searched
CFLAGS and LIBS for used libraries. This should allow distributors to set the
build configuration without patching the makefile. This is important for
systems were pkg-config or sdl-config aren't normally used.
2013-05-11 15:00:09 +02:00
Sven Eckelmann
e895bfa957 Allow to statically set SDL_(CFLAGS|LIBS) without sdl-config
n.pepinpe requested in #540 to allow overwriting the automatically searched
CFLAGS and LIBS for used libraries. This should allow distributors to set the
build configuration without patching the makefile. This is important for
systems were pkg-config or sdl-config aren't normally used.
2013-05-11 12:26:28 +02:00
Sven Eckelmann
e20603f55f Enable Link-time optimization by default
The GCC introduced Link-time optimization in GCC 4.5 (2010-04-14). This should
be long enough available that interested users have upgraded to a compiler
supporting it.

The MSVC project already enabled WholeProgramOptimization since a long time.
Enabling it by default in GCC seems to be equally valid.
2013-05-11 11:26:02 +02:00
Sven Eckelmann
722892317b Add CXXFLAGS to the linker step
The GCC manual states for different parameters that the options for compilation
must also be used when linking. The options for compilation are stored in
CXXFLAGS and added to LINK.o to fix the behavior.

Option which need this are for example -fPIC/-fPIE or -flto.
2013-05-11 10:22:31 +02:00
Richard Goedeken
1dac38de3b add msvc11 project file from mudlord 2013-03-20 22:26:56 -07:00
Sven Eckelmann
8f939b218d Revert "Enable link time garbage collection when link time optimization is enabled"
Some linker on different platforms don't handle the garbage collection
correctly and create extreme bloated binaries. Therefore, leave it to the user
to enable this feature or not.
2013-03-14 08:08:23 +01:00
Richard Goedeken
fc4b00185a merged heads, fixing conflicts in src/TextureFilters.cpp 2013-02-03 09:59:10 -08:00
richard42
e3116b7d2f OSX build fix 2013-02-02 22:24:04 -08:00
Sven Eckelmann
970f207a8d Enable link time garbage collection when link time optimization is enabled 2013-01-30 20:35:48 +01:00
Sven Eckelmann
78f004d2e0 Introduce WARNFLAGS for default (removable) compiler warning flags 2013-01-02 16:13:46 +01:00
Sven Eckelmann
436a1c4098 Disable PIC on MinGW to reduce warnings 2013-01-01 00:30:34 +01:00
n pepinpe
e1cd4fd937 Fix path to OSX SDK with XCode >=4.3 2012-12-31 10:43:00 +01:00
veganaize
1f66504005 Don't try to find OpenGL libraries on MacOSX and MinGW using pkg-config
MacOSX and MinGW don't provide gl.pc or glu.pc to find the cflags or libs using
pkg-config. Removing this search and replacing it with an hardcoded value is
easier on these platforms.
2012-12-19 21:57:46 +01:00
Sven Eckelmann
a8b5adec72 Use $(OBJDIR) in clean target instead of hardcoded path 2012-12-13 14:53:05 +01:00
Sven Eckelmann
c06750ed20 Allow to add a postfix for each build
The POSTFIX make option is useful for distributions to compile different
versions of the plugin in parallel. The object files will be stored in a
directory with the postfix appended and the linker result will also have this
postfix appended.
2012-12-13 14:47:25 +01:00
Sven Eckelmann
8cb19be53e Don't add lipng libs twice on MinGW 2012-12-13 12:30:44 +01:00
Sven Eckelmann
9973c9aa91 Add CROSS_COMPILE make option
The CROSS_COMPILE make option can be used to automatically prepend the prefix
to all build relevant tools to seamlessly allow cross compilation without
setting each tool name separately.

Cross compiling for MinGW32 would can be done using
$ make -C projects/unix/ CROSS_COMPILE=i686-pc-mingw32- HOST_CPU=i686 UNAME=MINGW
2012-12-13 12:25:44 +01:00
Sven Eckelmann
419d442013 Allow to change names of *-config tools for cross compiles 2012-12-13 11:33:50 +01:00
Sven Eckelmann
069856f10e Synchronize usage of environmental variables for UNAME with HOST_CPU 2012-12-13 10:52:49 +01:00
Sven Eckelmann
56e17c0400 Remove duplicated definition of CC for MinGW 2012-12-13 10:46:17 +01:00
veganaize
acafa1180f Add support for MingW32 2012-12-04 21:17:52 +01:00
Sven Eckelmann
402ba8350f Fix build on x86 with SSE inline assembler 2012-12-03 10:39:26 +01:00
Anthony J. Bentley
98dc5cf7b8 Detect OpenBSD PowerPC platforms macppc and socppc. 2012-11-12 18:04:28 -07:00
Sven Eckelmann
604872c5ba Add configuration for semi-supported architecture armel 2012-11-04 01:28:01 +01:00
Sven Eckelmann
25e2b1003c Enable experimental support for link-time optimization 2012-06-09 01:31:27 +02:00
Richard Goedeken
378dfa38ce force PIC under OSX. otherwise it crashes with weird errors 2012-03-11 14:19:35 -07:00
casualjames
db28ed4aa2 Add libs. 2012-01-15 14:53:20 +01:00
Sven Eckelmann
2b009af558 Remove additional -O3 on MacOSX 2011-10-14 19:58:42 +02:00
Sven Eckelmann
4fd1072c13 Explicitly disable PIC in case of PIC=0 2011-10-13 00:01:04 +02:00
Sven Eckelmann
44523a6580 Enable ppc(64) as experimental target
nogagplz tested mupen64plus on 32-bit ppc and didn't detect any big show
stoppers with interpreter cores and the mupen64plus example rom. This makes the
PowerPC an interesting target for further tests and may reveal other endianness
problems.
2011-08-05 10:46:18 +02:00
Sven Eckelmann
118864a14a Enable PIC depending on architecture instead of bits only
nogagplz noticed on ppc32 that PIC is necessary to compile everything as shared
object. Therefore, it seems to be a better idea to have architecture specific
PIC default settings instead of checking only whether it is a 32 or 64 bit
architecture.
2011-08-05 10:32:08 +02:00
Sven Eckelmann
fe7b30cf5c Enable big endian mode on ppc and ppc64 2011-08-05 10:19:22 +02:00
Sven Eckelmann
cdbf3ba71d Strip binaries during install 2011-07-23 21:22:53 +02:00
Sven Eckelmann
b42ff04b15 Allow to force PIC to remove text relocations 2011-07-10 13:37:55 +02:00
Sven Eckelmann
81fae8df01 Fix linker search for libstdc++.so 2011-07-08 08:24:38 +00:00
Sven Eckelmann
13b7ac0506 Inform user about the possibility to make the build verbose 2011-07-03 18:04:48 +02:00
Sven Eckelmann
6a798b46b8 Set changeable default compiler optimization option 2011-07-03 18:03:15 +02:00
Sven Eckelmann
95636b27be Synchronize build rules with standard gnu make rules 2011-06-27 13:00:05 +02:00
Sven Eckelmann
e6701133b2 Test for essential build dependencies before getting their cflags/libs 2011-06-27 11:36:11 +02:00
Sven Eckelmann
3277b4a7bd Add OpenBSD as half-supported OS with FreeBSD userspace tools 2011-06-26 18:37:19 +02:00
Sven Eckelmann
a82015b515 Remove -v parameter of install which is not available everywhere 2011-06-26 18:29:26 +02:00
Sven Eckelmann
92aaa7078f Split LIBDIR in LIBDIR and PLUGINDIR for consistency between modules 2011-06-26 02:05:07 +02:00
Sven Eckelmann
17dfb439a4 Fix compilation with BITS=32 when using gcc-4.6 2011-06-25 21:29:58 +02:00
Sven Eckelmann
66c5c1629d Remove unneccessary define PIC 2011-06-25 15:09:33 +02:00
Sven Eckelmann
c89a263b8a Don't override optimisations set by linux build environment 2011-06-25 14:39:08 +02:00
Sven Eckelmann
b1afe8c681 Use pkg-config as more portable way to find gl and libpng 2011-06-25 11:30:31 +02:00
Sven Eckelmann
29a9ddfa3b Add GNU/Hurd as operating system with "linux" userland
---
2010-07-13 21:37:54 +02:00