Commit graph

60 commits

Author SHA1 Message Date
Sven Eckelmann
0bfae1fad5 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:00 +02:00
Sven Eckelmann
5722e78303 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-09 22:50:00 +02:00
Sven Eckelmann
d49a2b857f 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-09 22:22:52 +02:00
Sven Eckelmann
dfa22c9899 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:04:01 +01:00
Sven Eckelmann
8d32f2a9cc Enable link time garbage collection when link time optimization is enabled 2013-02-01 10:01:54 +01:00
Sven Eckelmann
1ddef24000 Introduce WARNFLAGS for default (removable) compiler warning flags 2013-01-02 16:13:45 +01:00
Sven Eckelmann
3a3e2fe240 Disable PIC on MinGW to reduce warnings 2013-01-01 00:30:34 +01:00
n pepinpe
dc809fd709 Fix path to OSX SDK with XCode >=4.3 2012-12-31 10:43:00 +01:00
veganaize
b2cc64accf 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:42 +01:00
Sven Eckelmann
d41ea6ed48 Use $(OBJDIR) in clean target instead of hardcoded path 2012-12-13 14:53:05 +01:00
Sven Eckelmann
4fbab9cd89 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:23 +01:00
veganaize
47e650709d Add support for MingW32 2012-12-13 13:58:55 +01:00
Sven Eckelmann
0911511a37 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:40 +01:00
Sven Eckelmann
ecd1eb677a Allow to change names of *-config tools for cross compiles 2012-12-13 11:33:49 +01:00
Sven Eckelmann
94441fbc3c Synchronize usage of environmental variables for UNAME with HOST_CPU 2012-12-13 10:52:49 +01:00
wahrhaft
cc071fca31 Merge new platforms in Makefile 2012-11-27 22:56:28 -05:00
Anthony J. Bentley
93a26045c2 Detect OpenBSD PowerPC platforms macppc and socppc. 2012-11-12 18:28:19 -07:00
Sven Eckelmann
5a741ceb87 Add configuration for semi-supported architecture armel 2012-11-04 01:27:30 +01:00
Sven Eckelmann
13bb765d1f Remove unused dependency to GLU
The OpenGL Utility Library was only used in a dead code path and can be
removed without loosing any functionality.
2012-06-09 01:21:38 +02:00
Sven Eckelmann
261e633ace Enable experimental support for link-time optimization 2012-06-09 01:21:14 +02:00
Sven Eckelmann
731d96564e Explicitly disable PIC in case of PIC=0 2011-10-13 00:01:03 +02:00
Sven Eckelmann
a07430f141 Build amd64 in 64 bit mode with PIC 2011-09-04 13:51:10 +02:00
Sven Eckelmann
81516dbe8d 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:17 +02:00
Sven Eckelmann
00c1af5f64 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:38:52 +02:00
Sven Eckelmann
5855e7172d Enable big endian mode on ppc and ppc64 2011-08-05 10:19:21 +02:00
Sven Eckelmann
7f5786ffd3 Strip binaries during install 2011-07-23 21:22:52 +02:00
Sven Eckelmann
114c7022e5 Don't fail the build or remove optimizations when user asks for debug symbols 2011-07-23 18:21:08 +02:00
Sven Eckelmann
716ea561c6 Allow to force PIC to remove text relocations 2011-07-10 13:37:55 +02:00
Sven Eckelmann
34e39ef822 Fix linker search for libstdc++.so 2011-07-08 08:24:36 +00:00
Sven Eckelmann
c5dec6712c Set changeable default compiler optimization option 2011-07-03 18:03:15 +02:00
Sven Eckelmann
72528a62da Synchronize build rules with standard gnu make rules 2011-06-27 13:00:04 +02:00
Sven Eckelmann
079c26f78d Test for essential build dependencies before getting their cflags/libs 2011-06-27 11:36:11 +02:00
Sven Eckelmann
dbfa9f06e8 Define STRIP for FREEBSD OS 2011-06-26 20:47:58 +02:00
Sven Eckelmann
ea8b5d77a9 Don't use -ldl on *BSD Systems 2011-06-26 20:41:19 +02:00
Sven Eckelmann
ca722e9f18 Add OpenBSD as half-supported OS with FreeBSD userspace tools 2011-06-26 18:37:19 +02:00
Sven Eckelmann
6d37963bd6 Remove -v parameter of install which is not available everywhere 2011-06-26 18:29:25 +02:00
Sven Eckelmann
c64ad4fac1 Split LIBDIR in LIBDIR and PLUGINDIR for consistency between modules 2011-06-26 02:05:07 +02:00
Sven Eckelmann
5301287d88 Fix compilation with BITS=32 when using gcc-4.6 2011-06-25 21:29:58 +02:00
Sven Eckelmann
ff8532919d Don't override optimisations set by linux build environment 2011-06-25 12:46:02 +02:00
Sven Eckelmann
e02713fbb1 Use pkg-config as more portable way to find gl and glu 2011-06-25 11:16:27 +02:00
Sven Eckelmann
64e519b3ed Use -pthread gcc option to support systems with differently named pthread library 2011-06-25 10:29:14 +02:00
Sven Eckelmann
1a960752a4 Add GNU/Hurd as operating system with "linux" userland
---
2010-07-13 21:35:30 +02:00
wahrhaft
55c46d223d add V=1 description to makefile help 2010-04-03 15:06:39 -04:00
Sven Eckelmann
f0e0d79c75 Only use ld option -version-script on systems with GNU userland tools 2010-03-20 16:55:41 +01:00
Sven Eckelmann
5a2394ccab Build kfreebsd and GNU/kFreeBSD like Linux 2010-03-19 12:16:38 +01:00
Sven Eckelmann
96cfad20d2 Export only functions which are part of the api
The g++ also exports symbols of implicit instantiations of templates. These
aren't part of the api and must not be accessed by any other part of
mupen64plus. We can use version-scripts to surpress these symbols without using
explicit instantiations of all templates we use.
2010-03-18 13:21:00 +01:00
Sven Eckelmann
1bacbbe4d6 Make hidden symbols the default behavior of gcc 2010-03-18 12:23:41 +01:00
Sven Eckelmann
54e399f1e8 Don't export inlined functions in C++ files 2010-03-18 11:12:15 +01:00
Sven Eckelmann
4394152a2c Reduced console output when running make without V=1 2010-03-18 10:59:23 +01:00
Sven Eckelmann
60bcc4f123 Use separate CXXFLAGS environment variable when calling CXX 2010-03-18 10:10:54 +01:00