diff options
author | konablend <[email protected]> | 2009-04-14 20:10:57 +0000 |
---|---|---|
committer | konablend <[email protected]> | 2009-04-14 20:10:57 +0000 |
commit | 16b2cd579e17d46bdf7bcec3059a92d2c80d21e8 (patch) | |
tree | f23def4a82677bda7b031b1e2f56c249e6c93d9e /make/include/gcc.defs | |
parent | 6a59b3ba40c2d2bbe977684d31b345bdd3a5ef93 (diff) |
This patch adds mingw32 cross-compilation support to HandBrake trunk to
produce native win32 binaries. The main benefits are the binary does not have
any Cygwin runtime requirements and various host platforms can be leveraged
to build HandBrake.
Cross-compilation toolchains are complex to setup and recommended for experts
only; but once setup it can build at speeds similar to native builds,
on Darwin or Linux.
BUILD INSTRUCTIONS:
Add mingw32 toolchain to beginning of your path and take the toolchain
prefix from gcc (eg: i386-mingw32-gcc) and pass to configure:
./configure --cross=i386-ming32
PRODUCTS:
- hb.lib (static library)
- HandBrakeCLI.exe
DOWNLOADS:
Contrib downloads need to be seeded with:
- pthreads-w32-2-8-0-release.tar.gz (new)
- xvidcore-20090311.tar.gz
SUMMARY:
Specifically, all GUI trees are not impacted.
configure
- added --cross=PREFIX
- reworked search for gcc and cross-compile related tools to use prefix
contrib/
- sub-patches added as needed for mingw
contrib/xvidcore/
- bumped from 1.1.3 -> 1.2.1+ (daily 20090311)
- reconstituted P01-cygwin.patch
- created new P00-darwin.patch needed for macho64 asm flag on x86_64 arch
libhb/
- uint -> uint32_t
- remaining changes guarded by mingw32 macro.
test/
- modified to support pthread-compatibility library attach/detach.
- all changes guarded by mingw32 macro.
BRANCHES:
source: https://hbfork.googlecode.com/svn/branches/mingw@28
target: svn://svn.handbrake.fr/HandBrake/trunk@2325
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2326 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'make/include/gcc.defs')
-rw-r--r-- | make/include/gcc.defs | 60 |
1 files changed, 48 insertions, 12 deletions
diff --git a/make/include/gcc.defs b/make/include/gcc.defs index 35a6e50a8..f9511d1b5 100644 --- a/make/include/gcc.defs +++ b/make/include/gcc.defs @@ -12,7 +12,6 @@ GCC.vis = 0 GCC.pic = 0 GCC.g = none GCC.O = none -GCC.extra = 1 GCC.D = GCC.I = GCC.muldefs = 0 @@ -24,6 +23,16 @@ GCC.L = GCC.l = GCC.end = 0 +GCC.extra = 1 +GCC.extra.h_o = 1 +GCC.extra.c_o = 1 +GCC.extra.dylib = 1 +GCC.extra.exe = 1 +GCC.extra.hpp_o = 1 +GCC.extra.cpp_o = 1 +GCC.extra.dylib++ = 1 +GCC.extra.exe++ = 1 + GCC.args.pipe = -pipe GCC.args.strip = -Wl,-S GCC.args.dylib = -dynamiclib @@ -40,7 +49,6 @@ GCC.args.g.max = -gdwarf-2 -g3 GCC.args.O.none = -O0 GCC.args.O.size = -Os GCC.args.O.speed = -O3 -GCC.args.extra = GCC.args.D = -D$(1) GCC.args.I = -I$(1) GCC.args.muldefs = -Wl,--allow-multiple-definition @@ -51,6 +59,16 @@ GCC.args.L = -L$(1) GCC.args.l = -l$(1) GCC.args.end = -Wl,--end-group +GCC.args.extra = +GCC.args.extra.h_o = +GCC.args.extra.c_o = +GCC.args.extra.dylib = +GCC.args.extra.exe = +GCC.args.extra.hpp_o = +GCC.args.extra.cpp_o = +GCC.args.extra.dylib++ = +GCC.args.extra.exe++ = + ############################################################################### define import.GCC @@ -68,7 +86,6 @@ define import.GCC $(1).GCC.pic = $$(GCC.pic) $(1).GCC.g = $$(GCC.g) $(1).GCC.O = $$(GCC.O) - $(1).GCC.extra = $$(GCC.extra) $(1).GCC.D = $$(GCC.D) $(1).GCC.I = $$(GCC.I) $(1).GCC.muldefs = $$(GCC.muldefs) @@ -80,6 +97,16 @@ define import.GCC $(1).GCC.l = $$(GCC.l) $(1).GCC.end = $$(GCC.end) + $(1).GCC.extra = $$(GCC.extra) + $(1).GCC.extra.h_o = $$(GCC.extra.h_o) + $(1).GCC.extra.c_o = $$(GCC.extra.c_o) + $(1).GCC.extra.dylib = $$(GCC.extra.dylib) + $(1).GCC.extra.exe = $$(GCC.extra.exe) + $(1).GCC.extra.hpp_o = $$(GCC.extra.hpp_o) + $(1).GCC.extra.cpp_o = $$(GCC.extra.cpp_o) + $(1).GCC.extra.dylib++ = $$(GCC.extra.dylib++) + $(1).GCC.extra.exe++ = $$(GCC.extra.exe++) + $(1).GCC.args.pipe = $$(GCC.args.pipe) $(1).GCC.args.strip = $$(GCC.args.strip) $(1).GCC.args.dylib = $$(GCC.args.dylib) @@ -96,7 +123,6 @@ define import.GCC $(1).GCC.args.O.none = $$(GCC.args.O.none) $(1).GCC.args.O.size = $$(GCC.args.O.size) $(1).GCC.args.O.speed = $$(GCC.args.O.speed) - $(1).GCC.args.extra = $$(GCC.args.extra) $(1).GCC.args.D = $$(GCC.args.D) $(1).GCC.args.I = $$(GCC.args.I) $(1).GCC.args.muldefs = $$(GCC.args.muldefs) @@ -107,25 +133,35 @@ define import.GCC $(1).GCC.args.l = $$(GCC.args.l) $(1).GCC.args.end = $$(GCC.args.end) + $(1).GCC.args.extra = $$(GCC.args.extra) + $(1).GCC.args.extra.h_o = $$(GCC.args.extra.h_o) + $(1).GCC.args.extra.c_o = $$(GCC.args.extra.c_o) + $(1).GCC.args.extra.dylib = $$(GCC.args.extra.dylib) + $(1).GCC.args.extra.exe = $$(GCC.args.extra.exe) + $(1).GCC.args.extra.hpp_o = $$(GCC.args.extra.hpp_o) + $(1).GCC.args.extra.cpp_o = $$(GCC.args.extra.cpp_o) + $(1).GCC.args.extra.dylib++ = $$(GCC.args.extra.dylib++) + $(1).GCC.args.extra.exe++ = $$(GCC.args.extra.exe++) + ########################################################################### $(1).GCC.c = -c $$(4) $(1).GCC.o = -o $$(3) # FUNCTION: C precompiled headers - $(1).GCC.H_O.args = !gcc ?pipe ?ML ?H *W *archs ?vis ?pic .g .O ?extra *D *I !c !o + $(1).GCC.H_O.args = !gcc ?pipe ?ML ?H *W *archs ?vis ?pic .g .O ?extra ?extra.h_o *D *I !c !o $(1).GCC.H_O = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.H_O.args),$$(1),$$(2)) # FUNCTION: C compile source - $(1).GCC.C_O.args = !gcc ?pipe ?ML ?H *W *archs ?vis ?pic .g .O ?extra *D *I !c !o + $(1).GCC.C_O.args = !gcc ?pipe ?ML ?H *W *archs ?vis ?pic .g .O ?extra ?extra.c_o *D *I !c !o $(1).GCC.C_O = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.C_O.args),$$(1),$$(2)) # FUNCTION: C++ precompile headers - $(1).GCC.HPP_O.args = !gxx ?pipe ?ML ?H *W *archs ?vis ?pic .g .O ?extra *D *I !c !o + $(1).GCC.HPP_O.args = !gxx ?pipe ?ML ?H *W *archs ?vis ?pic .g .O ?extra ?extra.hpp_o *D *I !c !o $(1).GCC.HPP_O = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.HPP_O.args),$$(1),$$(2)) # FUNCTION: C++ compile source - $(1).GCC.CPP_O.args = !gxx ?pipe ?ML ?H *W *archs ?vis ?pic .g .O ?extra *D *I !c !o + $(1).GCC.CPP_O.args = !gxx ?pipe ?ML ?H *W *archs ?vis ?pic .g .O ?extra ?extra.cpp_o *D *I !c !o $(1).GCC.CPP_O = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.CPP_O.args),$$(1),$$(2)) ########################################################################### @@ -133,18 +169,18 @@ define import.GCC $(1).GCC.i = $$(4) # FUNCTION: C link dynamic-lib - $(1).GCC.DYLIB.args = !gcc ?pipe ?strip ?dylib ?ML *W *archs ?vis ?pic .g .O ?extra *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end + $(1).GCC.DYLIB.args = !gcc ?pipe ?strip ?dylib ?extra.dylib ?ML *W *archs ?vis ?pic .g .O ?extra *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end $(1).GCC.DYLIB = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.DYLIB.args),$$(1),$$(2)) # FUNCTION: C link executable - $(1).GCC.EXE.args = !gcc ?pipe ?strip ?ML *W *archs ?vis ?pic .g .O ?extra *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end + $(1).GCC.EXE.args = !gcc ?pipe ?strip ?extra.exe ?ML *W *archs ?vis ?pic .g .O ?extra *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end $(1).GCC.EXE = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.EXE.args),$$(1),$$(2)) # FUNCTION: C++ link dynamic-lib - $(1).GCC.DYLIB++.args = !gxx ?pipe ?strip ?dylib ?ML *W *archs ?vis ?pic .g .O ?extra *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end + $(1).GCC.DYLIB++.args = !gxx ?pipe ?strip ?dylib ?extra.dylib++ ?ML *W *archs ?vis ?pic .g .O ?extra *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end $(1).GCC.DYLIB++ = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.DYLIB++.args),$$(1),$$(2)) # FUNCTION: C++ link executable - $(1).GCC.EXE++.args = !gxx ?pipe ?strip ?ML *W *archs ?vis ?pic .g .O ?extra *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end + $(1).GCC.EXE++.args = !gxx ?pipe ?strip ?extra.exe++ ?ML *W *archs ?vis ?pic .g .O ?extra *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end $(1).GCC.EXE++ = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.EXE++.args),$$(1),$$(2)) endef |