Commit 845ecf78 authored by Christoffer Ackelman's avatar Christoffer Ackelman

Prepared build script for a QT version.

parent 572c35e0
...@@ -72,9 +72,9 @@ fi ...@@ -72,9 +72,9 @@ fi
btype="dbg" btype="dbg"
ename=$ver$hw ename=$ver$hw
desc=$verl desc=$verl
gui="qt"
pwre add $ename $root/src \"\" $root/rls $btype $os $hw $gui "$desc"
pwre add $ename $root/src \"\" $root/rls $btype $os $hw "$desc"
pwre init $ename pwre init $ename
# Build # Build
......
...@@ -112,11 +112,19 @@ pre_so = ...@@ -112,11 +112,19 @@ pre_so =
# linkgtk := # linkgtk :=
#endif #endif
#ifeq ($(pwre_conf_qt),1)
# cqt := -DPWRE_CONF_QT=1
# linkqt := `pkg-config --libs QtCore QtGui`
#else
# cqt :=
# linkqt :=
#endif
log_done = log_done =
#csetos := -DOS_LINUX=1 -DOS=linux -D_LINUX -DHW_ARM=1 -DHW=ARM #csetos := -DOS_LINUX=1 -DOS=linux -D_LINUX -DHW_ARM=1 -DHW=ARM
#cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) -I$(jdk)/include -I$(jdk)/include/linux #cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) -I$(jdk)/include -I$(jdk)/include/linux
csetos := $(pwre_conf_cc_define) csetos := $(pwre_conf_cc_define)
cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirgtk) $(pwre_conf_incdirgst) cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirgtk) $(pwre_conf_incdirgst) $(pwre_conf_incdirgtk)
rm := rm rm := rm
cp := cp cp := cp
cpflags := cpflags :=
......
...@@ -112,6 +112,14 @@ pre_so = ...@@ -112,6 +112,14 @@ pre_so =
# linkgtk := # linkgtk :=
#endif #endif
#ifeq ($(pwre_conf_qt),1)
# cqt := -DPWRE_CONF_QT=1
# linkqt := `pkg-config --libs QtCore QtGui`
#else
# cqt :=
# linkqt :=
#endif
#ifeq ($(pwre_conf_libusb),1) #ifeq ($(pwre_conf_libusb),1)
# clibusb := -DPWRE_CONF_LIBUSB=1 # clibusb := -DPWRE_CONF_LIBUSB=1
# linklibusb := -lusb-1.0 # linklibusb := -lusb-1.0
...@@ -125,7 +133,7 @@ log_done = ...@@ -125,7 +133,7 @@ log_done =
#cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) -I/usr/X11R6/include -I$(jdk)/include -I$(jdk)/include/linux \ #cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) -I/usr/X11R6/include -I$(jdk)/include -I$(jdk)/include/linux \
`pkg-config --cflags gtk+-2.0` -DPREFIX=\"/usr/local\" -DSYSCONFDIR=\"/etc\" -DDATADIR=\"/usr/share\" -DLIBDIR=\"/usr/lib\" $(cmysql) $(cgtk) $(clibusb) `pkg-config --cflags gtk+-2.0` -DPREFIX=\"/usr/local\" -DSYSCONFDIR=\"/etc\" -DDATADIR=\"/usr/share\" -DLIBDIR=\"/usr/lib\" $(cmysql) $(cgtk) $(clibusb)
csetos := $(pwre_conf_cc_define) csetos := $(pwre_conf_cc_define)
cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirgtk) $(pwre_conf_incdirgst) cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirgtk) $(pwre_conf_incdirgst) $(pwre_conf_incdirqt)
rm := rm rm := rm
cp := cp cp := cp
cpflags := cpflags :=
......
...@@ -111,6 +111,14 @@ linkcp = : ...@@ -111,6 +111,14 @@ linkcp = :
# linkgtk := # linkgtk :=
#endif #endif
#ifeq ($(pwre_conf_qt),1)
# cqt := -DPWRE_CONF_QT=1
# linkqt := `pkg-config --libs QtCore QtGui`
#else
# cqt :=
# linkqt :=
#endif
#ifeq ($(pwre_conf_libusb),1) #ifeq ($(pwre_conf_libusb),1)
# clibusb := -DPWRE_CONF_LIBUSB=1 # clibusb := -DPWRE_CONF_LIBUSB=1
# linklibusb := -lusb-1.0 # linklibusb := -lusb-1.0
...@@ -124,7 +132,7 @@ log_done = ...@@ -124,7 +132,7 @@ log_done =
#cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) -I/usr/X11R6/include -I$(jdk)/include -I$(jdk)/include/linux \ #cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) -I/usr/X11R6/include -I$(jdk)/include -I$(jdk)/include/linux \
`pkg-config --cflags gtk+-2.0` -DPREFIX=\"/usr/local\" -DSYSCONFDIR=\"/etc\" -DDATADIR=\"/usr/share\" -DLIBDIR=\"/usr/lib\" $(cmysql) $(cgtk) $(clibusb) `pkg-config --cflags gtk+-2.0` -DPREFIX=\"/usr/local\" -DSYSCONFDIR=\"/etc\" -DDATADIR=\"/usr/share\" -DLIBDIR=\"/usr/lib\" $(cmysql) $(cgtk) $(clibusb)
csetos := $(pwre_conf_cc_define) csetos := $(pwre_conf_cc_define)
cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirgtk) $(pwre_conf_incdirgst) cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirgtk) $(pwre_conf_incdirgst) $(pwre_conf_incdirqt)
rm := rm rm := rm
cp := cp cp := cp
cpflags := cpflags :=
......
...@@ -169,6 +169,13 @@ endif ...@@ -169,6 +169,13 @@ endif
(%.o) : %.o (%.o) : %.o
@ echo "Error, rule shall not be used: (%.o) : %.o" @ echo "Error, rule shall not be used: (%.o) : %.o"
$(inc_dir)/%_qt.h : %_qt.h
# @ (>&2 echo "moc $(csetos) $(cinc) -o $<.moc.cpp $<")
@ moc -nw $(csetos) $(cinc) -o $<.moc.cpp $<
# if [ ! -s $<.moc.cpp ]; then rm $<.moc.cpp; fi;
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
@ chmod u+w $(target)
$(inc_dir)/%.h : %.h $(inc_dir)/%.h : %.h
@ $(log_h_h) @ $(log_h_h)
......
...@@ -45,6 +45,7 @@ $vmsinc = ""; ...@@ -45,6 +45,7 @@ $vmsinc = "";
$broot = "/usr/users/$user/$user" . "_dbg"; $broot = "/usr/users/$user/$user" . "_dbg";
$btype = "dbg"; $btype = "dbg";
$os = "linux"; $os = "linux";
$gui = "qt";
if ($ENV{"pwre_hosttype"} eq "rs6000") { if ($ENV{"pwre_hosttype"} eq "rs6000") {
$hw = "ppc"; $hw = "ppc";
} else { } else {
...@@ -352,12 +353,6 @@ sub ebuild # args: pass flavour ...@@ -352,12 +353,6 @@ sub ebuild # args: pass flavour
my $pass = $_[0]; my $pass = $_[0];
my $flavour = $_[1]; my $flavour = $_[1];
if ( $_[1] eq "motif") {
$flavour = "motif";
}
else {
$flavour = "gtk";
}
if ( $pass eq "rt" ) { if ( $pass eq "rt" ) {
_module("rt"); _module("rt");
...@@ -617,12 +612,6 @@ sub ebuild # args: pass flavour ...@@ -617,12 +612,6 @@ sub ebuild # args: pass flavour
sub import () sub import ()
{ {
my $flavour = $_[1]; my $flavour = $_[1];
if ( $_[1] eq "motif") {
$flavour = "motif";
}
else {
$flavour = "gtk";
}
my($vmsinc) = $ENV{"pwre_vmsinc"}; my($vmsinc) = $ENV{"pwre_vmsinc"};
if ( $vmsinc ne "" ) { if ( $vmsinc ne "" ) {
...@@ -840,7 +829,7 @@ sub method_build () ...@@ -840,7 +829,7 @@ sub method_build ()
my $flavour; my $flavour;
my $program; my $program;
if ( $_[0] eq "motif" || $_[0] eq "gtk") { if ( $_[0] eq "motif" || $_[0] eq "gtk" || $_[0] eq "qt" ) {
$flavour = $_[0]; $flavour = $_[0];
} }
else { else {
...@@ -865,7 +854,7 @@ sub method_build () ...@@ -865,7 +854,7 @@ sub method_build ()
merge(); merge();
} }
if ( $flavour eq "") { if ( $flavour eq "") {
$flavour = "gtk"; $flavour = "qt";
} }
if ( $_[0] eq "wb" ) { if ( $_[0] eq "wb" ) {
printf("-- Method build %s %s\n", $program, $flavour); printf("-- Method build %s %s\n", $program, $flavour);
...@@ -966,9 +955,10 @@ sub build_module () ...@@ -966,9 +955,10 @@ sub build_module ()
} }
if ( $_[0] eq "motif" || $_[1] eq "motif" || $_[2] eq "motif" || $_[3] eq "motif") { if ( $_[0] eq "motif" || $_[1] eq "motif" || $_[2] eq "motif" || $_[3] eq "motif") {
$flavour = "motif"; $flavour = "motif";
} } elsif ( $_[0] eq "gtk" || $_[1] eq "gtk" || $_[2] eq "gtk" || $_[3] eq "gtk") {
else {
$flavour = "gtk"; $flavour = "gtk";
} else {
$flavour = "qt";
} }
if (!defined($ENV{"pwre_env"})) { if (!defined($ENV{"pwre_env"})) {
...@@ -1186,12 +1176,6 @@ sub copy () ...@@ -1186,12 +1176,6 @@ sub copy ()
system("$cmd"); system("$cmd");
my $flavour = $_[1]; my $flavour = $_[1];
if ( $_[1] eq "motif") {
$flavour = "motif";
}
else {
$flavour = "gtk";
}
my($cmd) = "make -f $bindir/import_files.mk" . " " . $_[0] . "_" . $flavour; my($cmd) = "make -f $bindir/import_files.mk" . " " . $_[0] . "_" . $flavour;
system("$cmd"); system("$cmd");
...@@ -1325,8 +1309,8 @@ sub list () ...@@ -1325,8 +1309,8 @@ sub list ()
print("-- Defined environments:\n"); print("-- Defined environments:\n");
foreach $env (sort keys (%envdb)) { foreach $env (sort keys (%envdb)) {
$varstr = $envdb{$env}; $varstr = $envdb{$env};
($sroot, $vmsinc, $broot, $btype, $os, $hw, $desc) = split(/:/, $varstr); ($sroot, $vmsinc, $broot, $btype, $os, $hw, $flavour, $desc) = split(/:/, $varstr);
@vars = ($sroot, $vmsinc, $broot, $btype, $os, $hw, $desc); @vars = ($sroot, $vmsinc, $broot, $btype, $os, $hw, $flavour, $desc);
printf(" %s %s\n", $env, $desc); printf(" %s %s\n", $env, $desc);
} }
print("--\n"); print("--\n");
...@@ -1675,12 +1659,17 @@ sub get_vars () ...@@ -1675,12 +1659,17 @@ sub get_vars ()
$hw = $_[6]; $hw = $_[6];
} }
if ($_[7] eq "") { if ($_[7] eq "") {
$gui = get_var(" Graphical User Interface [%s]? ", $gui);
} else {
$gui = $_[7];
}
if ($_[8] eq "") {
$desc = get_var(" Description [%s]? ", $desc); $desc = get_var(" Description [%s]? ", $desc);
} else { } else {
$desc = $_[7]; $desc = $_[8];
} }
$varstr = join(";", ($sroot, $vmsinc, $broot, $btype, $os, $hw, $desc)); $varstr = join(";", ($sroot, $vmsinc, $broot, $btype, $os, $hw, $gui, $desc));
} }
...@@ -1701,8 +1690,8 @@ sub get_var() ...@@ -1701,8 +1690,8 @@ sub get_var()
sub read_vars () sub read_vars ()
{ {
$varstr = $envdb{$label}; $varstr = $envdb{$label};
($sroot, $vmsinc, $broot, $btype, $os, $hw, $desc) = split(/;/, $varstr); ($sroot, $vmsinc, $broot, $btype, $os, $hw, $gui, $desc) = split(/;/, $varstr);
@vars = ($sroot, $vmsinc, $broot, $btype, $os, $hw, $desc); @vars = ($sroot, $vmsinc, $broot, $btype, $os, $hw, $gui, $desc);
} }
...@@ -1720,6 +1709,7 @@ sub show_vars () ...@@ -1720,6 +1709,7 @@ sub show_vars ()
printf("-- Build type.....: %s\n", $btype); printf("-- Build type.....: %s\n", $btype);
printf("-- OS.............: %s\n", $os); printf("-- OS.............: %s\n", $os);
printf("-- Hardware.......: %s\n", $hw); printf("-- Hardware.......: %s\n", $hw);
printf("-- Graphical user interface.......: %s\n", $gui);
printf("-- Description....: %s\n", $desc); printf("-- Description....: %s\n", $desc);
} }
......
...@@ -159,6 +159,8 @@ pwre_config_check_lib() ...@@ -159,6 +159,8 @@ pwre_config_check_lib()
conf_libgtk=$conf_libgtk" -l${lib%.*}" conf_libgtk=$conf_libgtk" -l${lib%.*}"
elif test $4 == "motif"; then elif test $4 == "motif"; then
conf_libmotif=$conf_libmotif" -l${lib%.*}" conf_libmotif=$conf_libmotif" -l${lib%.*}"
elif test $4 == "qt"; then
conf_libqt=$conf_libqt" -l${lib%.*}"
elif test $4 == "wb"; then elif test $4 == "wb"; then
conf_libwb=$conf_libwb" -l${lib%.*}" conf_libwb=$conf_libwb" -l${lib%.*}"
elif test $4 == "mq"; then elif test $4 == "mq"; then
...@@ -184,6 +186,9 @@ pwre_config_check_lib() ...@@ -184,6 +186,9 @@ pwre_config_check_lib()
elif test $3 == "gtk"; then elif test $3 == "gtk"; then
conf_libgtk=$conf_libgtk" \\\`pkg-config --libs gtk+-2.0\\\`" conf_libgtk=$conf_libgtk" \\\`pkg-config --libs gtk+-2.0\\\`"
conf_incdirgtk=$conf_incdirgtk" \\\`pkg-config --cflags gtk+-2.0\\\`" conf_incdirgtk=$conf_incdirgtk" \\\`pkg-config --cflags gtk+-2.0\\\`"
elif test $3 == "qt"; then
conf_libqt=$conf_libqt" \\\`pkg-config --libs QtCore QtGui QtNetwork phonon\\\`"
conf_incdirqt=$conf_incdirqt" \\\`pkg-config --cflags QtCore QtGui QtNetwork phonon\\\`"
elif test $3 == "gst"; then elif test $3 == "gst"; then
conf_libgst=$conf_libgst" \\\`pkg-config --libs gstreamer-interfaces-0.10 gstreamer-0.10\\\`" conf_libgst=$conf_libgst" \\\`pkg-config --libs gstreamer-interfaces-0.10 gstreamer-0.10\\\`"
conf_incdirgst=$conf_incdirgst" \\\`pkg-config --cflags gstreamer-interfaces-0.10 gstreamer-0.10\\\`" conf_incdirgst=$conf_incdirgst" \\\`pkg-config --cflags gstreamer-interfaces-0.10 gstreamer-0.10\\\`"
...@@ -274,11 +279,13 @@ conf_libwb="" ...@@ -274,11 +279,13 @@ conf_libwb=""
conf_libmq="" conf_libmq=""
conf_libwmq="" conf_libwmq=""
conf_libpnak="" conf_libpnak=""
conf_libgtk="" conf_libgtk=""
conf_libqt=""
conf_libmotif="" conf_libmotif=""
conf_libgst="" conf_libgst=""
conf_libdir="" conf_libdir=""
conf_incdirgtk="" conf_incdirgtk=""
conf_incdirqt=""
conf_incdirgst="" conf_incdirgst=""
let inc_cnt=0 let inc_cnt=0
let lib_cnt=0 let lib_cnt=0
...@@ -383,8 +390,16 @@ echo "export PWRE_CONF_LOCKDBS=$lockdbs" >> $cfile ...@@ -383,8 +390,16 @@ echo "export PWRE_CONF_LOCKDBS=$lockdbs" >> $cfile
if [ $pwre_hw == "hw_arm" ] && [ $ebuild -eq 1 ]; then if [ $pwre_hw == "hw_arm" ] && [ $ebuild -eq 1 ]; then
echo "Arm ebuild" echo "Arm ebuild"
pwre_config_check_lib gtk GTK gtk gtk 0 "/usr/lib/libgtk-x11-2.0.so:/usr/lib/$hwpl-linux-$gnu/libgtk-x11-2.0.so"
pwre_config_check_include gtk GTK 1 "/usr/local/include/gtk-2.0/gtk.h:/usr/local/include/gtk-2.0/gtk/gtk.h:/usr/include/gtk-2.0/gtk/gtk.h" if [ $pwre_gui == "qt" ]; then
pwre_config_check_include qt QT 1 "/usr/include/qt4/Qt/QtCore"
pwre_config_check_include qt QT 1 "/usr/include/qt4/QtCore/QtCore"
pwre_config_check_include qt QT 1 "/usr/include/qt4/Qt/QtGui"
pwre_config_check_include qt QT 1 "/usr/include/qt4/QtGui/QtGui"
elif [ $pwre_gui == "gtk" ]; then
pwre_config_check_lib gtk GTK gtk gtk 0 "/usr/lib/libgtk-x11-2.0.so:/usr/lib/$hwpl-linux-$gnu/libgtk-x11-2.0.so"
pwre_config_check_include gtk GTK 1 "/usr/local/include/gtk-2.0/gtk.h:/usr/local/include/gtk-2.0/gtk/gtk.h:/usr/include/gtk-2.0/gtk/gtk.h"
fi
pwre_config_check_include jni JNI 1 $jdk/include/jni.h pwre_config_check_include jni JNI 1 $jdk/include/jni.h
pwre_config_check_include jni JNI 0 $jdk/include/linux/jni_md.h pwre_config_check_include jni JNI 0 $jdk/include/linux/jni_md.h
...@@ -412,9 +427,11 @@ if [ $pwre_hw == "hw_arm" ] && [ $ebuild -eq 1 ]; then ...@@ -412,9 +427,11 @@ if [ $pwre_hw == "hw_arm" ] && [ $ebuild -eq 1 ]; then
echo "export pwre_conf_libpwrprofibus=\"-lpwr_pnak_dummy\"" >> $cfile echo "export pwre_conf_libpwrprofibus=\"-lpwr_pnak_dummy\"" >> $cfile
echo "export pwre_conf_libpwrxtt=\"-lpwr_xtt -lpwr_ge -lpwr_cow -lpwr_flow -lpwr_glow\"" >> $cfile echo "export pwre_conf_libpwrxtt=\"-lpwr_xtt -lpwr_ge -lpwr_cow -lpwr_flow -lpwr_glow\"" >> $cfile
echo "export pwre_conf_libpwrxttgtk=\" -lpwr_xtt_gtk -lpwr_ge_gtk -lpwr_cow_gtk -lpwr_flow_gtk -lpwr_glow_gtk\"" >> $cfile echo "export pwre_conf_libpwrxttgtk=\" -lpwr_xtt_gtk -lpwr_ge_gtk -lpwr_cow_gtk -lpwr_flow_gtk -lpwr_glow_gtk\"" >> $cfile
echo "export pwre_conf_libpwrxttqt=\" -lpwr_xtt_qt -lpwr_ge_qt -lpwr_cow_qt -lpwr_flow_qt -lpwr_glow_qt\"" >> $cfile
echo "export pwre_conf_libpwrxttmotif=\" -lpwr_xtt_motif -lpwr_ge_motif -lpwr_cow_motif -lpwr_flow_motif -lpwr_glow_motif\"" >> $cfile echo "export pwre_conf_libpwrxttmotif=\" -lpwr_xtt_motif -lpwr_ge_motif -lpwr_cow_motif -lpwr_flow_motif -lpwr_glow_motif\"" >> $cfile
echo "export pwre_conf_libpwrwb=\"-lpwr_wb\"" >> $cfile echo "export pwre_conf_libpwrwb=\"-lpwr_wb\"" >> $cfile
echo "export pwre_conf_libpwrwbgtk=\"-lpwr_wb_gtk\"" >> $cfile echo "export pwre_conf_libpwrwbgtk=\"-lpwr_wb_gtk\"" >> $cfile
echo "export pwre_conf_libpwrwbqt=\"-lpwr_wb_qt\"" >> $cfile
echo "export pwre_conf_libpwrwbmotif=\"-lpwr_wb_motif\"" >> $cfile echo "export pwre_conf_libpwrwbmotif=\"-lpwr_wb_motif\"" >> $cfile
echo "export pwre_conf_libpwropc=\"-lpwr_opc\"" >> $cfile echo "export pwre_conf_libpwropc=\"-lpwr_opc\"" >> $cfile
echo "export pwre_conf_libpwrremote=\"-lpwr_remote\"" >> $cfile echo "export pwre_conf_libpwrremote=\"-lpwr_remote\"" >> $cfile
...@@ -427,11 +444,13 @@ if [ $pwre_hw == "hw_arm" ] && [ $ebuild -eq 1 ]; then ...@@ -427,11 +444,13 @@ if [ $pwre_hw == "hw_arm" ] && [ $ebuild -eq 1 ]; then
echo "export pwre_conf_libwmq=\"$conf_libwmq\"" >> $cfile echo "export pwre_conf_libwmq=\"$conf_libwmq\"" >> $cfile
echo "export pwre_conf_libpnak=\"$conf_libpnak\"" >> $cfile echo "export pwre_conf_libpnak=\"$conf_libpnak\"" >> $cfile
echo "export pwre_conf_libgtk=\"$conf_libgtk\"" >> $cfile echo "export pwre_conf_libgtk=\"$conf_libgtk\"" >> $cfile
echo "export pwre_conf_libqt=\"$conf_libqt\"" >> $cfile
echo "export pwre_conf_libmotif=\"$conf_libmotif\"" >> $cfile echo "export pwre_conf_libmotif=\"$conf_libmotif\"" >> $cfile
echo "export pwre_conf_libgst=\"$conf_libgtk\"" >> $cfile echo "export pwre_conf_libgst=\"$conf_libgtk\"" >> $cfile
echo "export pwre_conf_libdir=\"$conf_libdir\"" >> $cfile echo "export pwre_conf_libdir=\"$conf_libdir\"" >> $cfile
echo "export pwre_conf_incdir=\"$conf_incdir\"" >> $cfile echo "export pwre_conf_incdir=\"$conf_incdir\"" >> $cfile
echo "export pwre_conf_incdirgtk=\"$conf_incdirgtk\"" >> $cfile echo "export pwre_conf_incdirgtk=\"$conf_incdirgtk\"" >> $cfile
echo "export pwre_conf_incdirqt=\"$conf_incdirqt\"" >> $cfile
echo "export pwre_conf_dtt_platform=\"arm_linux\"" >> $cfile echo "export pwre_conf_dtt_platform=\"arm_linux\"" >> $cfile
else else
...@@ -443,7 +462,12 @@ else ...@@ -443,7 +462,12 @@ else
#Gtk #Gtk
echo "Mandatory :" echo "Mandatory :"
pwre_config_check_lib gtk GTK gtk gtk 0 "/usr/lib/libgtk-x11-2.0.so:/usr/lib/$hwpl-linux-$gnu/libgtk-x11-2.0.so" echo "$pwre_gui"
if [ $pwre_gui == "qt" ]; then
pwre_config_check_lib qt QT qt qt 0 "/usr/lib/$hwpl-linux-$gnu/libQtGui.so"
elif [ $pwre_gui == "gtk" ]; then
pwre_config_check_lib gtk GTK gtk gtk 0 "/usr/lib/libgtk-x11-2.0.so:/usr/lib/$hwpl-linux-$gnu/libgtk-x11-2.0.so"
fi
pwre_config_check_lib librpcsvc LIBRPCSVC lib lib 0 "/usr/lib/librpcsvc.so:/usr/lib/librpcsvc.a:/usr/lib/$hwpl-linux-$gnu/librpcsvc.a" pwre_config_check_lib librpcsvc LIBRPCSVC lib lib 0 "/usr/lib/librpcsvc.so:/usr/lib/librpcsvc.a:/usr/lib/$hwpl-linux-$gnu/librpcsvc.a"
pwre_config_check_lib libasound LIBASOUND lib lib 0 "/usr/lib/libasound.so:/usr/lib/libasound.a:/usr/lib/$hwpl-linux-$gnu/libasound.so" pwre_config_check_lib libasound LIBASOUND lib lib 0 "/usr/lib/libasound.so:/usr/lib/libasound.a:/usr/lib/$hwpl-linux-$gnu/libasound.so"
...@@ -457,7 +481,15 @@ else ...@@ -457,7 +481,15 @@ else
pwre_config_check_lib libfl LIBFL lib lib 0 "/usr/lib/libfl.so:/usr/lib/libfl.a:/usr/lib/$hwpl-linux-$gnu/libfl.so" pwre_config_check_lib libfl LIBFL lib lib 0 "/usr/lib/libfl.so:/usr/lib/libfl.a:/usr/lib/$hwpl-linux-$gnu/libfl.so"
pwre_config_check_lib libX11 LIBX11 lib lib 0 "/usr/lib/libX11.so:/usr/lib/$hwpl-linux-$gnu/libX11.so" pwre_config_check_lib libX11 LIBX11 lib lib 0 "/usr/lib/libX11.so:/usr/lib/$hwpl-linux-$gnu/libX11.so"
pwre_config_check_include gtk GTK 1 "/usr/local/include/gtk-2.0/gtk.h:/usr/local/include/gtk-2.0/gtk/gtk.h:/usr/include/gtk-2.0/gtk/gtk.h" if [ $pwre_gui == "qt" ]; then
pwre_config_check_include qt QT 1 "/usr/include/qt4/Qt/QtCore"
pwre_config_check_include qt QT 1 "/usr/include/qt4/QtCore/QtCore"
pwre_config_check_include qt QT 1 "/usr/include/qt4/Qt/QtGui"
pwre_config_check_include qt QT 1 "/usr/include/qt4/QtGui/QtGui"
elif [ $pwre_gui == "gtk" ]; then
pwre_config_check_include gtk GTK 1 "/usr/local/include/gtk-2.0/gtk.h:/usr/local/include/gtk-2.0/gtk/gtk.h:/usr/include/gtk-2.0/gtk/gtk.h"
fi
pwre_config_check_include alsa ALSA 1 "/usr/include/alsa/asoundlib.h" pwre_config_check_include alsa ALSA 1 "/usr/include/alsa/asoundlib.h"
echo "" echo ""
...@@ -521,9 +553,11 @@ else ...@@ -521,9 +553,11 @@ else
echo "export pwre_conf_libpwrpowerlinkcn=\"$conf_libpowerlinkcn\"" >> $cfile echo "export pwre_conf_libpwrpowerlinkcn=\"$conf_libpowerlinkcn\"" >> $cfile
echo "export pwre_conf_libpwrxtt=\"-lpwr_xtt -lpwr_ge -lpwr_cow -lpwr_flow -lpwr_glow\"" >> $cfile echo "export pwre_conf_libpwrxtt=\"-lpwr_xtt -lpwr_ge -lpwr_cow -lpwr_flow -lpwr_glow\"" >> $cfile
echo "export pwre_conf_libpwrxttgtk=\" -lpwr_xtt_gtk -lpwr_ge_gtk -lpwr_cow_gtk -lpwr_flow_gtk -lpwr_glow_gtk\"" >> $cfile echo "export pwre_conf_libpwrxttgtk=\" -lpwr_xtt_gtk -lpwr_ge_gtk -lpwr_cow_gtk -lpwr_flow_gtk -lpwr_glow_gtk\"" >> $cfile
echo "export pwre_conf_libpwrxttqt=\" -lpwr_xtt_qt -lpwr_ge_qt -lpwr_cow_qt -lpwr_flow_qt -lpwr_glow_qt\"" >> $cfile
echo "export pwre_conf_libpwrxttmotif=\" -lpwr_xtt_motif -lpwr_ge_motif -lpwr_cow_motif -lpwr_flow_motif -lpwr_glow_motif\"" >> $cfile echo "export pwre_conf_libpwrxttmotif=\" -lpwr_xtt_motif -lpwr_ge_motif -lpwr_cow_motif -lpwr_flow_motif -lpwr_glow_motif\"" >> $cfile
echo "export pwre_conf_libpwrwb=\"-lpwr_wb\"" >> $cfile echo "export pwre_conf_libpwrwb=\"-lpwr_wb\"" >> $cfile
echo "export pwre_conf_libpwrwbgtk=\"-lpwr_wb_gtk\"" >> $cfile echo "export pwre_conf_libpwrwbgtk=\"-lpwr_wb_gtk\"" >> $cfile
echo "export pwre_conf_libpwrwbqt=\"-lpwr_wb_qt\"" >> $cfile
echo "export pwre_conf_libpwrwbmotif=\"-lpwr_wb_motif\"" >> $cfile echo "export pwre_conf_libpwrwbmotif=\"-lpwr_wb_motif\"" >> $cfile
echo "export pwre_conf_libpwropc=\"-lpwr_opc\"" >> $cfile echo "export pwre_conf_libpwropc=\"-lpwr_opc\"" >> $cfile
echo "export pwre_conf_libpwrremote=\"-lpwr_remote\"" >> $cfile echo "export pwre_conf_libpwrremote=\"-lpwr_remote\"" >> $cfile
...@@ -536,11 +570,13 @@ else ...@@ -536,11 +570,13 @@ else
echo "export pwre_conf_libwmq=\"$conf_libwmq\"" >> $cfile echo "export pwre_conf_libwmq=\"$conf_libwmq\"" >> $cfile
echo "export pwre_conf_libpnak=\"$conf_libpnak\"" >> $cfile echo "export pwre_conf_libpnak=\"$conf_libpnak\"" >> $cfile
echo "export pwre_conf_libgtk=\"$conf_libgtk\"" >> $cfile echo "export pwre_conf_libgtk=\"$conf_libgtk\"" >> $cfile
echo "export pwre_conf_libqt=\"$conf_libqt\"" >> $cfile
echo "export pwre_conf_libgst=\"$conf_libgst\"" >> $cfile echo "export pwre_conf_libgst=\"$conf_libgst\"" >> $cfile
echo "export pwre_conf_libmotif=\"$conf_libmotif\"" >> $cfile echo "export pwre_conf_libmotif=\"$conf_libmotif\"" >> $cfile
echo "export pwre_conf_libdir=\"$conf_libdir\"" >> $cfile echo "export pwre_conf_libdir=\"$conf_libdir\"" >> $cfile
echo "export pwre_conf_incdir=\"$conf_incdir\"" >> $cfile echo "export pwre_conf_incdir=\"$conf_incdir\"" >> $cfile
echo "export pwre_conf_incdirgtk=\"$conf_incdirgtk\"" >> $cfile echo "export pwre_conf_incdirgtk=\"$conf_incdirgtk\"" >> $cfile
echo "export pwre_conf_incdirqt=\"$conf_incdirqt\"" >> $cfile
echo "export pwre_conf_incdirgst=\"$conf_incdirgst\"" >> $cfile echo "export pwre_conf_incdirgst=\"$conf_incdirgst\"" >> $cfile
fi fi
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
# $pwre_bmodule Module name in build tree, eg. 'ssabox' # $pwre_bmodule Module name in build tree, eg. 'ssabox'
# $pwre_os Operating system, eg. 'os_linux' # $pwre_os Operating system, eg. 'os_linux'
# $pwre_hw Hardware, eg. 'hw_x86' # $pwre_hw Hardware, eg. 'hw_x86'
# $pwre_gui Graphical User Interface, eg. 'qt', 'gtk' or 'motif'
# $pwr_exe Exe directory for module build root, eg. ssabox/exe # $pwr_exe Exe directory for module build root, eg. ssabox/exe
# $pwr_load Load directory for module build root # $pwr_load Load directory for module build root
# $pwr_inc Inc directory for module build root # $pwr_inc Inc directory for module build root
...@@ -68,6 +69,7 @@ set_env() ...@@ -68,6 +69,7 @@ set_env()
export pwre_btype="$4" export pwre_btype="$4"
export pwre_os="os_$5" export pwre_os="os_$5"
export pwre_hw="hw_$6" export pwre_hw="hw_$6"
export pwre_gui="$7"
export pwre_target="$pwre_os/$pwre_hw" export pwre_target="$pwre_os/$pwre_hw"
export pwre_bin="$pwre_kroot/tools/pwre/src/$pwre_os" export pwre_bin="$pwre_kroot/tools/pwre/src/$pwre_os"
...@@ -161,6 +163,12 @@ set_env() ...@@ -161,6 +163,12 @@ set_env()
else else
export pwre_conf_gtk=0 export pwre_conf_gtk=0
fi fi
# Qt
if [ -e /usr/lib/x86_64-linux-gnu/libQtGui.so ]; then
export pwre_conf_qt=1
else
export pwre_conf_qt=0
fi
# libusb # libusb
if [ -e /usr/lib/libusb-1.0.so ]; then if [ -e /usr/lib/libusb-1.0.so ]; then
......
...@@ -77,7 +77,7 @@ else ...@@ -77,7 +77,7 @@ else
for lib in $libraries; do for lib in $libraries; do
arname=${lib##/*/} arname=${lib##/*/}
if [ $arname = "libpwr_rt.a" ] || [ $arname = "libpwr_cow.a" ] || [ $arname = "libpwr_cow_motif.a" ] || [ $arname = "libpwr_cow_gtk.a" ] || [ $arname = "libpwr_wb.a" ] || [ $arname = "libpwr_wb_motif.a" ] || [ $arname = "libpwr_wb_gtk.a" ] || [ $arname = "libpwr_xtt.a" ] || [ $arname = "libpwr_xtt_motif.a" ] || [ $arname = "libpwr_xtt_gtk.a" ]; then if [ $arname = "libpwr_rt.a" ] || [ $arname = "libpwr_cow.a" ] || [ $arname = "libpwr_cow_motif.a" ] || [ $arname = "libpwr_cow_gtk.a" ] || [ $arname = "libpwr_cow_qt.a" ] || [ $arname = "libpwr_wb.a" ] || [ $arname = "libpwr_wb_motif.a" ] || [ $arname = "libpwr_wb_gtk.a" ] || [ $arname = "libpwr_wb_qt.a" ] || [ $arname = "libpwr_xtt.a" ] || [ $arname = "libpwr_xtt_motif.a" ] || [ $arname = "libpwr_xtt_gtk.a" ] || [ $arname = "libpwr_xtt_qt.a" ]; then
if [ $ver -eq 1 ]; then if [ $ver -eq 1 ]; then
echo "Merge $lib" echo "Merge $lib"
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment