2007-10-12 22:19:19 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2008-02-15 21:19:24 +00:00
|
|
|
# compile_xorriso.sh
|
2015-08-12 09:09:47 +00:00
|
|
|
# Copyright 2005 - 2015 Thomas Schmitt, scdbackup@gmx.net
|
|
|
|
# GPL version 2 or later
|
2008-02-15 21:19:24 +00:00
|
|
|
#
|
|
|
|
# Not intended for general use in production installations !
|
|
|
|
# Rather use: ./bootstrap ; ./configure ; make
|
|
|
|
#
|
2009-04-10 10:25:58 +00:00
|
|
|
# This is a development tool which expects a special setup of directories
|
|
|
|
# on a Linux system (e.g. SuSE 10.2).
|
2008-02-15 21:19:24 +00:00
|
|
|
# It is to be executed in a common parent of the directories given with
|
|
|
|
# $isofs $isoburn $burn $xorr
|
2007-10-12 22:19:19 +00:00
|
|
|
|
2009-01-24 16:38:13 +00:00
|
|
|
isofs=./nglibisofs-develop/libisofs/libisofs_libisofs_la-
|
2009-03-29 16:46:50 +00:00
|
|
|
isofs_filter=./nglibisofs-develop/libisofs/filters/libisofs_libisofs_la-
|
2007-10-12 22:19:19 +00:00
|
|
|
burn=./libburn-develop/libburn
|
2008-01-26 00:26:57 +00:00
|
|
|
isoburn=./libisoburn-develop/libisoburn
|
|
|
|
xorr=./libisoburn-develop/xorriso
|
2007-10-12 22:19:19 +00:00
|
|
|
|
|
|
|
debug_opts="-O2"
|
2012-12-20 20:22:58 +00:00
|
|
|
def_opts="-DXorriso_allow_external_filterS -DXorriso_allow_launch_frontenD"
|
2007-10-12 22:19:19 +00:00
|
|
|
largefile_opts="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1"
|
|
|
|
do_strip=0
|
|
|
|
static_opts=
|
2014-02-05 19:11:50 +00:00
|
|
|
warn_opts="-Wall -Wextra -Wno-unused-parameter -Wno-char-subscripts"
|
2011-12-28 15:55:13 +00:00
|
|
|
# warn_opts="-Wall -Wsign-compare"
|
2008-01-26 00:26:57 +00:00
|
|
|
nglibisofs=1
|
2011-12-28 15:55:13 +00:00
|
|
|
def_have="-DHAVE_STDINT_H"
|
2008-10-09 15:01:06 +00:00
|
|
|
def_libreadline="-DXorriso_with_readlinE"
|
2011-12-28 15:55:13 +00:00
|
|
|
def_libjte="-DXorriso_with_libjtE -DLibisofs_with_libjtE"
|
2008-10-09 15:01:06 +00:00
|
|
|
link_libreadline="-lreadline"
|
2010-01-01 13:00:47 +00:00
|
|
|
link_libcdio=
|
2011-12-28 15:55:13 +00:00
|
|
|
link_libjte="-ljte"
|
2007-10-12 22:19:19 +00:00
|
|
|
|
|
|
|
for i in "$@"
|
|
|
|
do
|
|
|
|
if test "$i" = "-do_diet"
|
|
|
|
then
|
|
|
|
def_opts="$def_opts -DXorriso_no_helP"
|
|
|
|
warn_opts=
|
|
|
|
elif test "$i" = "-do_strip"
|
|
|
|
then
|
|
|
|
do_strip=1
|
|
|
|
elif test "$i" = "-g"
|
|
|
|
then
|
2007-12-15 16:21:51 +00:00
|
|
|
debug_opts="-g -O0"
|
2008-10-09 15:01:06 +00:00
|
|
|
elif test "$i" = "-no_libreadline"
|
|
|
|
then
|
|
|
|
def_libreadline=""
|
|
|
|
link_libreadline=""
|
2010-01-01 13:00:47 +00:00
|
|
|
elif test "$i" = "-dvd_obs_64k"
|
|
|
|
then
|
|
|
|
def_opts="$def_opts -DXorriso_dvd_obs_default_64K"
|
|
|
|
elif test "$i" = "-use_libcdio"
|
|
|
|
then
|
|
|
|
link_libcdio="-lcdio"
|
2011-12-28 15:55:13 +00:00
|
|
|
elif test "$i" = "-no_libjte"
|
|
|
|
then
|
|
|
|
def_libjte=""
|
|
|
|
link_libjte=""
|
2007-10-12 22:19:19 +00:00
|
|
|
elif test "$i" = "-help" -o "$i" = "--help" -o "$i" = "-h"
|
|
|
|
then
|
|
|
|
echo \
|
|
|
|
"$xorr/compile_xorriso.sh : to be executed above top level directories"
|
|
|
|
echo "Options:"
|
2010-01-01 13:00:47 +00:00
|
|
|
echo " -dvd_obs_64k 64 KB default size for DVD/BD writing."
|
2008-10-09 15:01:06 +00:00
|
|
|
echo " -no_libreadline do not compile for and link with libreadline."
|
2010-01-01 13:00:47 +00:00
|
|
|
echo " -use_libcdio link with -lcdio because libburn uses it."
|
2011-12-28 15:55:13 +00:00
|
|
|
echo " -no_libjte do not compile for and link with libjte."
|
2007-10-12 22:19:19 +00:00
|
|
|
echo " -do_diet produce capability reduced lean version."
|
|
|
|
echo " -do_strip apply program strip to compiled programs."
|
|
|
|
echo " -g produce debuggable programm."
|
|
|
|
echo " -static compile with cc option -static."
|
|
|
|
exit 0
|
|
|
|
elif test "$i" = "-static"
|
|
|
|
then
|
|
|
|
static_opts="-static"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2008-01-10 11:45:53 +00:00
|
|
|
libisofs=
|
2009-01-24 16:38:13 +00:00
|
|
|
libisofs="$libisofs $isofs"buffer.o
|
|
|
|
libisofs="$libisofs $isofs"builder.o
|
|
|
|
libisofs="$libisofs $isofs"data_source.o
|
|
|
|
libisofs="$libisofs $isofs"ecma119.o
|
|
|
|
libisofs="$libisofs $isofs"ecma119_tree.o
|
|
|
|
libisofs="$libisofs $isofs"eltorito.o
|
|
|
|
libisofs="$libisofs $isofs"filesrc.o
|
|
|
|
libisofs="$libisofs $isofs"fs_image.o
|
|
|
|
libisofs="$libisofs $isofs"fs_local.o
|
|
|
|
libisofs="$libisofs $isofs"fsource.o
|
|
|
|
libisofs="$libisofs $isofs"image.o
|
|
|
|
libisofs="$libisofs $isofs"iso1999.o
|
|
|
|
libisofs="$libisofs $isofs"joliet.o
|
2012-05-24 07:13:20 +00:00
|
|
|
libisofs="$libisofs $isofs"hfsplus.o
|
2012-05-24 09:35:35 +00:00
|
|
|
libisofs="$libisofs $isofs"hfsplus_decompose.o
|
|
|
|
libisofs="$libisofs $isofs"hfsplus_classes.o
|
|
|
|
libisofs="$libisofs $isofs"hfsplus_case.o
|
2009-01-24 16:38:13 +00:00
|
|
|
libisofs="$libisofs $isofs"libiso_msgs.o
|
|
|
|
libisofs="$libisofs $isofs"messages.o
|
|
|
|
libisofs="$libisofs $isofs"node.o
|
|
|
|
libisofs="$libisofs $isofs"rockridge.o
|
|
|
|
libisofs="$libisofs $isofs"rockridge_read.o
|
|
|
|
libisofs="$libisofs $isofs"stream.o
|
|
|
|
libisofs="$libisofs $isofs"tree.o
|
|
|
|
libisofs="$libisofs $isofs"util.o
|
|
|
|
libisofs="$libisofs $isofs"util_htable.o
|
|
|
|
libisofs="$libisofs $isofs"util_rbtree.o
|
|
|
|
libisofs="$libisofs $isofs"system_area.o
|
|
|
|
libisofs="$libisofs $isofs"make_isohybrid_mbr.o
|
|
|
|
libisofs="$libisofs $isofs"aaip_0_2.o
|
2009-03-29 16:46:50 +00:00
|
|
|
libisofs="$libisofs $isofs"filter.o
|
|
|
|
libisofs="$libisofs $isofs_filter"external.o
|
2009-04-10 10:25:58 +00:00
|
|
|
libisofs="$libisofs $isofs_filter"zisofs.o
|
2009-04-15 07:19:47 +00:00
|
|
|
libisofs="$libisofs $isofs_filter"gzip.o
|
2009-07-23 10:32:48 +00:00
|
|
|
libisofs="$libisofs $isofs"md5.o
|
2008-07-19 11:30:08 +00:00
|
|
|
|
2007-10-12 22:19:19 +00:00
|
|
|
echo "Version timestamp : $(sed -e 's/#define Xorriso_timestamP "//' -e 's/"$//' "$xorr"/xorriso_timestamp.h)"
|
2008-07-19 11:30:08 +00:00
|
|
|
|
|
|
|
date -u '+#define Xorriso_build_timestamP "%Y.%m.%d.%H%M%S"' >"$xorr"/xorriso_buildstamp.h
|
|
|
|
echo "Build timestamp : $(sed -e 's/#define Xorriso_build_timestamP "//' -e 's/"$//' "$xorr"/xorriso_buildstamp.h)"
|
2007-10-12 22:19:19 +00:00
|
|
|
|
2010-01-01 13:00:47 +00:00
|
|
|
echo "compiling program $xorr/xorriso.c $static_opts $debug_opts $def_opts $link_libcdio"
|
2011-12-28 15:55:13 +00:00
|
|
|
cc -I. -DXorriso_with_maiN $def_have $def_libreadline $def_libjte \
|
2007-10-12 22:19:19 +00:00
|
|
|
$warn_opts \
|
|
|
|
$static_opts \
|
|
|
|
$debug_opts \
|
|
|
|
$def_opts \
|
2007-10-17 21:38:55 +00:00
|
|
|
$largefile_opts \
|
2007-10-12 22:19:19 +00:00
|
|
|
\
|
|
|
|
-o "$xorr"/xorriso \
|
|
|
|
\
|
2010-05-15 18:48:10 +00:00
|
|
|
"$xorr"/xorriso_main.c \
|
|
|
|
"$xorr"/sfile.c \
|
|
|
|
"$xorr"/aux_objects.c \
|
|
|
|
"$xorr"/findjob.c \
|
|
|
|
"$xorr"/check_media.c \
|
|
|
|
"$xorr"/misc_funct.c \
|
|
|
|
"$xorr"/text_io.c \
|
|
|
|
"$xorr"/match.c \
|
|
|
|
"$xorr"/emulators.c \
|
|
|
|
"$xorr"/disk_ops.c \
|
|
|
|
"$xorr"/cmp_update.c \
|
|
|
|
"$xorr"/parse_exec.c \
|
|
|
|
"$xorr"/opts_a_c.c \
|
|
|
|
"$xorr"/opts_d_h.c \
|
|
|
|
"$xorr"/opts_i_o.c \
|
|
|
|
"$xorr"/opts_p_z.c \
|
2007-10-12 22:19:19 +00:00
|
|
|
\
|
2010-05-15 18:48:10 +00:00
|
|
|
"$xorr"/base_obj.c \
|
|
|
|
"$xorr"/lib_mgt.c \
|
|
|
|
"$xorr"/sort_cmp.c \
|
|
|
|
"$xorr"/drive_mgt.c \
|
|
|
|
"$xorr"/iso_img.c \
|
|
|
|
"$xorr"/iso_tree.c \
|
|
|
|
"$xorr"/iso_manip.c \
|
|
|
|
"$xorr"/write_run.c \
|
|
|
|
"$xorr"/read_run.c \
|
|
|
|
"$xorr"/filters.c \
|
2007-10-17 21:38:55 +00:00
|
|
|
\
|
2010-05-19 16:06:36 +00:00
|
|
|
"$isoburn"/isoburn.c \
|
|
|
|
"$isoburn"/burn_wrap.c \
|
|
|
|
"$isoburn"/data_source.c \
|
|
|
|
"$isoburn"/isofs_wrap.c \
|
|
|
|
\
|
2007-10-12 22:19:19 +00:00
|
|
|
"$burn"/async.o \
|
|
|
|
"$burn"/debug.o \
|
|
|
|
"$burn"/drive.o \
|
|
|
|
"$burn"/file.o \
|
|
|
|
"$burn"/init.o \
|
|
|
|
"$burn"/options.o \
|
|
|
|
"$burn"/source.o \
|
|
|
|
"$burn"/structure.o \
|
|
|
|
\
|
|
|
|
"$burn"/sg.o \
|
|
|
|
"$burn"/write.o \
|
|
|
|
"$burn"/read.o \
|
|
|
|
"$burn"/libdax_audioxtr.o \
|
|
|
|
"$burn"/libdax_msgs.o \
|
2007-10-30 21:44:08 +00:00
|
|
|
"$burn"/cleanup.o \
|
2011-12-28 15:55:13 +00:00
|
|
|
"$burn"/cdtext.o \
|
2007-10-12 22:19:19 +00:00
|
|
|
\
|
|
|
|
"$burn"/mmc.o \
|
|
|
|
"$burn"/sbc.o \
|
|
|
|
"$burn"/spc.o \
|
|
|
|
"$burn"/util.o \
|
|
|
|
\
|
|
|
|
"$burn"/sector.o \
|
|
|
|
"$burn"/toc.o \
|
|
|
|
\
|
|
|
|
"$burn"/crc.o \
|
2009-10-17 19:11:25 +00:00
|
|
|
"$burn"/ecma130ab.o \
|
2007-10-12 22:19:19 +00:00
|
|
|
\
|
2008-01-10 11:45:53 +00:00
|
|
|
$libisofs \
|
2007-10-12 22:19:19 +00:00
|
|
|
\
|
2008-10-09 15:01:06 +00:00
|
|
|
$link_libreadline \
|
2010-01-01 13:00:47 +00:00
|
|
|
$link_libcdio \
|
2011-12-28 15:55:13 +00:00
|
|
|
$link_libjte \
|
2007-10-12 22:19:19 +00:00
|
|
|
\
|
2009-01-14 11:10:53 +00:00
|
|
|
-lpthread \
|
2009-04-10 10:25:58 +00:00
|
|
|
-lacl \
|
|
|
|
-lz
|
2007-10-12 22:19:19 +00:00
|
|
|
|
|
|
|
ret=$?
|
|
|
|
if test "$ret" = 0
|
|
|
|
then
|
|
|
|
dummy=dummy
|
|
|
|
else
|
|
|
|
echo >&2
|
|
|
|
echo "+++ FATAL : Compilation of xorriso failed" >&2
|
|
|
|
echo >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if test "$do_strip" = 1
|
|
|
|
then
|
|
|
|
echo "stripping result $xorr/xorriso"
|
|
|
|
strip "$xorr"/xorriso
|
|
|
|
fi
|
|
|
|
|
2015-08-12 09:09:47 +00:00
|
|
|
if test -x $xorr/unite_html_b_line
|
|
|
|
then
|
|
|
|
dummy=dummy
|
|
|
|
else
|
|
|
|
echo "compiling helper program $xorr/unite_html_b_line"
|
|
|
|
( cd $xorr && cc -g -Wall -o unite_html_b_line unite_html_b_line.c )
|
|
|
|
fi
|
|
|
|
|
2007-10-12 22:19:19 +00:00
|
|
|
echo 'done.'
|