Commit Graph

134 Commits

Author SHA1 Message Date
Martin Storsjö
3026958bde Rename the msvc-arm platform file to msvc-wp
The architecture handling is now decoupled from the main
platform file. Now you can build for Windows Phone for x86 (for
the emulator) by "make OS=msvc-wp ARCH=x86".
2014-04-11 10:54:34 +03:00
Martin Storsjö
48f7470867 Move all x86 vs arm handling to msvc-common 2014-04-11 10:54:34 +03:00
Martin Storsjö
1ee52616ac Remove a duplicate -MD declaration 2014-04-11 10:51:58 +03:00
Martin Storsjö
b1f35347eb Set -MTd/-MDd in the same way as -MT/-MD
This was overlooked in 67e5b04.
2014-04-11 10:27:14 +03:00
Licai Guo
67e5b041c2 this patch remove dependency of MSVC version
the output dll now only depends on kernel32.dll
2014-04-10 18:05:41 -07:00
Andoni Morales Alastruey
3a4cea63ef Rename cpufeatures symbols to avoid colisions in static builds
This fixes potential duplicated symbols in static links
with other libraries including the cpufeatures.o object file
2014-04-08 11:25:01 +02:00
Martin Storsjö
b35c21201b Use the Windows Runtime ThreadPool API for creating threads on Windows Phone
Windows Phone lacks the old CreateThread/beginthreadex APIs for
creating threads. (Technically, the functions still do exist,
but they aren't officially supported and aren't visible in the
headers when targeting Windows Phone.)

Building code that uses the Windows Runtime language extensions
requires building with the -ZW option.
2014-04-01 11:18:49 +03:00
volvet
9f50e0c91e clean multi-threading macro 2014-03-31 18:24:10 -07:00
Martin Storsjö
21559a2d7d Remove an unnecessary 'cd' in the mktargets.sh script
There's no need to return to the original directory at the end of
a script - the current working directory within the subshell that
executes the script doesn't affect the working directory in the
calling shell.
2014-03-27 08:58:56 +02:00
Varun B Patil
0d6764c62f Attempt to change to root dir before executing python script
When inside a git repo, attempt to change to the root dir
before running python script. Prevents a bunch of errors
when mktargets.sh is executed from the wrong dir.
2014-03-27 11:37:39 +05:30
Martin Storsjö
d024dc5cc0 Remove unused *_LIBS make variables 2014-03-25 10:13:29 +02:00
Licai Guo
f26bb57415 reorganize tests 2014-03-24 22:14:43 -07:00
Varun B Patil
064ad29f80 Better error reporting in mktargets.py 2014-03-24 12:56:06 +05:30
Ethan Hugg
e8540af9eb Merge pull request #541 from licaiguo/disable-warnings
disable most warnings produced by -Wall
2014-03-19 09:17:34 -07:00
Martin Storsjö
2ca8ef4bd3 Automatically pick the latest installed iOS SDK when building with make
This avoids having to update the makefile just to change the SDK
version whenever the iOS SDK is updated (since the previous
version is removed on updates).
2014-03-19 10:32:42 +02:00
Licai Guo
a688f5278a fix most of the warnings 2014-03-19 01:16:08 -07:00
Licai Guo
2a885ca461 disable most warnings produced by -Wall 2014-03-18 23:04:33 -07:00
Licai Guo
31a93de513 add missing build files 2014-03-18 19:47:26 -07:00
Ethan Hugg
197423f271 Merge pull request #520 from ylatuya/master
Fix compiler warnings and remove dead code
2014-03-18 13:28:02 -07:00
Andoni Morales Alastruey
c55429d7a5 Replace -Werror with -Wall
Treating warnings as error is useless if no warning is activated.
Several build systems enable -Wall in the CLFAGS, which in combination
with -Werror can trigger undesired build errors.
2014-03-18 19:15:25 +01:00
Martin Storsjö
e1b5e038d2 Use .obj as suffix for object files on MSVC
This avoids warnings when linking about "unrecognized source file
type, object file assumed".
2014-03-18 19:41:06 +02:00
Martin Storsjö
00efbc2cb5 Enable the arm assembly in msvc-arm builds
This requires using the external gas-preprocessor tool that
converts the gnu assembler format sources to armasm format at
build time. This allows keeping the source files in one single
format but only converting while building.
2014-03-17 20:28:12 +02:00
Martin Storsjö
d723ad2774 Use -DPREFIX instead of --prefix _ on OS X
The --prefix parameter differs between yasm and nasm; nasm
requires --prefix _ while yasm requires --prefix=_. Using the
define instead (as on windows) allows easier switching between
the two otherwise mostly compatible assemblers.

This fixes building with yasm on OS X in 32 bit mode. For 64 bit,
a few more tweaks are still required.
2014-03-16 11:59:34 +02:00
Martin Storsjö
00849100f8 Remove the unused define NOPREFIX
Nothing in the x86 assembly reacts to that define (nor anything
else within the code base).
2014-03-15 14:40:36 +02:00
Ethan Hugg
567302eb9a Merge pull request #410 from mstorsjo/android-armeabi
Allow building plain armeabi binaries for android
2014-03-10 09:44:19 -07:00
Licai Guo
6d9dfe8954 Merge pull request #454 from mstorsjo/android-any-arch
Support building for any other android architecture
2014-03-10 17:20:58 +08:00
Martin Storsjö
67a9e73a7c Set the arch to armv7 by default when building for iOS
Otherwise it would build for the simulator by default, which
in most cases probably isn't what was intended.
2014-03-09 01:46:43 +02:00
Martin Storsjö
8f88f60637 Explicitly sort the files in mktargets.py
This avoids spurious changes to the targets.mk files when mktargets
is rerun on different platforms and different file systems.

In particular, OS X seems to mostly return files sorted
alphabetically, case insensitively, while they are returned in
a file system specific order on linux.
2014-03-08 01:55:39 +02:00
Martin Storsjö
918af27560 Support building for any other android architecture
This allows e.g. building for mips, as a plain C++ build with
no assembly.
2014-03-08 01:22:31 +02:00
volvet
ffde7b2e09 Merge pull request #442 from mstorsjo/unify-thread-cleanup
Unify the thread cleanup code, enable threading on android
2014-03-07 18:14:03 +08:00
Martin Storsjö
181fe0a99e Enable multithreading on android 2014-03-07 10:51:28 +02:00
Martin Storsjö
30fff7ece0 Allow building plain armeabi binaries for android
Building with "make OS=android APP_ABI=armeabi" will
produce arm binaries that will conform to the armeabi
ABI - not using any features outside of armv5te by
default (but still optionally using the NEON functions at
runtime if detected - even though such devices should rather
use the default armeabi-v7a build).
2014-03-06 08:15:55 +02:00
Licai Guo
36ae8d9f6c use stlport to replace libgnuc++, this remove GCCVERSION variable 2014-03-05 22:15:36 -08:00
Licai Guo
585c526b1f rebase on latest code, refine android build 2014-03-05 17:32:03 -08:00
Licai Guo
61dae45fad Merge pull request #421 from mstorsjo/android-x86-build
Fix building android on x86
2014-03-06 09:07:26 +08:00
Martin Storsjö
506826a8ae Fix building android on x86
In 70360cb11, the ASM variable was moved to the x86-common file
even though the android build file didn't include neither
platform-arch.mk nor platform-x86-common.mk.

Instead of explicitly declaring ASM here, include platform-arch.mk
and remove setting of the flags that platform-arch.mk sets.

This is inspired by and based on a patch by Licai Guo.
2014-03-05 15:19:18 +02:00
Martin Storsjö
0df3a068ba Don't add -DNO_DYNAMIC_VP to ASMFLAGS
None of the assembly source uses this define for anything.
2014-03-05 15:02:53 +02:00
Martin Storsjö
dae8f4b737 Exclude the arm assembly header as well
This avoids warnings about object files not containing any symbols.
2014-03-04 23:23:19 +02:00
Ethan Hugg
01a2f582c3 Merge pull request #401 from mstorsjo/android-arm-assembly
Enable the arm assembly in android builds
2014-03-04 09:50:07 -08:00
Martin Storsjö
773cc4a797 Exclude assembly files that are used as headers
This avoids some warnings about object files not containing any
symbols.
2014-03-04 14:57:36 +02:00
Martin Storsjö
560c14b67c Add the APPLE_IOS define when building for iOS with make
Previously the define was only used when building from within the
xcode project files.

This enables the arm neon assembly.
2014-03-04 09:26:15 +02:00
Martin Storsjö
23ab117240 Don't set -mfpu=neon while building the normal C++ files
This will make the normal C++ code not run on non-NEON devices at
all, making the runtime CPU feature detection pointless.

Adding -mfpu=neon to CFLAGS is not necessary, it's enough to
add it while building those individual .S files (via ASMFLAGS).
2014-03-04 08:56:42 +02:00
Martin Storsjö
30c7810cdf Enable the android runtime CPU feature detection
Build and include the android cpufeatures library in libcommon.
2014-03-04 08:56:42 +02:00
Martin Storsjö
0fc93cd98e Hook up building arm assembly in the generic linux and android makefiles 2014-03-04 08:56:42 +02:00
Martin Storsjö
1118dd4f71 Update the makefile generator to support .S arm assembly files
These are built if ASM_ARCH is set to arm.
2014-03-04 08:56:42 +02:00
Martin Storsjö
3ccd2ae4cf Remove a redundant makefile ifdef
ASM_ARCH=x86 is only set if USE_ASM is enabled.
2014-03-01 23:56:14 +02:00
Martin Storsjö
6f803e16f5 Only set x86 ASMFLAGS if building x86 assembly 2014-03-01 23:56:14 +02:00
Martin Storsjö
70360cb11e Move the ASM variable declaration into the x86-common file 2014-02-28 10:22:19 +02:00
Martin Storsjö
078681a097 Add a platform file for building for iOS using the makefile build system
This doesn't build the actual demo apps that you can run on the
phone (not yet at least), but is useful for easily testing compilation
in different setups, and for building a precompiled static library for
use in external projects.
2014-02-28 10:19:53 +02:00
Martin Storsjö
ab3609c4c7 Don't add x86 assembly specific options on darwin if building for other archs
This avoids warnings about using the -read_only_relocs suppress
if building for other architectures than x86.
2014-02-28 10:19:53 +02:00