1 |
johnpye |
571 |
# ASCEND Interface Makefile |
2 |
|
|
# Kirk Abbott. Ben Allan |
3 |
|
|
# November 24, 1993 |
4 |
|
|
|
5 |
|
|
SHELL = /bin/sh |
6 |
|
|
builddir = .. |
7 |
|
|
srcdir = @fullpathsrcdir@/../../tcltk/generic/interface |
8 |
|
|
VPATH := @fullpathsrcdir@/../../tcltk/generic/interface |
9 |
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
# The next variables are the primary executables and/or libraries that |
13 |
|
|
# this makefile is responsible for, and the default target of this |
14 |
|
|
# makefile. |
15 |
|
|
|
16 |
|
|
EXECUTABLE = $(builddir)/bin/ascend4 |
17 |
|
|
|
18 |
|
|
PURIFIED_EXEC = $(builddir)/bin/ascend4p |
19 |
|
|
|
20 |
|
|
QUANTIFIED_EXEC = $(builddir)/bin/ascend4q |
21 |
|
|
|
22 |
|
|
LIBRARY = libascif.a |
23 |
|
|
|
24 |
|
|
|
25 |
|
|
default: $(LIBRARY) $(EXECUTABLE) |
26 |
|
|
|
27 |
johnpye |
629 |
main.o:main.c |
28 |
johnpye |
571 |
|
29 |
|
|
# Defines and Includes that are specific to this directory |
30 |
|
|
|
31 |
|
|
DIR_SPECIFIC_DEFS = $(SOLVER_DEFS) |
32 |
|
|
DIR_SPECIFIC_INCS = $(TK_INCS) $(X11_INCS) |
33 |
|
|
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
# The next variables list the source files (EXEC_SCRS) to compile |
38 |
|
|
# into the object files (EXEC_OBJS) that are linked with the |
39 |
|
|
# library files (EXEC_LIBS) to make EXECUTABLE |
40 |
|
|
|
41 |
johnpye |
629 |
EXEC_OBJS = main.o |
42 |
|
|
EXEC_SRCS = $(EXEC_OBJS:%.o=%.c) |
43 |
johnpye |
571 |
|
44 |
|
|
EXEC_LIBS = $(ASC_LIBS) $(FOR_LIBS) $(TK_LIBS) $(TKTABLE_LIB) $(X11_LIBS) \ |
45 |
|
|
$(MATH_LIBS) $(DEBUG_LIBS) |
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
# The next variables list the source files (LIB_SCRS) to compile |
50 |
|
|
# into the object files (LIB_OBJS) that are combined to make LIBRARY |
51 |
|
|
|
52 |
|
|
LIB_OBJS = \ |
53 |
|
|
AscBitmaps.o AscPrintTcl.o BrowLogRel_io.o BrowWhen_io.o \ |
54 |
|
|
BrowserMethod.o BrowserProc.o BrowserQuery.o BrowserRel_io.o \ |
55 |
johnpye |
629 |
Commands.o DebugProc.o DisplayProc.o Driver.o \ |
56 |
johnpye |
571 |
EnvVarProc.o HelpProc.o Integrators.o \ |
57 |
johnpye |
677 |
LibraryProc.o MtxProc.o ProbeProc.o Qlfdid.o \ |
58 |
johnpye |
571 |
ScriptProc.o Sensitivity.o SimsProc.o SlvProc.o \ |
59 |
|
|
SolverProc.o UnitsProc.o UserData.o \ |
60 |
|
|
tkConsole.o typelex.o old_utils.o |
61 |
|
|
|
62 |
|
|
LIB_SRCS = $(LIB_OBJS:%.o=%.c) |
63 |
|
|
|
64 |
|
|
# The global makefile macros (ConfigAscend) and global rules (Makefile.Rules) |
65 |
|
|
# |
66 |
|
|
#AWW $builddir is currently pointing to: base/generic |
67 |
|
|
# |
68 |
|
|
include $(builddir)/ConfigAscend |
69 |
|
|
include $(builddir)/Makefile.Rules |
70 |
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
# Some aliases for targets |
74 |
|
|
|
75 |
|
|
ascend4 GUI: $(EXECUTABLE) |
76 |
|
|
|
77 |
|
|
ascend4p: $(PURIFIED_EXEC) |
78 |
|
|
|
79 |
|
|
ascend4q: $(QUANTIFIED_EXEC) |
80 |
|
|
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
# File specific rules |
84 |
|
|
|
85 |
|
|
DriverNoTickle.o: Driver.date |
86 |
|
|
$(CC) $(CC_SWITCHES) $(HAVE_TKTABLE) $(TIMESTAMP) -c $(srcdir)/DriverNoTickle.c |
87 |
|
|
$(RM) Driver.date |
88 |
|
|
|
89 |
|
|
|
90 |
|
|
# Force an update of Driver.o so we update the value |
91 |
|
|
# of TIMESTAMP in the ascend binary |
92 |
johnpye |
629 |
# -- disabled -- Dec 1 2005 -- johnpye (dependencies should 'just work' for this) |
93 |
johnpye |
571 |
#Driver.o: Driver.date |
94 |
|
|
# $(CC) $(CC_SWITCHES) $(HAVE_TKTABLE) $(TIMESTAMP) -c $(srcdir)/Driver.c |
95 |
|
|
# $(RM) Driver.date |
96 |
|
|
# |
97 |
|
|
#Driver.date: $(srcdir)/Driver.c |
98 |
|
|
# $(ECHO) 'A file to force a timestamp update' > Driver.date |
99 |
|
|
|
100 |
|
|
|
101 |
|
|
|
102 |
|
|
# The C file for the typer (typelex.c) can either be generated by flex, |
103 |
|
|
# or it can come from a pregenerated C file. The configure script will |
104 |
|
|
# set the $(MAKE) line under the ``typelex'' target to maker either |
105 |
|
|
# typelex.c.from.flex ---to generate the typer using flex |
106 |
|
|
# typelex.c.from.c ---to use the pregenerated C file |
107 |
|
|
# depending on the value of $(LEX). |
108 |
|
|
|
109 |
|
|
typelex.o: $(srcdir)/typelex.l $(srcdir)/typelex_no_flex.c |
110 |
|
|
$(MAKE) @typer_src@ |
111 |
|
|
$(CC) $(CC_SWITCHES) -I$(srcdir) -DYY_USE_CONST -c typelex.c |
112 |
|
|
|
113 |
|
|
typelex.c.from.flex: $(srcdir)/typelex.l |
114 |
|
|
$(LEX) -Ptyp_ -t $(srcdir)/typelex.l > typelex.c |
115 |
|
|
|
116 |
|
|
typelex.c.from.c: $(srcdir)/typelex_no_flex.c |
117 |
|
|
$(CP) $(srcdir)/typelex.c.no.flex typelex.c |
118 |
|
|
|
119 |
|
|
typelex.c: $(srcdir)/typelex.l $(srcdir)/typelex_no_flex.c |
120 |
|
|
$(MAKE) @typer_src@ |
121 |
|
|
|
122 |
|
|
|
123 |
|
|
|
124 |
|
|
# Files to install |
125 |
|
|
|
126 |
|
|
install-binaries:: |
127 |
|
|
@if test ! -d $(BIN_DIR) ; then \ |
128 |
|
|
echo Making directory $(BIN_DIR) ; \ |
129 |
|
|
mkdir -p $(BIN_DIR) ; \ |
130 |
|
|
fi |
131 |
|
|
@if $(CMP) -s $(EXECUTABLE) $(BIN_DIR)/$(EXECUTABLE) ; then \ |
132 |
|
|
echo "Skipping $(EXECUTABLE) (up to date)" ; \ |
133 |
|
|
else \ |
134 |
|
|
echo "Installing $(EXECUTABLE) --> $(BIN_DIR)" ; \ |
135 |
|
|
$(INSTALL_PROGRAM) $(EXECUTABLE) $(BIN_DIR) ; \ |
136 |
|
|
fi |
137 |
|
|
|
138 |
|
|
|
139 |
|
|
|
140 |
|
|
# Files, in addition to the default, to remove when we `make clean' |
141 |
|
|
|
142 |
|
|
clean:: |
143 |
|
|
-$(RM) typelex.c |
144 |
|
|
#-$(RM) Driver.date |
145 |
|
|
|
146 |
|
|
|
147 |
|
|
|
148 |
|
|
# DO NOT DELETE THIS LINE -- g++dep uses it. |
149 |
|
|
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. |
150 |
|
|
|
151 |
|
|
|
152 |
|
|
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY |