[Xapian-discuss] Re: Makefile for xapian-core-1.0.0/examples

Kevin Duraj kevin.softdev at gmail.com
Wed Jun 6 02:19:51 BST 2007


sorry for the messy code, I did not see anywhere Makefile for examples
only so I had to quickly hack Xapian to compile examples that should
work from any directory ... now someone else can write nice stand
alone Makefile for Xapian examples ... :-)

#!/bin/sh
#--- create mkdir .deps if does not exist ---
clear;
#----------------------------------------------------------------------------------#
SOURCE="simplesearch"
SOURCE_EXT="cc"
EXECUTABLE="search.cgi"
xapian_core="/usr/local/xapian-core-1.0.0_svn8799"
depbase=".deps/$SOURCE"
#----------------------------------------------------------------------------------#
  if g++ -DHAVE_CONFIG_H -I. -I$xapian_core -I$xapian_core/common \
          -I$xapian_core/include -Wall -W -Wredundant-decls -Wpointer-arith \
          -Wcast-qual -Wcast-align -Wno-multichar -Wno-long-long \
          -fno-gnu-keywords -Wundef -Wshadow -g -O2 -MT \
          $SOURCE.o -MD -MP -MF "$depbase.Tpo" -c -o $SOURCE.o
$SOURCE.$SOURCE_EXT; \
  then mv -f "$depbase.Tpo" "$depbase.Po";
  else rm -f "$depbase.Tpo"; exit 1;
  fi
#----------------------------------------------------------------------------------#
	/bin/sh $xapian_core/libtool  --tag=CXX --mode=link g++ -Wall -W \
	   -Wredundant-decls -Wpointer-arith -Wcast-qual -Wcast-align \
	   -Wno-multichar -Wno-long-long -fno-gnu-keywords -Wundef \
	   -Wshadow -g -O2   -o $EXECUTABLE  $SOURCE.o  $xapian_core/libxapian.la
	g++ -Wall -W -Wredundant-decls -Wpointer-arith -Wcast-qual \
	   -Wcast-align -Wno-multichar -Wno-long-long -fno-gnu-keywords \
	   -Wundef -Wshadow -g -O2 -o .libs/$EXECUTABLE $SOURCE.o  \
	   $xapian_core/.libs/libxapian.so \
	   -lz /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/libstdc++.so \
	   -L/usr/x86_64-pc-linux-gnu/bin -L/usr/x86_64-pc-linux-gnu/lib \
	   -L/usr/lib/gcc/x86_64-pc-linux-gnu/../../../x86_64-pc-linux-gnu/lib \
	   -L/usr/lib/gcc/x86_64-pc-linux-gnu/../../../lib64
#----------------------------------------------------------------------------------#



On 6/5/07, Kevin Duraj <kevin.softdev at gmail.com> wrote:
> Do we have stand alone makefile for xapian-core-1.0.0/examples ?
>
> Thanks,
> -Kevin
>



More information about the Xapian-discuss mailing list