# ASCEND Interface Makefile # Kirk Abbott. Ben Allan # November 24, 1993 SHELL = /bin/sh builddir = .. srcdir = @fullpathsrcdir@/../../tcltk/generic/interface VPATH := @fullpathsrcdir@/../../tcltk/generic/interface # The next variables are the primary executables and/or libraries that # this makefile is responsible for, and the default target of this # makefile. EXECUTABLE = $(builddir)/bin/ascend4 PURIFIED_EXEC = $(builddir)/bin/ascend4p QUANTIFIED_EXEC = $(builddir)/bin/ascend4q LIBRARY = libascif.a default: $(LIBRARY) $(EXECUTABLE) main.o:main.c # Defines and Includes that are specific to this directory DIR_SPECIFIC_DEFS = $(SOLVER_DEFS) DIR_SPECIFIC_INCS = $(TK_INCS) $(X11_INCS) # The next variables list the source files (EXEC_SCRS) to compile # into the object files (EXEC_OBJS) that are linked with the # library files (EXEC_LIBS) to make EXECUTABLE EXEC_OBJS = main.o EXEC_SRCS = $(EXEC_OBJS:%.o=%.c) EXEC_LIBS = $(ASC_LIBS) $(FOR_LIBS) $(TK_LIBS) $(TKTABLE_LIB) $(X11_LIBS) \ $(MATH_LIBS) $(DEBUG_LIBS) # The next variables list the source files (LIB_SCRS) to compile # into the object files (LIB_OBJS) that are combined to make LIBRARY LIB_OBJS = \ AscBitmaps.o AscPrintTcl.o BrowLogRel_io.o BrowWhen_io.o \ BrowserMethod.o BrowserProc.o BrowserQuery.o BrowserRel_io.o \ Commands.o DebugProc.o DisplayProc.o Driver.o \ EnvVarProc.o HelpProc.o Integrators.o \ LibraryProc.o Lsode.o MtxProc.o ProbeProc.o Qlfdid.o \ ScriptProc.o Sensitivity.o SimsProc.o SlvProc.o \ SolverProc.o UnitsProc.o UserData.o \ tkConsole.o typelex.o old_utils.o LIB_SRCS = $(LIB_OBJS:%.o=%.c) # The global makefile macros (ConfigAscend) and global rules (Makefile.Rules) # #AWW $builddir is currently pointing to: base/generic # include $(builddir)/ConfigAscend include $(builddir)/Makefile.Rules # Some aliases for targets ascend4 GUI: $(EXECUTABLE) ascend4p: $(PURIFIED_EXEC) ascend4q: $(QUANTIFIED_EXEC) # File specific rules DriverNoTickle.o: Driver.date $(CC) $(CC_SWITCHES) $(HAVE_TKTABLE) $(TIMESTAMP) -c $(srcdir)/DriverNoTickle.c $(RM) Driver.date # Force an update of Driver.o so we update the value # of TIMESTAMP in the ascend binary # -- disabled -- Dec 1 2005 -- johnpye (dependencies should 'just work' for this) #Driver.o: Driver.date # $(CC) $(CC_SWITCHES) $(HAVE_TKTABLE) $(TIMESTAMP) -c $(srcdir)/Driver.c # $(RM) Driver.date # #Driver.date: $(srcdir)/Driver.c # $(ECHO) 'A file to force a timestamp update' > Driver.date # The C file for the typer (typelex.c) can either be generated by flex, # or it can come from a pregenerated C file. The configure script will # set the $(MAKE) line under the ``typelex'' target to maker either # typelex.c.from.flex ---to generate the typer using flex # typelex.c.from.c ---to use the pregenerated C file # depending on the value of $(LEX). typelex.o: $(srcdir)/typelex.l $(srcdir)/typelex_no_flex.c $(MAKE) @typer_src@ $(CC) $(CC_SWITCHES) -I$(srcdir) -DYY_USE_CONST -c typelex.c typelex.c.from.flex: $(srcdir)/typelex.l $(LEX) -Ptyp_ -t $(srcdir)/typelex.l > typelex.c typelex.c.from.c: $(srcdir)/typelex_no_flex.c $(CP) $(srcdir)/typelex.c.no.flex typelex.c typelex.c: $(srcdir)/typelex.l $(srcdir)/typelex_no_flex.c $(MAKE) @typer_src@ # Files to install install-binaries:: @if test ! -d $(BIN_DIR) ; then \ echo Making directory $(BIN_DIR) ; \ mkdir -p $(BIN_DIR) ; \ fi @if $(CMP) -s $(EXECUTABLE) $(BIN_DIR)/$(EXECUTABLE) ; then \ echo "Skipping $(EXECUTABLE) (up to date)" ; \ else \ echo "Installing $(EXECUTABLE) --> $(BIN_DIR)" ; \ $(INSTALL_PROGRAM) $(EXECUTABLE) $(BIN_DIR) ; \ fi # Files, in addition to the default, to remove when we `make clean' clean:: -$(RM) typelex.c #-$(RM) Driver.date # DO NOT DELETE THIS LINE -- g++dep uses it. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. # IF YOU PUT ANYTHING HERE IT WILL GO AWAY