1 # $Id: Jamrules,v 1.38 2004/05/25 17:50:12 titer Exp $
3 # This file is part of the HandBrake source code.
4 # Homepage: <http://handbrake.m0k.org/>.
5 # It may be used under the terms of the GNU General Public License.
8 LANGUAGES = fr de it pl ru nl es pt ja ;
15 OPTIM = -O3 -funroll-loops ;
16 DEFINES = HB_$(OS) HB_VERSION=\\\"$(HB_VERSION)\\\" ;
20 # Avoid multichar warnings caused by BeOS system headers
21 CCFLAGS = -Wno-multichar ;
22 C++FLAGS = -Wno-multichar ;
23 # BeOS' gcc tends to crash with -funroll-loops
30 DEFINES += WORDS_BIGENDIAN ;
38 # Build under cygwin but without the emulation layer
39 CCFLAGS = -mno-cygwin ;
40 C++FLAGS = -mno-cygwin ;
41 LINKFLAGS = -mno-cygwin ;
45 NotFile clean-contrib clean-all ;
46 Always clean-contrib ;
47 Depends clean-all : clean clean-contrib ;
49 # _Object: same as Jambase's Object, except
50 # * those aren't cleaned by 'jam clean' (to prevent from deleting
51 # every contrib library by accident)
52 # * it handles *.asm files
55 MakeLocate $(<) : $(LOCATE_TARGET) ;
56 SEARCH on $(>) = $(SEARCH_SOURCE) ;
57 HDRS on $(<) = $(SEARCH_SOURCE) $(SUBDIRHDRS) $(HDRS) ;
58 HDRRULE on $(>) = HdrRule ;
59 HDRSCAN on $(>) = $(HDRPATTERN) ;
61 $(SEARCH_SOURCE:E) $(SUBDIRHDRS) $(HDRS) $(STDHDRS) ;
62 HDRGRIST on $(>) = $(HDRGRIST) ;
63 DEFINES on $(<) += $(DEFINES) ;
66 case .asm : As $(<) : $(>) ;
67 case .nas : As $(<) : $(>) ;
68 case .c : Cc $(<) : $(>) ;
69 case .cpp : C++ $(<) : $(>) ;
72 # _Objects: use _Object
76 for _i in [ FGristFiles $(<) ]
78 _Object $(_i:S=$(SUFOBJ)) : $(_i) ;
79 Depends obj : $(_i:S=$(SUFOBJ)) ;
83 # Simplified LibraryFromObjects which doesn't clean the target library
84 # nor the temporary .o files
88 _s = [ FGristFiles $(>:S=$(SUFOBJ)) ] ;
89 _l = $(<:S=$(SUFLIB)) ;
92 MakeLocate $(_l) $(_l)($(_s:BS)) : $(LOCATE_TARGET) ;
93 Depends $(_l) : $(_s) ;
94 Archive $(_l) : $(_s) ;
95 if $(RANLIB) { Ranlib $(_l) ; }
99 # ContribLibrary: library cleaned by 'jam clean-contrib'
102 _Library $(<) : $(>) ;
103 Clean clean-contrib : [ FGristFiles $(>:S=$(SUFOBJ)) ] ;
104 Clean clean-contrib : $(<:S=$(SUFLIB)) ;
107 # Library: library cleaned by 'jam clean'
110 _Library $(<) : $(>) ;
111 Clean clean : [ FGristFiles $(>:S=$(SUFOBJ)) ] ;
112 Clean clean : $(<:S=$(SUFLIB)) ;
115 # Build HandBrake.app using Xcode
119 Depends $(<) : $(>) ;
120 Clean clean : $(1) macosx/build ;
125 $(RM) $(<) macosx/build/HandBrake.app && \
126 ( cd macosx && xcodebuild ) && \
127 cp -r macosx/build/HandBrake.app $(<) && \
128 for i in $(LANGUAGES) ; do \
129 ( cd $(<)/Contents/Resources && \
130 cp -r English.lproj $i.lproj && \
131 cp ../../../macosx/i18n/$i.strings \
132 $i.lproj/Localizable.strings ) \
137 Depends $(<) : $(>) ;
138 BuildOSXPackage $(<) ;
140 actions BuildOSXPackage
142 rm -rf $(<) "HandBrake $(HB_VERSION)" && \
143 mkdir "HandBrake $(HB_VERSION)" && \
144 cp AUTHORS "HandBrake $(HB_VERSION)/AUTHORS.txt" && \
145 cp COPYING "HandBrake $(HB_VERSION)/COPYING.txt" && \
146 cp CREDITS "HandBrake $(HB_VERSION)/CREDITS.txt" && \
147 cp THANKS "HandBrake $(HB_VERSION)/THANKS.txt" && \
148 ( cd doc && ./genhtml.sh ) && \
149 cp doc/faq.html "HandBrake $(HB_VERSION)/FAQ.html" && \
150 cp -r HandBrake.app "HandBrake $(HB_VERSION)" && \
151 zip -9 -r $(<) "HandBrake $(HB_VERSION)" && \
152 rm -rf "HandBrake $(HB_VERSION)"
157 LINKLIBS on [ FAppendSuffix $(<) : $(SUFEXE) ] += $(>) ;
160 # Jambase's ObjectHdrs doesn't seem to work when ObjectHdrs is called
161 # several times on a file, and it doesn't works for asm files. Fixed
165 local s = [ FGristFiles $(<:S=$(SUFOBJ)) ] ;
166 HDRS on $(s) += $(>) ;
167 ASHDRS on $(s) += [ FIncludes $(>) ] ;
168 CCHDRS on $(s) += [ FIncludes $(>) ] ;