summaryrefslogtreecommitdiffstats
path: root/Jamfile
blob: a900913d9e0493ac0fd052f848a8a9c5d0ada1b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# $Id: Jamfile,v 1.38 2003/10/13 23:46:41 titer Exp $
#
# This file is part of the HandBrake source code.
# Homepage: <http://beos.titer.org/handbrake/>.
# It may be used under the terms of the GNU General Public License.

HB_VERSION = 0.4 ;

# Compilers
C++  = g++ ;
LINK = g++ ;

# Flags
C++FLAGS  = $(CPPFLAGS) ;
C++FLAGS += -g -Wall -Werror ;
C++FLAGS += -DVERSION=\\\"$(HB_VERSION)\\\" -DSYS_$(OS) ;
LINKFLAGS = $(LDFLAGS) ;
HDRS      = core ;

# Optims
C++FLAGS += -funroll-loops ;
OPTIM     = -O3 ;

# Libs
LINKLIBS = -ldvdplay -ldvdread -ldvdcss -lmpeg2 -lavcodec -la52 -lmp3lame ;

# OS specific
if $(OS) = BEOS
{
    C++FLAGS += -Wno-multichar ;
    LINKLIBS += -lbe -ltracker ;
}
else if $(OS) = LINUX
{
    LINKLIBS += -lpthread ;
}
else if $(OS) = MACOSX
{
    # needed to clean HandBrake.app
    RM = rm -rf ;
}

# Do not remove temporary object files
# There MUST be a cleaner way to do this
actions quietly updated piecemeal together RmTemps
{
}

# Build HandBrake.app using ProjectBuilder
rule OSXApp
{
    Clean clean : $(1) ;
    BuildOSXApp $(1) ;
}

actions BuildOSXApp
{
    $(RM) HandBrake.app ;
    ( cd macosx && pbxbuild ) && mv macosx/build/HandBrake.app . ;
    $(RM) macosx/build ;
}

Library core/libhb : core/Ac3Decoder.cpp core/AviMuxer.cpp
                     core/Common.cpp core/DVDReader.cpp core/Fifo.cpp
                     core/Manager.cpp core/Mp3Encoder.cpp
                     core/Mpeg2Decoder.cpp core/Mpeg4Encoder.cpp
		     core/MpegDemux.cpp core/Resizer.cpp
		     core/Scanner.cpp core/Thread.cpp core/Worker.cpp ;

LinkLibraries HBTest : core/libhb.a ;
Main HBTest : test/Test.cpp ;

if $(OS) = BEOS
{
    LinkLibraries HandBrake : core/libhb.a ;
    Main HandBrake : beos/HandBrake.cpp beos/MainWindow.cpp
                     beos/PictureWin.cpp beos/ScanView.cpp
		     beos/RipView.cpp ;
}

if $(OS) = MACOSX
{
    OSXApp HandBrake.app ;
    Depends HandBrake.app : core/libhb.a ;
    Depends all : HandBrake.app ;
}