# # Main Makefile for Thot/Amaya source tree # Generated from Makefile.in # Daniel Veillard, 1997 # @VPATHOPT@= @srcdir@ THOTDIR = @top_srcdir@ THOTINCLUDES = @THOTINCLUDES@ LIBZ = @LIBZ@ include Options LIBWWW = libwww LIBRAPTOR = libraptor REDLAND = redland LIBJPEG = libjpeg LIBPNG = libpng #MKP: adding davlib SUBDIRS = @SUBDIRS@ tools thotlib batch drawlib indexlib annotlib amaya thot @DAVDIR@ EXTRA_SUBDIRS= misc pluginlib $(LIBRAPTOR) $(REDLAND) $(LIBWWW) prefix = @prefix@ exec_prefix = @exec_prefix@ libdir = @libdir@ bindir = @bindir@ srcdir = $(THOTDIR) default : tools thotlib batch amaya_prog @PRINTIFNOTGL@ amaya : amaya_prog tools thotlib @PRINTIFNOTGL@ @NOPRINT@print : tools thotlib print_prog Options: @CP@ Options.orig Options force : batch: rebuild force @(if test -d batch ; then cd batch ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" ; fi) tools: rebuild force @(if test -d tools ; then cd tools ; \ $(MAKE) CC="$(CC)" CFLAGS="-O -x c" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" all ; fi) thotlib: rebuild force @(if test -d thotlib ; then cd thotlib ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" all ; fi) amaya_prog: rebuild force bin/str @(if test -d amaya ; then cd amaya ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" amaya ; fi) @NOPRINT@print_prog: rebuild force bin/str @NOPRINT@ @(if test -d thotlib ; then cd thotlib ; \ @NOPRINT@ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" print ; fi) misc: rebuild force @(if test -d misc ; then cd misc ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" all ; fi) all : rebuild @(for dir in $(SUBDIRS) ;\ do if test -d $$dir ; then cd $$dir ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" all ; \ cd .. ; fi ;done ) clean : rebuild $(RM) libpng.a libz.a libjpeg.a @(for dir in $(SUBDIRS) $(EXTRA_SUBDIRS) ;\ do if test -d $$dir ; then cd $$dir ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" clean ; \ cd .. ; fi ;done ) reallyclean : clean $(RM) config.cache config.h config.log config.status tempclean : find ../ -name '.#*' -print0 | xargs -0r rm -f find ../ -name \*~ -exec rm {} \; find ../ \( -name '*~' -o -name '#*#' \) -print0 | xargs --no-run-if-empty --null rm -vf install : rebuild @(for dir in $(SUBDIRS) ;\ do if test -d $$dir ; then cd $$dir ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" install ; \ cd .. ; fi ;done ) uninstall : @(for dir in $(SUBDIRS) ;\ do if test -d $$dir ; then cd $$dir ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" uninstall ; \ cd .. ; fi ;done ) update : @(cd $(THOTDIR) ; cvs update -dP) @(if [ -d $(THOTDIR)/../$(LIBWWW) ] ; then \ cd $(THOTDIR)/../$(LIBWWW) ; cvs update -dP; fi) commit : @(cd $(THOTDIR) ; cvs commit) stubs: @(cd javalib ; $(MAKE) stubs) classes: force @(PWD=`pwd` ; PATH="$$PWD/bin:$$PATH" ; export PATH ; \ if test -d $$PWD/$(THOTDIR) ; then CLASSES=$$PWD/$(THOTDIR)/classes;\ else CLASSES=$(THOTDIR)/classes ; fi ; \ CLASSPATH=".:$$CLASSES:$$CLASSES/classes.zip:$$CLASSES/thotlib.zip:$$CLASSES/jigsaw.zip:$$CLASSES/amaya.zip:$$CLASSES/biss.zip";export CLASSPATH;\ cd $(THOTDIR)/classes ; $(MAKE) ) zips: force @(cd javalib ; $(MAKE) zips); # @(PWD=`pwd` ; PATH="$$PWD/bin:$$PATH" ; export PATH ; \ # if test -d $$PWD/$(THOTDIR) ; then CLASSES=$$PWD/$(THOTDIR)/classes;\ # else CLASSES=$(THOTDIR)/classes ; fi ; \ # CLASSPATH=".:$$CLASSES:$$CLASSES/classes.zip:$$CLASSES/thotlib.zip:\ # $$CLASSES/jigsaw.zip:$$CLASSES/amaya.zip:$$CLASSES/biss.zip";export CLASSPATH;\ # cd $(THOTDIR)/classes ; $(MAKE) zips) tools/mkdep/mkdep : @(cd tools/mkdep ; $(MAKE) CC="$(CC)" CFLAGS="-O -x c" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" mkdep) depend depends : rebuild tools/mkdep/mkdep @(for dir in $(SUBDIRS) ;\ do if test -d $$dir ; then cd $$dir ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" depend ; \ cd .. ; fi ;done ) bin/cextract : @(cd tools/cextract-$(CEXTRACT_VER) ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" cextract) proto : rebuild bin/cextract @(for dir in $(SUBDIRS) ;\ do if test -d $$dir ; then cd $$dir ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" proto ; \ cd .. ; fi ;done ) mkid : @(echo rebuilding $(THOTDIR)/ID reference file) @(cd $(THOTDIR); mkid --lang-map=makes/id-lang.map . classes/org/w3c/*) # # Rule du rebuild the Thot schemas # bin/str : force @(cd batch ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" str prs tra printstr) schemas : rebuild bin/str @(bindir=`pwd`/bin ; cd $(THOTDIR)/schemas ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" THOTDIR=".." THOTSCH="../schemas:../schemasOPERA" \ COMPSCH="." COMPSTR="$$bindir/str" COMPPRS="$$bindir/prs" \ COMPTRA="$$bindir/tra" PRINTSTR="$$bindir/printstr" all) # # Rules to rebuild the libWWW package # # MKP: adding libwwwdav AMAYA_LIBWWW_STANDARD_LIBS = \ libwwwapp \ libwwwhttp \ libwwwhtml \ libwwwmime \ libwwwcache \ libwwwstream \ libwwwfile \ libwwwdir \ libwwwtrans \ libwwwcore \ libwwwutils \ libwwwftp \ @MAKE_LIBWWW_RDF_PARSER@ \ libwwwzip \ @LIBDAV@ libwww_config : @(if [ ! -d $(THOTDIR)/../$(LIBWWW) ] ; then \ $(ECHO) "Error libwww dir not found at $(THOTDIR)/../$(LIBWWW)" ; \ fi) @(if [ ! -d $(LIBWWW) ] ; then \ $(MKDIR) $(LIBWWW) ; \ fi) #MKP: adding --with-dav @(localdir=`pwd` ; libwwwdir="$$localdir/../../$(LIBWWW)" ; \ cd $(LIBWWW) ; unset LANG; \ if [ ! -f Makefile -o ! -f wwwconf.h ] ; then \ $$libwwwdir/configure \ --disable-shared \ @WITHDAV@ \ --with-zlib; \ $(ECHO) "libwww is configured" ; \ $(ECHO) "patching wwwconf.h because appkit.h do not compile on macos, and it seems that appkit.h is not used in amaya" ; \ $(CP) wwwconf.h wwwconf.h.orig ; \ $(SED) "s/\(\#define HAVE_APPKIT_APPKIT_H 1\)/\/* \1 *\//" \ wwwconf.h.orig > wwwconf.h ; \ $(ECHO) "wwwconf.h patched !" ; \ fi) libwww_make_module_md5 \ libmd5 : force @(localdir=`pwd`; \ cd $(LIBWWW)/modules/md5 ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS) $(EXPAT_OPTIONS)" \ CPPFLAGS="$(CPPFLAGS) $(THOTINCLUDES) $(EXTRA_INCLUDES)" \ libmd5.la) libwww_install_module_md5 : force @(if [ -e libmd5.a -a ! -L libmd5.a ] ; then \ $(RM) libmd5.a ; \ fi ; \ if [ ! -L libmd5.a ] ; then \ $(LN_S) $(LIBWWW)/modules/md5/.libs/libmd5.a ./libmd5.a ; \ fi) libwww_make_module_expat \ libexpat : force @(localdir=`pwd`; \ cd $(LIBWWW)/modules/expat/ ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS) $(EXPAT_OPTIONS) -DXML_AMAYA" \ CPPFLAGS="$(CPPFLAGS)" \ ) libwww_install_module_expat : force @(if [ -e libexpat.a -a ! -L libexpat.a ] ; then \ $(RM) libexpat.a ; \ fi ; \ if [ ! -L libexpat.a ] ; then \ $(LN_S) $(LIBWWW)/modules/expat/.libs/libexpat.a ./libexpat.a ; \ fi) libwww_make_standard_libs \ $(AMAYA_LIBWWW_STANDARD_LIBS) : force @(localdir=`pwd`; \ all_libs="" ; \ for lib in $(AMAYA_LIBWWW_STANDARD_LIBS) ; do \ all_libs="$$all_libs $$lib.la" ; \ done ; \ cd $(LIBWWW)/Library/src ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS) $(EXPAT_OPTIONS)" \ CPPFLAGS="$(CPPFLAGS) $(THOTINCLUDES) $(EXTRA_INCLUDES)" \ $$all_libs) libwww_install_standard : force @(for lib in $(AMAYA_LIBWWW_STANDARD_LIBS) ; do \ if [ -e $$lib.a -a ! -L $$lib.a ] ; then \ $(RM) $$lib.a ; \ fi ; \ if [ ! -L $$lib.a ] ; then \ $(LN_S) $(LIBWWW)/Library/src/.libs/$$lib.a ./$$lib.a ; \ fi ; \ done) libwww_make_module_libs : libwww_make_module_md5 libwww_make_module_expat libwww_make : libwww_make_module_libs libwww_make_standard_libs libwww_install_modules : libwww_install_module_md5 libwww_install_module_expat libwww_install : libwww_install_modules libwww_install_standard libwww : libwww_config libwww_make @($(ECHO) "libwww is installed") # # Rules to build the raptor RDF package # libraptor_config: @MAKERAPTOR@ force @(if [ ! -e "$(THOTDIR)/$(LIBRAPTOR)" ] ; then \ $(ECHO) "Error raptor dir not found at $(THOTDIR)/$(LIBRAPTOR)" ; \ fi) @(if [ ! -e "$(THOTDIR)/$(LIBRAPTOR)/expat" ] ; then \ libwwwdir="$(THOTDIR)/../$(LIBWWW)" ; \ echo $$libwwwdir ; \ $(LN_S) "$$libwwwdir/modules/expat" "$(THOTDIR)/$(LIBRAPTOR)/expat" ; \ fi) @(if [ ! -d "$(LIBRAPTOR)" ] ; then \ $(MKDIR) $(LIBRAPTOR) ; \ fi) @(localdir=`pwd` ; raptordir="$$localdir/../$(LIBRAPTOR)" ; \ cd $(LIBRAPTOR) ; unset LANG; \ if [ ! -f Makefile -o ! -f config.h ] ; then \ CFLAGS="-I$$raptordir/expat/lib" \ $$raptordir/configure \ --without-shared \ --with-expat ; \ $(ECHO) "patching libraptor/libtool because -flat_namespace option is missing and do not compile on macosx" ; \ $(CP) libtool libtool.orig ; \ $(SED) "s/\(allow_undefined_flag=\"-undefined suppress\)/\1 -flat_namespace/" \ libtool.orig > libtool ; \ $(ECHO) "libraptor/libtool patched !" ; \ $(ECHO) "libraptor is configured" ; \ fi) libraptor_make: @MAKERAPTOR@ force @(localdir=`pwd`; \ cd $(LIBRAPTOR) ; \ if [ ! -e .libs/libraptor.a -a -e libraptor.la ] ; then \ $(RM) libraptor.la ; \ fi ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS) -I$$localdir/../$(LIBRAPTOR)/expat/lib " \ CPPFLAGS="$(CPPFLAGS)" \ ) libraptor: @MAKERAPTOR@ libraptor_config libraptor_make @($(ECHO) "libraptor is installed") # # Rules to build the redland RDF library # # Previous rule used to link and compile expat inside redland... to be removed # after checking all is ok in all the platforms # we're using the expat from inside libwww # @(if test ! -e "$(THOTDIR)/../$(REDLAND)/expat" ; then \ # libwwwdir="$(THOTDIR)/../$(LIBWWW)" ; \ # echo $$libwwwdir ; \ # $(LN_S) "$$libwwwdir/modules/expat" "$(THOTDIR)/../$(REDLAND)/expat" ; \ # fi) # Because redland 0.9.14 forces the check on a glib-2.0 function, we remove the # results of the configure to force its non use. redland_config: @MAKEREDLAND@ force @(if test ! -e "$(THOTDIR)/../$(REDLAND)" ; then \ $(ECHO) "Error redland dir not found at $(THOTDIR)/$(REDLAND)" ; \ fi) @(if test ! -d "$(REDLAND)" ; then \ $(MKDIR) $(REDLAND) ; \ fi) @(localdir=`pwd` ; redlanddir="$$localdir/../../$(REDLAND)" ; \ cd $(REDLAND) ; unset LANG; \ if test ! -f Makefile -o ! -f redland-src-config ; then \ CPPFLAGS="-I$$localdir/../../$(LIBWWW)/modules/expat/lib" \ LDFLAGS="-L$$localdir/libwww/modules/expat -L$$localdir/libwww/modules/expat/.libs" \ $$redlanddir/configure \ --disable-shared \ --without-bdb \ --enable-parsers=raptor \ --with-xml-parser=expat \ --with-www=none \ --without-libwww \ --without-openssl-digests \ --without-mysql \ --cache-file=$$localdir/config.cache; \ $(ECHO) "redland is configured" ; \ cd raptor ; \ if [ ! -e raptor_config.h.org ] ; then \ $(ECHO) "Patching the raptor_config.h file to avoid including glib2-0" ; \ $(CP) raptor_config.h raptor_config.h.orig ; \ $(SED) "s/\(\#define HAVE_G_UTF8_NORMALIZE 1\)/\/* \1 *\//" \ raptor_config.h.orig > raptor_config.h ; \ $(ECHO) "Raptor is patched" ; \ fi ; \ fi) # the -DLIBRDF_INTERNAL=1 is needed if we're going to pass our own CFLAGS. redland_make: @MAKEREDLAND@ force @(cd $(REDLAND) ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS) -DLIBRDF_INTERNAL=1"; \ ) redland: @MAKEREDLAND@ redland_config redland_make @($(ECHO) "redland is installed") # # Rules to rebuild the libjpeg package # libjpeg libjpeg.a : force @($(RM) $(THOTDIR)/libjpeg/*.o) @(cd libjpeg ; $(MAKE) CC="$(CC)" CFLAGS="-O -x c") # # Rules to rebuild the libpng package # libpng libpng.a : force @($(RM) $(THOTDIR)/libpng/*.o) @(cd libpng ; $(MAKE) CC="$(CC)" CFLAGS="-O -x c") # # Rules to rebuild the libpng package # libz libz.a : force @($(RM) $(THOTDIR)/libpng/libz/*.o) @(cd libpng/zlib ; $(MAKE) CC="$(CC)" CFLAGS="-O -x c") # # This section try to maintain the Makefile(s) up-to-date in # case the autoconf sources are modified. # MAKEFILE_IN= \ @EXTRA_MAKEFILE_IN@ \ $(THOTDIR)/Options.in \ $(THOTDIR)/configure.in \ $(THOTDIR)/Makefile.in \ $(THOTDIR)/amaya/Makefile.in \ $(THOTDIR)/libjpeg/Makefile.in \ $(THOTDIR)/batch/Makefile.in \ $(THOTDIR)/libjpeg/Makefile.in \ $(THOTDIR)/libpng/Makefile.in \ $(THOTDIR)/libpng/zlib/Makefile.in \ $(THOTDIR)/thotlib/Makefile.in \ $(THOTDIR)/thotlib/include/Makefile.in \ $(THOTDIR)/tools/Makefile.in \ $(THOTDIR)/tools/mkdep/Makefile.in \ $(THOTDIR)/tools/cextract-1.7/Makefile.in rebuild : tools/mkdep/mkdep Makefile ${srcdir}/config.h.in: stamp-h.in ${srcdir}/stamp-h.in: configure.in config.h.in cd ${srcdir} && autoheader echo timestamp > ${srcdir}/stamp-h.in stamp.h: config.h.in config.status ./config.status Makefile: $(MAKEFILE_IN) config.status ./config.status config.status: configure ./config.status --recheck tags: dummy rm -f ../TAGS find ../ -name "*.[hc]" -print | xargs etags --declarations -a -o ../TAGS dummy: