# # Main Makefile for Thot/Amaya source tree # Generated from Makefile.in # Daniel Veillard, 1997 # @VPATHOPT@= @srcdir@ THOTDIR = @top_srcdir@ include Options LIBWWW = libwww KAFFE = kaffe-$(KAFFE_VER) LIBJPEG = libjpeg LIBPNG = libpng LIBZ = libz SUBDIRS = tools thotlib tablelib batch drawlib indexlib amaya thot misc/annotations EXTRA_SUBDIRS= misc classes javalib pluginlib annotlib prefix = @prefix@ exec_prefix = @exec_prefix@ libdir = @libdir@ bindir = @bindir@ srcdir = $(THOTDIR) @SET_MAKE@ default : tools thotlib tablelib batch amaya_prog thot_prog print_prog thot : tools thotlib tablelib thot_prog amaya : tools thotlib tablelib amaya_prog print : tools thotlib tablelib print_prog Options: @CP@ Options.orig Options force : batch: rebuild force @(if test -d batch ; then cd batch ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" ; fi) tools: rebuild force @(if test -d tools ; then cd tools ; \ $(MAKE) CC="$(CC)" CFLAGS="-O" all ; fi) thotlib: rebuild force @(if test -d thotlib ; then cd thotlib ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" all ; fi) thot_prog: rebuild force @(if test -d thot ; then cd thot ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" thot ; fi) annotations: rebuild force @(if test -d misc/annotations ; then cd misc/annotations ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" annotations ; fi) html2piv: rebuild force @(if test -d amaya ; then cd amaya ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" html2piv ; fi) amaya_prog: rebuild force bin/str @(if test -d amaya ; then cd amaya ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" amaya ; fi) print_prog: rebuild force bin/str @(if test -d thotlib ; then cd thotlib ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" print ; fi) misc: rebuild force @(if test -d misc ; then cd misc ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" all ; fi) all : rebuild @(for dir in $(SUBDIRS) ;\ do if test -d $$dir ; then cd $$dir ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" all ; \ cd .. ; fi ;done ) clean : rebuild @(for dir in $(SUBDIRS) $(EXTRA_SUBDIRS) ;\ do if test -d $$dir ; then cd $$dir ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" clean ; \ cd .. ; fi ;done ) install : rebuild @(for dir in $(SUBDIRS) ;\ do if test -d $$dir ; then cd $$dir ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" install ; \ cd .. ; fi ;done ) uninstall : @(for dir in $(SUBDIRS) ;\ do if test -d $$dir ; then cd $$dir ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" uninstall ; \ cd .. ; fi ;done ) update : @(cd $(THOTDIR) ; cvs update) 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" mkdep) depend depends : rebuild tools/mkdep/mkdep @(for dir in $(SUBDIRS) ;\ do if test -d $$dir ; then cd $$dir ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" depend ; \ cd .. ; fi ;done ) bin/cextract : @(cd tools/cextract-$(CEXTRACT_VER) ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" cextract) proto : rebuild bin/cextract @(for dir in $(SUBDIRS) ;\ do if test -d $$dir ; then cd $$dir ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" 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)" str prs tra printstr) schemas : rebuild bin/str @(bindir=`pwd`/bin ; cd $(THOTDIR)/schemas ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" THOTDIR=".." THOTSCH="../schemas:../schemasOPERA" \ COMPSCH="." COMPSTR="$$bindir/str" COMPPRS="$$bindir/prs" \ COMPTRA="$$bindir/tra" PRINTSTR="$$bindir/printstr" all) # # Rules to rebuild the libWWW package # AMAYA_LIBWWW_STANDARD_LIBS = \ libwwwapp \ libwwwhttp \ libwwwhtml \ libwwwmime \ libwwwcache \ libwwwstream \ libwwwfile \ libwwwdir \ libwwwtrans \ libwwwcore \ libwwwutils \ libwwwftp \ libwwwxml \ libwwwzip libwww_config : force @(if [ ! -d $(THOTDIR)/../$(LIBWWW) ] ; then \ $(ECHO) "Error libwww dir not found at $(THOTDIR)/../$(LIBWWW)" ; \ fi) @(if [ ! -d $(LIBWWW) ] ; then \ $(MKDIR) $(LIBWWW) ; \ fi) @(localdir=`pwd` ; libwwwdir="$$localdir/../../$(LIBWWW)" ; \ cd $(LIBWWW) ; unset LANG; \ if [ ! -f Makefile -o ! -f wwwconf.h ] ; then \ $$libwwwdir/configure \ --disable-shared \ --with-zlib="$$localdir/libz.a"; \ $(ECHO) "libwww is configured" ; \ fi) libwww_make_module_md5 \ libmd5 : force @(localdir=`pwd`; \ zlibsrcdir="$$localdir/../libpng/zlib"; \ cd $(LIBWWW)/modules/md5 ; \ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" \ CPPFLAGS="$(CPPFLAGS) -I$$zlibsrcdir" \ 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)" \ CPPFLAGS="$(CPPFLAGS)" \ ) libwww_install_module_expat : force @(if [ -e libxmlparse.a -a ! -L libxmlparse.a ] ; then \ $(RM) libxmlparse.a ; \ fi ; \ if [ ! -L libxmlparse.a ] ; then \ $(LN_S) $(LIBWWW)/modules/expat/xmlparse/.libs/libxmlparse.a ./libxmlparse.a ; \ fi) @(if [ -e libxmltok.a -a ! -L libxmltok.a ] ; then \ $(RM) libxmltok.a ; \ fi ; \ if [ ! -L libxmltok.a ] ; then \ $(LN_S) $(LIBWWW)/modules/expat/xmltok/.libs/libxmltok.a ./libxmltok.a ; \ fi) libwww_make_standard_libs \ $(AMAYA_LIBWWW_STANDARD_LIBS) : force @(localdir=`pwd`; \ zlibsrcdir="$$localdir/../libpng/zlib"; \ 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)" \ CPPFLAGS="$(CPPFLAGS) -I$$zlibsrcdir" \ $$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 rebuild the libjpeg package # libjpeg libjpeg.a : force @($(RM) $(THOTDIR)/libjpeg/*.o) @(cd libjpeg ; $(MAKE) CC="$(CC)" CFLAGS="-O") # # Rules to rebuild the libpng package # libpng libpng.a : force @($(RM) $(THOTDIR)/libpng/*.o) @(cd libpng ; $(MAKE) CC="$(CC)" CFLAGS="-O") # # Rules to rebuild the libpng package # libz libz.a : force @($(RM) $(THOTDIR)/libpng/libz/*.o) @(cd libpng/zlib ; $(MAKE) CC="$(CC)" CFLAGS="-O") # # Rules to rebuild the Kaffe package # kaffe_get : @(if [ ! -d $(THOTDIR)/$(KAFFE) ] ; \ then \ if [ -f $(THOTDIR)/$(KAFFE).tar.gz ] ; \ then \ cd $(THOTDIR) ; gunzip -c $(KAFFE).tar.gz | tar xvf - ; \ else \ cd $(THOTDIR) ; cvs get $(KAFFE) ; \ fi \ fi) @(if [ ! -d $(THOTDIR)/classes ] ; \ then \ cd $(THOTDIR) ; cvs get classes ; \ fi) @(if [ ! -d $(THOTDIR)/javalib ] ; \ then \ cd $(THOTDIR) ; cvs get javalib ; \ fi) @(if [ ! -d $(KAFFE) ] ; \ then \ mkdir $(KAFFE) ; \ fi) kaffe_clean : @($(RM) -f libkaffe*) kaffe_config : @(localdir=`pwd` ; kaffedir="$(THOTDIR)/$(KAFFE)" ; cd $(KAFFE) ; \ unset LANG; unset CC; unset CFLAGS; \ if [ -x $$kaffedir/configure ] ; then \ $$kaffedir/configure --prefix=$$localdir --libdir=$$localdir \ --bindir=$$localdir/bin --with-staticlib \ --with-threads=unix-internal \ @KAFFE_ENGINE@ ; \ else \ ../$$kaffedir/configure --prefix=$$localdir --libdir=$$localdir \ --bindir=$$localdir/bin --with-staticlib \ --with-threads=unix-internal \ @KAFFE_ENGINE@ ; \ fi) kaffe_make : @(cd $(KAFFE) ; unset CC ; unset CFLAGS; $(MAKE)) kaffe_install: @(cd $(KAFFE) ; $(MAKE) install) @(if [ ! -d $(THOTDIR)/classes ] ; \ then \ $(MKDIR) $(THOTDIR)/classes ; \ fi) @(if [ ! -d $(THOTDIR)/classes/lib ] ; \ then \ $(MKDIR) $(THOTDIR)/classes/lib ; \ fi) @($(CP) -R share/kaffe/. $(THOTDIR)/classes) @$(ECHO) Cleaning temp $(KAFFE) files @($(RM) -r man ) # @($(CP) libagent* libkaffevm* libnative* libnet* libzip* bin) # @($(RM) libagent* libkaffevm* libnative* libnet* libzip*) kaffe : kaffe_get kaffe_clean kaffe_config kaffe_make kaffe_install @(echo $(KAFFE) reinstalled) # # 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)/libjpeg/Makefile.in \ $(THOTDIR)/batch/Makefile.in \ $(THOTDIR)/libjpeg/Makefile.in \ $(THOTDIR)/libpng/Makefile.in \ $(THOTDIR)/libpng/zlib/Makefile.in \ $(THOTDIR)/tablelib/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