/[ascend]/trunk/base/generic/compiler/Makefile.in
ViewVC logotype

Contents of /trunk/base/generic/compiler/Makefile.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1108 - (show annotations) (download)
Wed Jan 10 22:04:52 2007 UTC (13 years, 6 months ago) by johnpye
File size: 5758 byte(s)
Added importhandler.o to the autotools file list
1 # ASCEND Compiler Makefile
2 # Tom Epperly
3 # modified Kirk Abbott to accept the interface.
4
5
6 SHELL = /bin/sh
7 builddir = ..
8 srcdir = @fullpathsrcdir@/../generic/compiler
9 VPATH := @fullpathsrcdir@/../generic/compiler
10
11 LEX = @LEX@
12
13 # The next variables are the primary executables and/or libraries that
14 # this makefile is responsible for, and the default target of this
15 # makefile.
16
17 EXECUTABLE = ascend
18
19 PURIFIED_EXEC = ascendp
20
21 QUANTIFIED_EXEC = ascendq
22
23 LIBRARY = libasccompiler.a
24
25
26 default: $(LIBRARY)
27
28
29
30 # Defines and Includes that are specific to this directory
31
32 DIR_SPECIFIC_DEFS =
33 DIR_SPECIFIC_INCS =
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 EXEC_SRCS = actype.c interface.c license.c main.c termsetup.c
42
43 EXEC_OBJS = actype.o interface.o license.o main.o termsetup.o \
44 $(ARCHIVE)/libasccompiler.a $(ARCHIVE)/libascutilities.a \
45 $(ARCHIVE)/libascgeneral.a
46
47 EXEC_LIBS = $(DEBUG_MALLOC_LIBS) $(MATH_LIBS) -ltermcap $(DEBUG_LIBS)
48
49
50
51 # The next variables list the source files (LIB_SCRS) to compile
52 # into the object files (LIB_OBJS) that are combined to make LIBRARY
53
54
55 LIB_OBJS = \
56 anoncopy.o anonmerg.o anontype.o arrayinst.o ascCompiler.o \
57 ascParse.o atomsize.o atomvalue.o bintoken.o bit.o braced.o \
58 case.o check.o child.o childdef.o childio.o childinfo.o cmpfunc.o \
59 commands.o copyinst.o createinst.o destroyinst.o \
60 dimen.o dimen_io.o dump.o \
61 evaluate.o exprio.o exprs.o exprsym.o extcall.o \
62 extfunc.o extinst.o find.o findpath.o forvars.o fractions.o \
63 freestore.o func.o importhandler.o \
64 initialize.o instance_io.o \
65 instantiate.o instmacro.o instquery.o interval.o \
66 library.o linkinst.o logrel_io.o logrel_util.o \
67 logrelation.o mathinst.o mergeinst.o module.o name.o \
68 nameio.o notate.o numlist.o packages.o parentchild.o \
69 parpend.o pending.o plot.o proc.o procframe.o \
70 procio.o prototype.o qlfdid.o refineinst.o rel_common.o relation.o \
71 relation_io.o relation_util.o rootfind.o rounded.o safe.o \
72 rel_blackbox.o \
73 scanner.o select.o setinst_io.o setinstval.o setio.o \
74 sets.o slist.o simlist.o statement.o statio.o switch.o \
75 symtab.o syntax.o temp.o tmpnum.o type_desc.o \
76 type_descio.o typedef.o typelint.o redirectFile.o \
77 units.o universal.o \
78 value_type.o visitinst.o visitlink.o vlist.o vlistio.o \
79 watchpt.o watchptio.o when.o when_io.o when_util.o
80
81 LIB_SRCS = $(LIB_OBJS:%.o=%.c)
82
83 # The global makefile macros (ConfigAscend) and global rules (Makefile.Rules)
84 #
85 include $(builddir)/ConfigAscend
86 include $(builddir)/Makefile.Rules
87
88
89
90 # File specific rules
91
92 # The parser needs some massaging to change the prefix from `yy' to `zz_'
93
94 ascParse.o: $(srcdir)/ascParse.y
95
96 ascParse.c ascParse.h: $(srcdir)/ascParse.y $(srcdir)/ascParse_no_yacc.c $(srcdir)/ascParse_no_yacc.h
97 $(MAKE) @parser_src@
98
99 ascParse.c.from.yacc: $(srcdir)/ascParse.y
100 $(YACC) -d $(srcdir)/ascParse.y
101 $(RM) ascParse.h ascParse.c
102 $(SED) -e "/#ifndef YYSTYPE/,/#endif/d" \
103 -e "s/yy/zz_/g" -e "s/YY/ZZ_/g" < y.tab.c > ascParse.c
104 $(SED) -e "s/yy/zz_/g" -e "s/YY/ZZ_/g" < y.tab.h > ascParse.h
105 $(RM) y.tab.c y.tab.h
106
107 ascParse.c.from.c:
108 $(CP) $(srcdir)/ascParse_no_yacc.c ascParse.c
109 $(CP) $(srcdir)/ascParse_no_yacc.h ascParse.h
110
111 # rounded needs a special define
112
113 rounded.o: $(srcdir)/rounded.h $(srcdir)/rounded.c $(srcdir)/compiler.h
114 $(CC) -DSLOPPY $(CC_SWITCHES) -c $(srcdir)/rounded.c
115
116
117 # The C file for the scanner (scanner.c) can either be generated by flex,
118 # or it can come from a pregenerated C file. The configure script will
119 # set the $(MAKE) line under the ``scanner'' target to make either
120 # scanner.c.from.flex ---to generate the scanner using flex
121 # scanner.c.from.c ---to use the pregenerated C file
122 # depending on the value of $(LEX).
123 # The scanner does not depend on btprolog.h, but we need to force it to
124 # be in the build tree.
125
126 scanner.o: $(srcdir)/scanner.l $(srcdir)/scanner_no_flex.c ./ascParse.h ./btprolog.h
127 $(MAKE) @scanner_src@
128 $(CC) $(CC_SWITCHES) -c scanner.c
129
130 scanner.c.from.flex: $(srcdir)/scanner.l ./ascParse.h
131 $(LEX) -t -Pzz_ $(srcdir)/scanner.l > scanner.c
132
133 scanner.c.from.c: $(srcdir)/scanner_no_flex.c
134 $(CP) $(srcdir)/scanner_no_flex.c scanner.c
135
136 scanner.c: $(srcdir)/scanner.l $(srcdir)/scanner_no_flex.c ./ascParse.h
137 $(MAKE) @scanner_src@
138
139 btprolog.h:
140 $(CP) $(srcdir)/btprolog.h .
141
142
143 # This ensures that packages was built with -DNO_PACKAGES
144 # when building the stand-alone compiler
145
146 .no-packages: packages.o
147 $(RM) $?
148 $(MAKE) $? HAVE_PACKAGES=-DNO_PACKAGES
149 $(ECHO) 'Made packages.o with -DNO_PACKAGES' > $@
150
151 packages.o: $(srcdir)/packages.c
152 $(CC) $(HAVE_PACKAGES) $(CC_SWITCHES) -c $(srcdir)/packages.c
153
154
155 ###==> standalone compiler <==##############################
156 # uncomment the following lines if you want to build a standalone
157 # compiler with NO_PACKAGES selected in ConfigAscend.
158 #HAVE_PACKAGES = -DNO_PACKAGES
159 #PACK_LIBS =
160
161
162 # Here is a target to build a stand alone version of the ASCEND
163 # compiler. It makes sure packages was built with -NO_PACKAGES,
164 # and then builds ascend.
165 #
166 stand-alone: .no-packages
167 $(MAKE) ascend PACK_LIBS=""
168
169
170 # profiling stuff -- DEC alpha only
171 #
172 time:
173 $(PIXIE) ascend
174 cd $(PIXIEDIR); $(builddir)/ascend.pixie ./system
175 $(RM) /tmp/time.ascend
176 prof $(PIXIE_OPTS) ascend ascend.Addrs \
177 $(PIXIEDIR)/ascend.Counts > /tmp/time.ascend
178
179
180
181 # Files, in addition to the default, to remove when we `make clean'
182
183 clean::
184 -$(RM) ascParse.h ascParse.c y.ascParse.c y.ascParse.h yacc.* \
185 scanner.c fascend .no-packages
186
187
188
189 # DO NOT DELETE THIS LINE -- g++dep uses it.
190 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
191
192
193 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
194 #

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22