OSDN Git Service

HandBrake 0.5.2
[handbrake-jp/handbrake-jp-git.git] / Jamfile
1 # $Id: Jamfile,v 1.10 2003/11/13 02:09:14 titer Exp $
2 #
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.
6
7 HB_VERSION = 0.5.2 ;
8
9 # Compilers
10 CC   = gcc ;
11 C++  = g++ ;
12 LINK = gcc ;
13
14 # Flags
15 CCFLAGS   = $(CFLAGS) ;
16 CCFLAGS  += -g -Wall -Werror ;
17 CCFLAGS  += -DVERSION=\\\"$(HB_VERSION)\\\" -DSYS_$(OS) ;
18 C++FLAGS  = $(CPPFLAGS) ;
19 C++FLAGS += -g -Wall -Werror ;
20 C++FLAGS += -DVERSION=\\\"$(HB_VERSION)\\\" -DSYS_$(OS) ;
21 LINKFLAGS = $(LDFLAGS) ;
22 HDRS      = core ;
23
24 # Optims
25 CCFLAGS  += -funroll-loops ;
26 C++FLAGS += -funroll-loops ;
27 OPTIM     = -O3 ;
28
29 # Libs
30 LINKLIBS = -ldvdplay -ldvdread -ldvdcss -lmpeg2 -lavcodec -la52
31            -lmp3lame -lxvidcore ;
32
33 # OS specific
34 if $(OS) = BEOS
35 {
36     CCFLAGS  += -Wno-multichar ;
37     C++FLAGS += -Wno-multichar ;
38     LINKLIBS += -lbe -ltracker ;
39 }
40 else if $(OS) = LINUX
41 {
42     LINKLIBS += -lpthread ;
43 }
44 else if $(OS) = MACOSX
45 {
46     CCFLAGS   += -no-cpp-precomp ;
47     C++FLAGS  += -no-cpp-precomp ;
48     LINKFLAGS += -multiply_defined suppress ;
49
50     # needed to clean HandBrake.app
51     RM = rm -rf ;
52 }
53 else if $(OS) = CYGWIN
54 {
55     CCFLAGS   += -mno-cygwin ;
56     C++FLAGS  += -mno-cygwin ;
57     LINKFLAGS += -mno-cygwin ;
58 }
59
60 # Do not remove temporary object files
61 # There MUST be a cleaner way to do this
62 actions quietly updated piecemeal together RmTemps
63 {
64 }
65
66 # Build HandBrake.app using Xcode
67 rule OSXApp
68 {
69     Clean clean : $(1) macosx/build ;
70     BuildOSXApp $(1) ;
71 }
72
73 actions BuildOSXApp
74 {
75     $(RM) HandBrake.app ;
76     ( cd macosx && xcodebuild ) && cp -r macosx/build/HandBrake.app . ;
77 }
78
79 Library core/libhb : core/Ac3Dec.c core/AviMux.c
80                      core/Utils.c core/DVDRead.c core/Fifo.c
81                      core/HandBrake.c core/Mp3Enc.c
82                      core/Mpeg2Dec.c core/FfmpegEnc.c
83                      core/MadDec.c core/Scale.c
84                      core/Scan.c core/Thread.c core/Work.c
85                      core/XvidEnc.c core/XvidVbr.c ;
86
87 LinkLibraries HBTest : core/libhb.a ;
88 Main HBTest : test/test.c ;
89
90 if $(OS) = BEOS
91 {
92     LinkLibraries HandBrake : core/libhb.a ;
93     Main HandBrake : beos/HBApp.cpp beos/MainWindow.cpp
94                      beos/PictureWin.cpp beos/ScanView.cpp
95                      beos/RipView.cpp ;
96 }
97
98 if $(OS) = MACOSX
99 {
100     OSXApp HandBrake.app ;
101     Depends HandBrake.app : core/libhb.a ;
102     Depends all : HandBrake.app ;
103 }
104