# $Id: Jamfile,v 1.8 2003/11/09 22:11:06 titer Exp $ # # This file is part of the HandBrake source code. # Homepage: . # It may be used under the terms of the GNU General Public License. HB_VERSION = 0.5.1 ; # Compilers CC = gcc ; C++ = g++ ; LINK = gcc ; # Flags CCFLAGS = $(CFLAGS) ; CCFLAGS += -g -Wall -Werror ; CCFLAGS += -DVERSION=\\\"$(HB_VERSION)\\\" -DSYS_$(OS) ; C++FLAGS = $(CPPFLAGS) ; C++FLAGS += -g -Wall -Werror ; C++FLAGS += -DVERSION=\\\"$(HB_VERSION)\\\" -DSYS_$(OS) ; LINKFLAGS = $(LDFLAGS) ; HDRS = core ; # Optims CCFLAGS += -funroll-loops ; C++FLAGS += -funroll-loops ; OPTIM = -O3 ; # Libs LINKLIBS = -ldvdplay -ldvdread -ldvdcss -lmpeg2 -lavcodec -la52 -lmp3lame -lxvidcore ; # OS specific if $(OS) = BEOS { CCFLAGS += -Wno-multichar ; C++FLAGS += -Wno-multichar ; LINKLIBS += -lbe -ltracker ; } else if $(OS) = LINUX { LINKLIBS += -lpthread ; } else if $(OS) = MACOSX { CCFLAGS += -no-cpp-precomp ; C++FLAGS += -no-cpp-precomp ; LINKFLAGS += -multiply_defined suppress ; # needed to clean HandBrake.app RM = rm -rf ; } else if $(OS) = CYGWIN { CCFLAGS += -mno-cygwin ; C++FLAGS += -mno-cygwin ; LINKFLAGS += -mno-cygwin ; } # 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 Xcode rule OSXApp { Clean clean : $(1) macosx/build ; BuildOSXApp $(1) ; } actions BuildOSXApp { $(RM) HandBrake.app ; ( cd macosx && xcodebuild ) && cp -r macosx/build/HandBrake.app . ; } Library core/libhb : core/Ac3Dec.c core/AviMux.c core/Utils.c core/DVDRead.c core/Fifo.c core/HandBrake.c core/Mp3Enc.c core/Mpeg2Dec.c core/FfmpegEnc.c core/MadDec.c core/Scale.c core/Scan.c core/Thread.c core/Work.c core/XvidEnc.c core/XvidVbr.c ; LinkLibraries HBTest : core/libhb.a ; Main HBTest : test/test.c ; if $(OS) = BEOS { LinkLibraries HandBrake : core/libhb.a ; Main HandBrake : beos/HBApp.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 ; }