| | 1 | ## This file contains Automake rules common to many executables. |
| | 2 | |
| | 3 | ## This will instruct automake to create object files in the same |
| | 4 | ## directory as the corresponding source files, rather than in the |
| | 5 | ## top-level directory. This is needed since some source files in tads2 |
| | 6 | ## and tads3 have the same name. Putting the object files in the same |
| | 7 | ## directory would cause the compiler to override some tads2 objects |
| | 8 | ## with tads3 objects of the same name. |
| | 9 | ## |
| | 10 | ## Note that this option requires the macro AM_PROG_CC_C_O to be used |
| | 11 | ## somewhere in configure.ac (since not all compilers can use the -c and |
| | 12 | ## -o options at the same time; different make-rules will be used if the |
| | 13 | ## compiler can't handle these options together). |
| | 14 | ## |
| | 15 | AUTOMAKE_OPTIONS = subdir-objects |
| | 16 | |
| | 17 | ## These macros configure various parts of the base code. |
| | 18 | ## |
| | 19 | ## FROBTADS |
| | 20 | ## Tells the base code to include our osfrobtads.h header. This |
| | 21 | ## must be used in all executables. |
| | 22 | ## |
| | 23 | ## VMGLOB_VARS |
| | 24 | ## Tells the T3VM to use individual external variables for the |
| | 25 | ## globals. This is the fastest configuration. (See tads3/vmglob.h |
| | 26 | ## for details.) |
| | 27 | ## |
| | 28 | ## VMGLOB_PARAM |
| | 29 | ## Used in debug-builds of TADS 3 instead of VMGLOB_VARS. |
| | 30 | ## |
| | 31 | ## VM_FLAT_POOL |
| | 32 | ## Tells the T3VM to use the "flat" pool manager. A flat pool is |
| | 33 | ## somewhat faster than the default paged pool normaly used by the |
| | 34 | ## VM, but lacks dynamic memory capabilites. The paged pool is only |
| | 35 | ## useful for debuggers though, so we choose a flat pool. (See |
| | 36 | ## tads3/vmpoolsl.h for details.) |
| | 37 | ## |
| | 38 | AM_CPPFLAGS = -DFROBTADS |
| | 39 | |
| | 40 | if T3_DEBUG_BUILD |
| | 41 | AM_CPPFLAGS += -DT3_DEBUG -DVMGLOB_PARAM |
| | 42 | else |
| | 43 | AM_CPPFLAGS += -DVMGLOB_VARS |
| | 44 | endif |
| | 45 | |
| | 46 | ## Not yet; causes some (minor) memory leaks. For now, only the paged |
| | 47 | ## pool is safe. |
| | 48 | ## AM_CPPFLAGS += -DVM_FLAT_POOL |
| | 49 | |
| | 50 | ## If the system is little-endian, define _M_IX86_64. If not, we'll |
| | 51 | ## define _M_PPC. The base code needs one of these macros defined, so |
| | 52 | ## that it can decide which version of some endian-dependent routines |
| | 53 | ## to use. |
| | 54 | ## |
| | 55 | ## Note that we define _M_IX86_64 instead of _M_IX86 even though the |
| | 56 | ## former is intended for 64-bit platforms. The reason is that |
| | 57 | ## _M_IX86_64 works correctly even for 32-bit systems but not for |
| | 58 | ## 16-bit systems. _M_IX86 works for 32-bit systems as well as for |
| | 59 | ## 16-bit systems but not for 64-bit systems. Since we're only |
| | 60 | ## interested in 32 and 64-bit systems and don't support 16-bit systems |
| | 61 | ## at all, _M_IX86_64 is what we need. |
| | 62 | ## |
| | 63 | ## _M_PPC tells the base code to use the PowerPC versions of the |
| | 64 | ## endian-related routines. Despite the name, the PowerPC versions of |
| | 65 | ## these routines are generic and useable by both big-endian as well as |
| | 66 | ## little-endian machines; they're just a little slower on x86 and |
| | 67 | ## x86-64 systems than the ones activated with _M_IX86(_64). |
| | 68 | ## |
| | 69 | if CPU_IS_BIGENDIAN |
| | 70 | AM_CPPFLAGS += -D_M_PPC |
| | 71 | else |
| | 72 | AM_CPPFLAGS += -D_M_IX86_64 |
| | 73 | endif |
| | 74 | |
| | 75 | ## If the user does not want the T2 VM to check for errors like stack |
| | 76 | ## overflows/underflows and such at runtime, define RUNFAST so that the |
| | 77 | ## base code disables these checks. |
| | 78 | ## |
| | 79 | if !T2_RUNTIME_CHECKING |
| | 80 | AM_CPPFLAGS += -DRUNFAST |
| | 81 | endif |
| | 82 | |
| | 83 | ## We need to tell the compiler where to find header files. We prepend |
| | 84 | ## the source directory in case we are building the package in a |
| | 85 | ## different directory than the one it has been unpacked into. |
| | 86 | ## |
| | 87 | AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/tads2 -I$(top_srcdir)/tads3 |
| | 88 | |
| | 89 | ## If the system lacks the wchar.h header, provide our own. |
| | 90 | ## |
| | 91 | if WCHAR_HEADER_MISSING |
| | 92 | AM_CPPFLAGS += -I$(top_srcdir)/src/wchar |
| | 93 | endif |
| | 94 | |
| | 95 | ## These are the paths of various TADS 3 data-files. We need to know |
| | 96 | ## about them at runtime, so we also define them as macros. |
| | 97 | ## |
| | 98 | T3_INC_DIR = $(pkgdatadir)/tads3/include |
| | 99 | T3_LIB_DIR = $(pkgdatadir)/tads3/lib |
| | 100 | T3_RES_DIR = $(pkgdatadir)/tads3/res |
| | 101 | AM_CPPFLAGS += -DT3_INC_DIR=\"$(T3_INC_DIR)\" -DT3_LIB_DIR=\"$(T3_LIB_DIR)\" -DT3_RES_DIR=\"$(T3_RES_DIR)\" |
| | 102 | |
| | 103 | ## This is not needed at runtime so we don't add it to AM_CPPFLAGS. |
| | 104 | ## |
| | 105 | T3_CHARMAP_DIR = $(T3_RES_DIR)/charmap |
| | 106 | |
| | 107 | ## The TADS 3 character mapping tables are needed by both the |
| | 108 | ## interpreter as well as the compiler. Automake allows us to install |
| | 109 | ## files only once though. Normally, we would write something like |
| | 110 | ## "if BUILD_INTERPRETER or BUILD_T3_COMPILER", but Automake only allows |
| | 111 | ## a single conditional in 'if' statements. |
| | 112 | ## |
| | 113 | if BUILD_INTERPRETER |
| | 114 | t3charmapdir = $(T3_CHARMAP_DIR) |
| | 115 | dist_t3charmap_DATA = tads3/charmap/cmaplib.t3r |
| | 116 | else !BUILD_INTERPRETER |
| | 117 | if BUILD_T3_COMPILER |
| | 118 | t3charmapdir = $(T3_CHARMAP_DIR) |
| | 119 | dist_t3charmap_DATA = tads3/charmap/cmaplib.t3r |
| | 120 | endif BUILD_T3_COMPILER |
| | 121 | endif !BUILD_INTERPRETER |
| | 122 | |
| | 123 | ## Tell Automake to include these files in the "make dist" (and friends) |
| | 124 | ## target. Note that files like AUTHORS, README, etc. are automatically |
| | 125 | ## included in the distribution only if they're in the |
| | 126 | ## top-level directory. Makefile fragments included from Makefile.am |
| | 127 | ## (such as this file) are also distributed automaticly. |
| | 128 | ## |
| | 129 | EXTRA_DIST = \ |
| | 130 | bootstrap \ |
| | 131 | doc/AUTHORS \ |
| | 132 | doc/BUGS \ |
| | 133 | doc/ChangeLog \ |
| | 134 | doc/COMPILERS \ |
| | 135 | doc/CONFIGURE_DOC \ |
| | 136 | doc/COPYING \ |
| | 137 | doc/INSTALL \ |
| | 138 | doc/MacOSX \ |
| | 139 | doc/NEWS \ |
| | 140 | doc/README \ |
| | 141 | doc/SRC_GUIDELINES \ |
| | 142 | doc/THANKS \ |
| | 143 | tads2/LICENSE.TXT \ |
| | 144 | tads2/portnote.txt \ |
| | 145 | tads2/tadsver.htm \ |
| | 146 | tads3/LICENSE.TXT \ |
| | 147 | tads3/portnote.htm \ |
| | 148 | tads3/README.TXT |
| | 149 | |
| | 150 | ## Sources needed by both the interpreter as well as the compilers. |
| | 151 | ## |
| | 152 | COMMONSOURCES = \ |
| | 153 | src/common.h \ |
| | 154 | src/missing.cc \ |
| | 155 | src/missing.h \ |
| | 156 | src/osbeos.h \ |
| | 157 | src/osdos.h \ |
| | 158 | src/osfrobtads.h \ |
| | 159 | src/osos2.h \ |
| | 160 | src/osportable.cc \ |
| | 161 | src/osunixt.h \ |
| | 162 | src/oswin.h \ |
| | 163 | src/wchar/wchar.h \ |
| | 164 | tads2/osifc.c \ |
| | 165 | tads2/osnoui.c \ |
| | 166 | tads2/osrestad.c |
| | 167 | |
| | 168 | ## TADS 2 runtime and compiler headers. |
| | 169 | ## |
| | 170 | T2RCHEADERS = \ |
| | 171 | tads2/appctx.h \ |
| | 172 | tads2/argize.h \ |
| | 173 | tads2/bif.h \ |
| | 174 | tads2/cmap.h \ |
| | 175 | tads2/cmd.h \ |
| | 176 | tads2/dat.h \ |
| | 177 | tads2/dbg.h \ |
| | 178 | tads2/emt.h \ |
| | 179 | tads2/err.h \ |
| | 180 | tads2/fio.h \ |
| | 181 | tads2/h_ix86_64.h \ |
| | 182 | tads2/h_ix86.h \ |
| | 183 | tads2/h_ppc.h \ |
| | 184 | tads2/ler.h \ |
| | 185 | tads2/lib.h \ |
| | 186 | tads2/linf.h \ |
| | 187 | tads2/lin.h \ |
| | 188 | tads2/lst.h \ |
| | 189 | tads2/mch.h \ |
| | 190 | tads2/mcl.h \ |
| | 191 | tads2/mcm.h \ |
| | 192 | tads2/mcs.h \ |
| | 193 | tads2/obj.h \ |
| | 194 | tads2/oem.h \ |
| | 195 | tads2/opc.h \ |
| | 196 | tads2/osbigmem.h \ |
| | 197 | tads2/osgen.h \ |
| | 198 | tads2/os.h \ |
| | 199 | tads2/osifc.h \ |
| | 200 | tads2/osifctyp.h \ |
| | 201 | tads2/ply.h \ |
| | 202 | tads2/prp.h \ |
| | 203 | tads2/prs.h \ |
| | 204 | tads2/regex.h \ |
| | 205 | tads2/res.h \ |
| | 206 | tads2/run.h \ |
| | 207 | tads2/std.h \ |
| | 208 | tads2/sup.h \ |
| | 209 | tads2/tio.h \ |
| | 210 | tads2/tok.h \ |
| | 211 | tads2/trd.h \ |
| | 212 | tads2/voc.h |
| | 213 | |
| | 214 | ## TADS 2 runtime and compiler sources. |
| | 215 | ## |
| | 216 | T2RCSOURCES = \ |
| | 217 | tads2/askf_tx.c \ |
| | 218 | tads2/bif.c \ |
| | 219 | tads2/bifgdum.c \ |
| | 220 | tads2/cmap.c \ |
| | 221 | tads2/cmd.c \ |
| | 222 | tads2/dat.c \ |
| | 223 | tads2/errmsg.c \ |
| | 224 | tads2/fio.c \ |
| | 225 | tads2/fioxor.c \ |
| | 226 | tads2/getstr.c \ |
| | 227 | tads2/indlg_tx.c \ |
| | 228 | tads2/ler.c \ |
| | 229 | tads2/lst.c \ |
| | 230 | tads2/mch.c \ |
| | 231 | tads2/mcm.c \ |
| | 232 | tads2/mcs.c \ |
| | 233 | tads2/obj.c \ |
| | 234 | tads2/oserr.c \ |
| | 235 | tads2/osgen3.c \ |
| | 236 | tads2/out.c \ |
| | 237 | tads2/output.c \ |
| | 238 | tads2/regex.c \ |
| | 239 | tads2/run.c \ |
| | 240 | tads2/suprun.c \ |
| | 241 | tads2/voc.c |
| | 242 | |
| | 243 | ## TADS 3 runtime and compiler sources. |
| | 244 | ## |
| | 245 | T3RCSOURCES = \ |
| | 246 | tads3/askf_tx3.cpp \ |
| | 247 | tads3/charmap.cpp \ |
| | 248 | tads3/derived/vmuni_cs.cpp \ |
| | 249 | tads3/indlg_tx3.cpp \ |
| | 250 | tads3/resldexe.cpp \ |
| | 251 | tads3/resload.cpp \ |
| | 252 | tads3/std.cpp \ |
| | 253 | tads3/utf8.cpp \ |
| | 254 | tads3/vmanonfn.cpp \ |
| | 255 | tads3/vmbif.cpp \ |
| | 256 | tads3/vmbifreg.cpp \ |
| | 257 | tads3/vmbift3.cpp \ |
| | 258 | tads3/vmbiftad.cpp \ |
| | 259 | tads3/vmbiftio.cpp \ |
| | 260 | tads3/vmbignum.cpp \ |
| | 261 | tads3/vmbt3_nd.cpp \ |
| | 262 | tads3/vmbytarr.cpp \ |
| | 263 | tads3/vmcfgmem.cpp \ |
| | 264 | tads3/vmcoll.cpp \ |
| | 265 | tads3/vmconhmp.cpp \ |
| | 266 | tads3/vmconmor.cpp \ |
| | 267 | tads3/vmconsol.cpp \ |
| | 268 | tads3/vmcrc.cpp \ |
| | 269 | tads3/vmcset.cpp \ |
| | 270 | tads3/vmdict.cpp \ |
| | 271 | tads3/vmerr.cpp \ |
| | 272 | tads3/vmerrmsg.cpp \ |
| | 273 | tads3/vmfile.cpp \ |
| | 274 | tads3/vmfilobj.cpp \ |
| | 275 | tads3/vmfunc.cpp \ |
| | 276 | tads3/vmglob.cpp \ |
| | 277 | tads3/vmgram.cpp \ |
| | 278 | tads3/vmhash.cpp \ |
| | 279 | tads3/vmhostsi.cpp \ |
| | 280 | tads3/vmhosttx.cpp \ |
| | 281 | tads3/vmimage.cpp \ |
| | 282 | tads3/vmimg_nd.cpp \ |
| | 283 | tads3/vmini_nd.cpp \ |
| | 284 | tads3/vminit.cpp \ |
| | 285 | tads3/vminitim.cpp \ |
| | 286 | tads3/vmintcls.cpp \ |
| | 287 | tads3/vmiter.cpp \ |
| | 288 | tads3/vmlookup.cpp \ |
| | 289 | tads3/vmlst.cpp \ |
| | 290 | tads3/vmmcreg.cpp \ |
| | 291 | tads3/vmmeta.cpp \ |
| | 292 | tads3/vmobj.cpp \ |
| | 293 | tads3/vmpat.cpp \ |
| | 294 | tads3/vmpool.cpp \ |
| | 295 | tads3/vmpoolim.cpp \ |
| | 296 | tads3/vmregex.cpp \ |
| | 297 | tads3/vmrun.cpp \ |
| | 298 | tads3/vmrunsym.cpp \ |
| | 299 | tads3/vmsave.cpp \ |
| | 300 | tads3/vmsort.cpp \ |
| | 301 | tads3/vmsortv.cpp \ |
| | 302 | tads3/vmsrcf.cpp \ |
| | 303 | tads3/vmstack.cpp \ |
| | 304 | tads3/vmstrcmp.cpp \ |
| | 305 | tads3/vmstr.cpp \ |
| | 306 | tads3/vmtobj.cpp \ |
| | 307 | tads3/vmtype.cpp \ |
| | 308 | tads3/vmtypedh.cpp \ |
| | 309 | tads3/vmundo.cpp \ |
| | 310 | tads3/vmvec.cpp |