OSDN Git Service

Don't allow theora to use pkg-config and use system versions of ogg and vorbis
[handbrake-jp/handbrake-jp-git.git] / Makefile
1 include Makefile.config
2
3 SYSTEM = $(shell uname -s)
4
5 # Special case for Mac OS X: everything is handled from the Xcode project
6
7 #
8 # Darwin
9 #
10 ifeq ($(SYSTEM),Darwin)
11
12 snapshot:   clean snapshot-app
13
14 all:    clean app
15
16 all-chunky:    clean app-chunky
17
18 test:   clean cli
19
20 dev:    clean internal
21
22 app:    libhb/hbversion.h
23         (./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -target libhb -target HandBrake -target HandBrakeCLI -configuration UB HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" APPCAST_URL="http://handbrake.fr/appcast.xml" build | sed '/^$$/d'  )
24
25 contrib/.contrib:
26         @$(MAKE) --no-print-directory -C contrib all
27
28 snapshot-app: contrib/.contrib unstable-libhb/hbversion.h
29         ( cd macosx ; xcodebuild -target libhb -target HandBrake -target HandBrakeCLI -configuration Deployment HB_BUILD="$(SNAP_HB_BUILD)" HB_VERSION="$(SNAP_HB_VERSION)" CURRENT_PROJECT_VERSION="$(SNAP_HB_VERSION)" APPCAST_URL="http://handbrake.fr/appcast_unstable.xml" build | sed '/^$$/d' )
30
31 app-chunky: libhb/hbversion.h
32         (./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -alltargets -configuration UB HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" APPCAST_URL="http://handbrake.fr/appcast.xml" build | sed '/^$$/d'  )
33
34 cli:    libhb/hbversion.h
35         (./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -target libhb -target HandBrakeCLI -configuration UB HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" build | sed '/^$$/d' )
36
37 clean:
38         (cd macosx ; xcodebuild -alltargets -configuration UB clean | sed '/^$$/d' ; rm -f libhb/hbversion.h ; rm -f contrib/config.cache )
39
40 mrproper:
41         (rm -rf libhb/hbversion.h contrib/*tar.gz contrib/include contrib/lib contrib/DarwinContribVersion.txt ; cd macosx ; xcodebuild -alltargets -configuration UB clean | sed '/^$$/d' )
42
43 release:
44         (rm -rf HandBrake HandBrake*dmg ; mkdir -p HandBrake/api HandBrake/doc HandBrake/doc/pdf; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/doc ; cp -rp pdf/ HandBrake/doc/pdf/ ; cp -rp HandBrake.app HandBrake ; cp -rp libhb/libhb.dylib HandBrake/api ; cp -rp libhb/hb.h libhb/common.h libhb/ports.h HandBrake/api ; cp -rp HandBrakeCLI HandBrake ; hdiutil create -srcfolder HandBrake  -format UDZO HandBrake-$(HB_VERSION)-MacOS_UB.dmg ; rm -rf HandBrake )
45
46 gui-release:
47         (rm -rf HandBrake HandBrake*GUI_UB.dmg ; mkdir -p HandBrake/docs ; cp AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrake.app HandBrake  ; hdiutil create -srcfolder HandBrake  -format UDBZ HandBrake-$(HB_VERSION)-MacOSX.4_GUI_UB.dmg ; rm -rf HandBrake )
48
49 cli-release:
50         (rm -rf HandBrake HandBrake*CLI_UB.dmg ; mkdir -p HandBrake/docs ; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrakeCLI HandBrake ; hdiutil create -srcfolder HandBrake  -format UDZO HandBrake-$(HB_VERSION)-MacOSX.3_CLI_UB.dmg ; rm -rf HandBrake )
51
52 gui-snapshot-release:
53         (rm -rf HandBrake HandBrake*GUI_UB.dmg ; mkdir -p HandBrake/docs ; cp AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrake.app HandBrake  ; hdiutil create -srcfolder HandBrake  -format UDBZ HandBrake-$(SNAP_HB_VERSION)-MacOSX.5_GUI_UB.dmg ; rm -rf HandBrake )
54
55 cli-snapshot-release:
56         (rm -rf HandBrake HandBrake*CLI_UB.dmg ; mkdir -p HandBrake/docs ; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrakeCLI HandBrake ; hdiutil create -srcfolder HandBrake  -format UDZO HandBrake-$(SNAP_HB_VERSION)-MacOSX.5_CLI_UB.dmg ; rm -rf HandBrake )
57
58 endif
59
60 #
61 # Linux
62 #
63 ifeq ($(SYSTEM),Linux)
64
65 all:    contrib/.contrib HandBrakeCLI
66         (rm -rf HandBrake HandBrake*.tar.gz ; mkdir -p HandBrake/api HandBrake/doc; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/doc ;  cp -rp libhb/hb.h libhb/common.h libhb/ports.h HandBrake/api ; cp -rp HandBrakeCLI HandBrake ; tar zcvf HandBrake-$(HB_VERSION)_i386.tar.gz HandBrake ; rm -rf HandBrake )
67
68 contrib/.contrib:
69         @$(MAKE) --no-print-directory -C contrib all
70
71 libhb/libhb.a: unstable-libhb/hbversion.h
72         @$(MAKE) --no-print-directory -C libhb all
73
74 HandBrakeCLI: libhb/libhb.a
75         @$(MAKE) --no-print-directory -C test all
76
77 clean:
78         @$(MAKE) --no-print-directory -C libhb clean
79         @$(MAKE) --no-print-directory -C test clean
80         @rm libhb/hbversion.h
81         @rm -f contrib/config.cache
82
83 mrproper: clean
84         @$(MAKE) --no-print-directory -C contrib mrproper
85
86 endif
87
88 #
89 # Cygwin
90 #
91 ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT)
92
93 all:    contrib/.contrib HandBrakeCLI
94
95 app:    contribPack libhb/libhb.a HandBrakeCLI
96
97 contribPack:
98         (./DownloadCygWinContribBinaries.sh)
99         
100 contrib/.contrib:
101         @$(MAKE) --no-print-directory -C contrib all
102
103 libhb/libhb.a: unstable-libhb/hbversion.h
104         @$(MAKE) --no-print-directory -C libhb all
105
106 HandBrakeCLI: libhb/libhb.a
107         @$(MAKE) --no-print-directory -C test all
108         
109 clean:
110         @$(MAKE) --no-print-directory -C libhb clean
111         @$(MAKE) --no-print-directory -C test clean
112         @rm libhb/hbversion.h
113
114 mrproper: clean
115         @$(MAKE) --no-print-directory -C contrib mrproper
116
117 endif
118
119 libhb/hbversion.h:
120         echo "#ifndef HB_BUILD" > libhb/hbversion.h
121         echo "#define HB_BUILD $(HB_BUILD)" >> libhb/hbversion.h
122         echo "#endif" >> libhb/hbversion.h
123         echo "#ifndef HB_VERSION" >> libhb/hbversion.h
124         echo "#define HB_VERSION \"$(HB_VERSION)\"" >> libhb/hbversion.h
125         echo "#endif" >> libhb/hbversion.h
126         echo "#ifndef HB_APPCAST_URL" >> libhb/hbversion.h
127         echo "#define APPCAST_URL \"http://handbrake.fr/appcast.xml\"" >> libhb/hbversion.h
128         echo "#endif" >> libhb/hbversion.h
129
130 unstable-libhb/hbversion.h:
131         echo "#ifndef HB_BUILD" > libhb/hbversion.h
132         echo "#define HB_BUILD $(SNAP_HB_BUILD)" >> libhb/hbversion.h
133         echo "#endif" >> libhb/hbversion.h
134         echo "#ifndef HB_VERSION" >> libhb/hbversion.h
135         echo "#define HB_VERSION \"$(SNAP_HB_VERSION)\"" >> libhb/hbversion.h
136         echo "#endif" >> libhb/hbversion.h
137         echo "#ifndef HB_APPCAST_URL" >> libhb/hbversion.h
138         echo "#define APPCAST_URL \"http://handbrake.fr/appcast_unstable.xml\"" >> libhb/hbversion.h
139         echo "#endif" >> libhb/hbversion.h