OSDN Git Service

This patch adds mingw32 cross-compilation support to HandBrake trunk to
[handbrake-jp/handbrake-jp-git.git] / make / include / main.defs
index 93271a3..a1bafbb 100644 (file)
@@ -1,16 +1,16 @@
-include $(PROJECT/)make/include/base.defs
-include $(PROJECT/)make/include/contrib.defs
-include $(PROJECT/)make/include/function.defs
-include $(PROJECT/)make/include/gcc.defs
-include $(PROJECT/)make/include/select.defs
-include $(PROJECT/)make/include/target.defs
-include $(PROJECT/)make/include/tool.defs
+include $(SRC/)make/include/base.defs
+include $(SRC/)make/include/contrib.defs
+include $(SRC/)make/include/function.defs
+include $(SRC/)make/include/gcc.defs
+include $(SRC/)make/include/select.defs
+include $(SRC/)make/include/target.defs
+include $(SRC/)make/include/tool.defs
 
 ###############################################################################
 
 MODULES += contrib/a52dec
 
-ifneq (,$(filter $(BUILD.system),cygwin))
+ifneq (,$(filter $(BUILD.system),cygwin mingw))
     MODULES += contrib/bzip2
 endif
 
@@ -27,10 +27,15 @@ MODULES += contrib/libsamplerate
 MODULES += contrib/libtheora
 MODULES += contrib/libvorbis
 MODULES += contrib/mpeg2dec
+
+ifneq (,$(filter $(BUILD.system),mingw))
+    MODULES += contrib/pthreadw32
+endif
+
 MODULES += contrib/x264
 MODULES += contrib/xvidcore
 
-ifneq (,$(filter $(BUILD.system),cygwin))
+ifneq (,$(filter $(BUILD.system),cygwin mingw))
     MODULES += contrib/zlib
 endif
 
@@ -39,21 +44,21 @@ MODULES += libhb
 
 ###############################################################################
 
-## test module is replaced with macosx when Darwin+Xcode
-ifneq (,$(filter $(BUILD.system),darwin))
-    ifeq (1,$(FEATURE.xcode))
-        MODULES += macosx
-    else
-        MODULES += test
-    endif
+ifeq (1-darwin,$(FEATURE.xcode)-$(BUILD.system))
+    ## use macosx module when xcode+darwin
+    MODULES += macosx
 else
+    ## default is to build CLI
     MODULES += test
 endif
 
-ifneq (,$(filter $(BUILD.system),linux))
-    ifeq (1,$(FEATURE.gtk))
-        MODULES += gtk
-    endif
+ifeq (1-mingw,$(FEATURE.gtk.mingw)-$(BUILD.system))
+    MODULES += gtk
+endif
+
+ifeq (1-linux,$(FEATURE.gtk)-$(BUILD.system))
+    ## build gtk when gtk+linux
+    MODULES += gtk
 endif
 
 ###############################################################################
@@ -62,6 +67,6 @@ MODULES += doc
 
 ###############################################################################
 
-include $(MODULES:%=$(PROJECT/)%/module.defs)
-include $(PROJECT/)make/variant/$(HOST.system).defs
--include $(PROJECT/)make/variant/$(HOST.system).$(BUILD.machine).defs
+include $(MODULES:%=$(SRC/)%/module.defs)
+include $(SRC/)make/variant/$(BUILD.system).defs
+-include $(SRC/)make/variant/$(BUILD.system).$(BUILD.machine).defs