####################################################################### # $Header$ ####################################################################### prefix = @prefix@ exec_prefix = @exec_prefix@ srcdir = @srcdir@ ############################################################################## # Compiler and system configuration ############################################################################## SHELL = /bin/sh CC = @CC@ CFLAGS = @CFLAGS@ CXX = @CXX@ LIBS = @LIBS@ AR = @AR@ RANLIB = @RANLIB@ # Note: Files in `SWIG_LIB' are machine independent so we use `prefix' # instead of `exec_prefix' or, derivatively, `libdir'. SWIG_LIB = $(prefix)/lib/swig1.3 BIN_DIR = @bindir@ TARGET = swig SOURCE = Source SOURCEDIRS = `ls $(SOURCE)` swig: SWIG1.1 Modules1.1 Swig Preprocessor DOH $(CXX) -o $(TARGET) \ $(SOURCE)/Modules1.1/libmodules11.a \ $(SOURCE)/SWIG1.1/libswig11.a \ $(SOURCE)/Preprocessor/libcpp.a \ $(SOURCE)/Swig/libswig.a \ $(SOURCE)/DOH/libdoh.a \ $(LIBS) swig13: SWIG1.3 Modules1.1 Swig LParse Preprocessor DOH $(CXX) -o $(TARGET) \ $(SOURCE)/Modules1.1/libmodules11.a \ $(SOURCE)/SWIG1.3/libswig13.a \ $(SOURCE)/Preprocessor/libcpp.a \ $(SOURCE)/LParse/liblparse.a \ $(SOURCE)/Swig/libswig.a \ $(SOURCE)/DOH/libdoh.a \ $(LIBS) experiment: Swig Preprocessor LParse Experiment Swim SWILL DOH Xmlparse Expat Modules $(CXX) -o $(TARGET) \ $(SOURCE)/Experiment/libexp.a \ $(SOURCE)/Xmlparse/libxmlparse.a \ $(SOURCE)/Expat/libexpat.a \ $(SOURCE)/LParse/liblparse.a \ $(SOURCE)/Preprocessor/libcpp.a \ $(SOURCE)/Modules/libmodules.a \ $(SOURCE)/Swig/libswig.a \ $(SOURCE)/Swim/libswim.a \ $(SOURCE)/SWILL/libswill.a \ $(SOURCE)/DOH/libdoh.a \ $(LIBS) SWIG1.1: @cd $(SOURCE)/SWIG1.1; $(MAKE) SWIG1.3: @cd $(SOURCE)/SWIG1.3; $(MAKE) Modules1.1: @cd $(SOURCE)/Modules1.1; $(MAKE) Swig: @cd $(SOURCE)/Swig; $(MAKE) Preprocessor: @cd $(SOURCE)/Preprocessor; $(MAKE) LParse: @cd $(SOURCE)/LParse; $(MAKE) Experiment: @cd $(SOURCE)/Experiment; $(MAKE) Swim: @cd $(SOURCE)/Swim; $(MAKE) SWILL: @cd $(SOURCE)/SWILL; $(MAKE) DOH: @cd $(SOURCE)/DOH; $(MAKE) Xmlparse: @cd $(SOURCE)/Xmlparse; $(MAKE) Expat: @cd $(SOURCE)/Expat; $(MAKE) Swithe: @cd $(SOURCE)/Swithe; $(MAKE) Modules: @cd $(SOURCE)/Modules; $(MAKE) .PHONY: SWIG1.1 Modules1.1 Swig Preprocessor LParse \ Experiment Swim SWILL DOH Swithe ##################################################################### # Runtime libraries ##################################################################### runtime: @cd Runtime; $(MAKE) ##################################################################### # CLEAN ##################################################################### clean: @for i in $(SOURCEDIRS) ; \ do \ if [ -d $(SOURCE)/$$i -a -f $(SOURCE)/$$i/Makefile ]; then \ (cd $(SOURCE)/$$i; $(MAKE) clean) ; \ fi \ done; @cd Runtime; $(MAKE) clean rm -f swig ##################################################################### # TARGETS: install & friends ##################################################################### INSTALL = install-sh -c INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = $(srcdir)/${INSTALL} -m 755 MKINSTDIRS = $(srcdir)/mkinstalldirs install: install-main install-lib install-runtime @echo "Installation complete" install-main: @echo "Installing $(BIN_DIR)/swig" @$(MKINSTDIRS) $(BIN_DIR) @if [ -f swig.exe ]; then \ $(INSTALL_PROGRAM) swig.exe $(BIN_DIR)/swig.exe; \ else \ $(INSTALL_PROGRAM) swig $(BIN_DIR)/swig; \ fi install-lib: @echo "Installing the SWIG library" @$(MKINSTDIRS) $(SWIG_LIB) # cd $(SWIG_LIB); rm -rf * # The following line has `*.swg' removed -- add it back if needed. @cd $(srcdir)/Lib; for i in *.i; \ do \ echo "Installing Lib/$$i"; \ ../$(INSTALL_DATA) $$i $(SWIG_LIB)/$$i; \ done; @$(MKINSTDIRS) $(SWIG_LIB)/tcl @cd $(srcdir)/Lib/tcl; for i in *.i *.swg; \ do \ echo "Installing Lib/tcl/$$i"; \ ../../$(INSTALL_DATA) $$i $(SWIG_LIB)/tcl/$$i; \ done; @$(MKINSTDIRS) $(SWIG_LIB)/perl5 @cd $(srcdir)/Lib/perl5; for i in *.i *.swg Makefile.pl; \ do \ echo "Installing Lib/perl5/$$i"; \ ../../$(INSTALL_DATA) $$i $(SWIG_LIB)/perl5/$$i; \ done; @$(MKINSTDIRS) $(SWIG_LIB)/python @cd $(srcdir)/Lib/python; for i in *.i *.swg; \ do \ echo "Installing Lib/python/$$i"; \ ../../$(INSTALL_DATA) $$i $(SWIG_LIB)/python/$$i; \ done; @$(MKINSTDIRS) $(SWIG_LIB)/guile @cd $(srcdir)/Lib/guile; for i in *.i *.swg; \ do \ echo "Installing Lib/guile/$$i"; \ ../../$(INSTALL_DATA) $$i $(SWIG_LIB)/guile/$$i; \ done; @$(MKINSTDIRS) $(SWIG_LIB)/java @cd $(srcdir)/Lib/java; for i in *.i *.swg; \ do \ echo "Installing Lib/java/$$i"; \ ../../$(INSTALL_DATA) $$i $(SWIG_LIB)/java/$$i; \ done; @$(MKINSTDIRS) $(SWIG_LIB)/mzscheme @cd $(srcdir)/Lib/mzscheme; for i in *.i *.swg; \ do \ echo "Installing Lib/mzscheme/$$i"; \ ../../$(INSTALL_DATA) $$i $(SWIG_LIB)/mzscheme/$$i; \ done; install-runtime: @cd Runtime; $(MAKE) install ############################################################################ # DIST and other maintenance ############################################################################ # distribution directory dd = @PACKAGE@-@VERSION@ dist: @echo 'Dave, what do you want to do w/ "make dist"?' @echo 'See Makefile.in target "dist-suggested" for an idea.' @echo ' --thi' false dist-suggested: rm -rf $(dd) $(dd).tar.gz cvs export -d $(dd) -r HEAD SWIG tar cf - $(dd) | gzip --best > $(dd).tar.gz rm -rf $(dd) # Makefile ends here