OSDN Git Service

ETSI TS 102 366 V1.2.1 compliant AC3 in MP4, replaces older hacked version that was...
[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 contrib/.contrib:
96         @$(MAKE) --no-print-directory -C contrib all
97
98 libhb/libhb.a: unstable-libhb/hbversion.h
99         @$(MAKE) --no-print-directory -C libhb all
100
101 HandBrakeCLI: libhb/libhb.a
102         @$(MAKE) --no-print-directory -C test all
103         
104 clean:
105         @$(MAKE) --no-print-directory -C libhb clean
106         @$(MAKE) --no-print-directory -C test clean
107         @rm libhb/hbversion.h
108
109 mrproper: clean
110         @$(MAKE) --no-print-directory -C contrib mrproper
111
112 endif
113
114 libhb/hbversion.h:
115         echo "#ifndef HB_BUILD" > libhb/hbversion.h
116         echo "#define HB_BUILD $(HB_BUILD)" >> libhb/hbversion.h
117         echo "#endif" >> libhb/hbversion.h
118         echo "#ifndef HB_VERSION" >> libhb/hbversion.h
119         echo "#define HB_VERSION \"$(HB_VERSION)\"" >> libhb/hbversion.h
120         echo "#endif" >> libhb/hbversion.h
121         echo "#ifndef HB_APPCAST_URL" >> libhb/hbversion.h
122         echo "#define APPCAST_URL \"http://handbrake.fr/appcast.xml\"" >> libhb/hbversion.h
123         echo "#endif" >> libhb/hbversion.h
124
125 unstable-libhb/hbversion.h:
126         echo "#ifndef HB_BUILD" > libhb/hbversion.h
127         echo "#define HB_BUILD $(SNAP_HB_BUILD)" >> libhb/hbversion.h
128         echo "#endif" >> libhb/hbversion.h
129         echo "#ifndef HB_VERSION" >> libhb/hbversion.h
130         echo "#define HB_VERSION \"$(SNAP_HB_VERSION)\"" >> libhb/hbversion.h
131         echo "#endif" >> libhb/hbversion.h
132         echo "#ifndef HB_APPCAST_URL" >> libhb/hbversion.h
133         echo "#define APPCAST_URL \"http://handbrake.fr/appcast_unstable.xml\"" >> libhb/hbversion.h
134         echo "#endif" >> libhb/hbversion.h