/[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 473 - (show annotations) (download)
Mon Apr 17 04:52:34 2006 UTC (14 years, 2 months ago) by ben.allan
File size: 5572 byte(s)
restored the bypass missing yacc capability.
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 forvars.o fractions.o \
63 freestore.o func.o initialize.o instance.o instance_io.o \
64 instantiate.o instmacro.o instquery.o interval.o \
65 library.o linkinst.o logrel_io.o logrel_util.o \
66 logrelation.o mathinst.o mergeinst.o module.o name.o \
67 nameio.o notate.o numlist.o packages.o parentchild.o \
68 parpend.o pending.o plot.o proc.o procframe.o \
69 procio.o prototype.o qlfdid.o refineinst.o rel_common.o relation.o \
70 relation_io.o relation_util.o rootfind.o rounded.o safe.o \
71 scanner.o select.o setinst_io.o setinstval.o setio.o \
72 sets.o slist.o simlist.o statement.o statio.o switch.o \
73 symtab.o syntax.o temp.o tmpnum.o type_desc.o \
74 type_descio.o typedef.o typelint.o redirectFile.o \
75 units.o universal.o \
76 value_type.o visitinst.o visitlink.o vlist.o vlistio.o \
77 watchpt.o watchptio.o when.o when_io.o when_util.o
78
79 LIB_SRCS = $(LIB_OBJS:%.o=%.c)
80
81 # The global makefile macros (ConfigAscend) and global rules (Makefile.Rules)
82 #
83 include $(builddir)/ConfigAscend
84 include $(builddir)/Makefile.Rules
85
86
87
88 # File specific rules
89
90 # The parser needs some massaging to change the prefix from `yy' to `zz_'
91
92 ascParse.o: $(srcdir)/ascParse.y
93
94 ascParse.c ascParse.h: $(srcdir)/ascParse.y $(srcdir)/ascParse.c.no.yacc $(srcdir)/ascParse.h.no.yacc
95 $(MAKE) @parser_src@
96
97 ascParse.c.from.yacc: $(srcdir)/ascParse.y
98 $(YACC) -d $(srcdir)/ascParse.y
99 $(RM) ascParse.h ascParse.c
100 $(SED) -e "/#ifndef YYSTYPE/,/#endif/d" \
101 -e "s/yy/zz_/g" -e "s/YY/ZZ_/g" < y.tab.c > ascParse.c
102 $(SED) -e "s/yy/zz_/g" -e "s/YY/ZZ_/g" < y.tab.h > ascParse.h
103 $(RM) y.tab.c y.tab.h
104
105 ascParse.c.from.c:
106 $(CP) $(srcdir)/ascParse.c.no.yacc ascParse.c
107 $(CP) $(srcdir)/ascParse.h.no.yacc ascParse.h
108
109 # rounded needs a special define
110
111 rounded.o: $(srcdir)/rounded.h $(srcdir)/rounded.c $(srcdir)/compiler.h
112 $(CC) -DSLOPPY $(CC_SWITCHES) -c $(srcdir)/rounded.c
113
114
115 # The C file for the scanner (scanner.c) can either be generated by flex,
116 # or it can come from a pregenerated C file. The configure script will
117 # set the $(MAKE) line under the ``scanner'' target to make either
118 # scanner.c.from.flex ---to generate the scanner using flex
119 # scanner.c.from.c ---to use the pregenerated C file
120 # depending on the value of $(LEX).
121
122 scanner.o: $(srcdir)/scanner.l $(srcdir)/scanner.c.no.flex ./ascParse.h
123 $(MAKE) @scanner_src@
124 $(CC) $(CC_SWITCHES) -c scanner.c
125
126 scanner.c.from.flex: $(srcdir)/scanner.l ./ascParse.h
127 $(LEX) -t -Pzz_ $(srcdir)/scanner.l > scanner.c
128
129 scanner.c.from.c: $(srcdir)/scanner.c.no.flex
130 $(CP) $(srcdir)/scanner.c.no.flex scanner.c
131
132 scanner.c: $(srcdir)/scanner.l $(srcdir)/scanner.c.no.flex ./ascParse.h
133 $(MAKE) @scanner_src@
134
135
136 # This ensures that packages was built with -DNO_PACKAGES
137 # when building the stand-alone compiler
138
139 .no-packages: packages.o
140 $(RM) $?
141 $(MAKE) $? HAVE_PACKAGES=-DNO_PACKAGES
142 $(ECHO) 'Made packages.o with -DNO_PACKAGES' > $@
143
144 packages.o: $(srcdir)/packages.c
145 $(CC) $(HAVE_PACKAGES) $(CC_SWITCHES) -c $(srcdir)/packages.c
146
147
148 ###==> standalone compiler <==##############################
149 # uncomment the following lines if you want to build a standalone
150 # compiler with NO_PACKAGES selected in ConfigAscend.
151 #HAVE_PACKAGES = -DNO_PACKAGES
152 #PACK_LIBS =
153
154
155 # Here is a target to build a stand alone version of the ASCEND
156 # compiler. It makes sure packages was built with -NO_PACKAGES,
157 # and then builds ascend.
158 #
159 stand-alone: .no-packages
160 $(MAKE) ascend PACK_LIBS=""
161
162
163 # profiling stuff -- DEC alpha only
164 #
165 time:
166 $(PIXIE) ascend
167 cd $(PIXIEDIR); $(builddir)/ascend.pixie ./system
168 $(RM) /tmp/time.ascend
169 prof $(PIXIE_OPTS) ascend ascend.Addrs \
170 $(PIXIEDIR)/ascend.Counts > /tmp/time.ascend
171
172
173
174 # Files, in addition to the default, to remove when we `make clean'
175
176 clean::
177 -$(RM) ascParse.h ascParse.c y.ascParse.c y.ascParse.h yacc.* \
178 scanner.c fascend .no-packages
179
180
181
182 # DO NOT DELETE THIS LINE -- g++dep uses it.
183 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
184
185
186 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
187 #

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