cfad47cfa3/Common.am
Commiter: Nikos Chantziaras
Author: Nikos Chantziaras
Revision: cfad47cfa3
File Size: 8.04 KB
(June 01, 2009 20:54 UTC) Almost 3 years ago
Initial commit.
## This file contains Automake rules common to many executables. ## This will instruct automake to create object files in the same ## directory as the corresponding source files, rather than in the ## top-level directory. This is needed since some source files in tads2 ## and tads3 have the same name. Putting the object files in the same ## directory would cause the compiler to override some tads2 objects ## with tads3 objects of the same name. ## ## Note that this option requires the macro AM_PROG_CC_C_O to be used ## somewhere in configure.ac (since not all compilers can use the -c and ## -o options at the same time; different make-rules will be used if the ## compiler can't handle these options together). ## AUTOMAKE_OPTIONS = subdir-objects ## These macros configure various parts of the base code. ## ## FROBTADS ## Tells the base code to include our osfrobtads.h header. This ## must be used in all executables. ## ## VMGLOB_VARS ## Tells the T3VM to use individual external variables for the ## globals. This is the fastest configuration. (See tads3/vmglob.h ## for details.) ## ## VMGLOB_PARAM ## Used in debug-builds of TADS 3 instead of VMGLOB_VARS. ## ## VM_FLAT_POOL ## Tells the T3VM to use the "flat" pool manager. A flat pool is ## somewhat faster than the default paged pool normaly used by the ## VM, but lacks dynamic memory capabilites. The paged pool is only ## useful for debuggers though, so we choose a flat pool. (See ## tads3/vmpoolsl.h for details.) ## AM_CPPFLAGS = -DFROBTADS if T3_DEBUG_BUILD AM_CPPFLAGS += -DT3_DEBUG -DVMGLOB_PARAM else AM_CPPFLAGS += -DVMGLOB_VARS endif ## Not yet; causes some (minor) memory leaks. For now, only the paged ## pool is safe. ## AM_CPPFLAGS += -DVM_FLAT_POOL ## If the system is little-endian, define _M_IX86_64. If not, we'll ## define _M_PPC. The base code needs one of these macros defined, so ## that it can decide which version of some endian-dependent routines ## to use. ## ## Note that we define _M_IX86_64 instead of _M_IX86 even though the ## former is intended for 64-bit platforms. The reason is that ## _M_IX86_64 works correctly even for 32-bit systems but not for ## 16-bit systems. _M_IX86 works for 32-bit systems as well as for ## 16-bit systems but not for 64-bit systems. Since we're only ## interested in 32 and 64-bit systems and don't support 16-bit systems ## at all, _M_IX86_64 is what we need. ## ## _M_PPC tells the base code to use the PowerPC versions of the ## endian-related routines. Despite the name, the PowerPC versions of ## these routines are generic and useable by both big-endian as well as ## little-endian machines; they're just a little slower on x86 and ## x86-64 systems than the ones activated with _M_IX86(_64). ## if CPU_IS_BIGENDIAN AM_CPPFLAGS += -D_M_PPC else AM_CPPFLAGS += -D_M_IX86_64 endif ## If the user does not want the T2 VM to check for errors like stack ## overflows/underflows and such at runtime, define RUNFAST so that the ## base code disables these checks. ## if !T2_RUNTIME_CHECKING AM_CPPFLAGS += -DRUNFAST endif ## We need to tell the compiler where to find header files. We prepend ## the source directory in case we are building the package in a ## different directory than the one it has been unpacked into. ## AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/tads2 -I$(top_srcdir)/tads3 ## If the system lacks the wchar.h header, provide our own. ## if WCHAR_HEADER_MISSING AM_CPPFLAGS += -I$(top_srcdir)/src/wchar endif ## These are the paths of various TADS 3 data-files. We need to know ## about them at runtime, so we also define them as macros. ## T3_INC_DIR = $(pkgdatadir)/tads3/include T3_LIB_DIR = $(pkgdatadir)/tads3/lib T3_RES_DIR = $(pkgdatadir)/tads3/res AM_CPPFLAGS += -DT3_INC_DIR=\"$(T3_INC_DIR)\" -DT3_LIB_DIR=\"$(T3_LIB_DIR)\" -DT3_RES_DIR=\"$(T3_RES_DIR)\" ## This is not needed at runtime so we don't add it to AM_CPPFLAGS. ## T3_CHARMAP_DIR = $(T3_RES_DIR)/charmap ## The TADS 3 character mapping tables are needed by both the ## interpreter as well as the compiler. Automake allows us to install ## files only once though. Normally, we would write something like ## "if BUILD_INTERPRETER or BUILD_T3_COMPILER", but Automake only allows ## a single conditional in 'if' statements. ## if BUILD_INTERPRETER t3charmapdir = $(T3_CHARMAP_DIR) dist_t3charmap_DATA = tads3/charmap/cmaplib.t3r else !BUILD_INTERPRETER if BUILD_T3_COMPILER t3charmapdir = $(T3_CHARMAP_DIR) dist_t3charmap_DATA = tads3/charmap/cmaplib.t3r endif BUILD_T3_COMPILER endif !BUILD_INTERPRETER ## Tell Automake to include these files in the "make dist" (and friends) ## target. Note that files like AUTHORS, README, etc. are automatically ## included in the distribution only if they're in the ## top-level directory. Makefile fragments included from Makefile.am ## (such as this file) are also distributed automaticly. ## EXTRA_DIST = \ bootstrap \ doc/AUTHORS \ doc/BUGS \ doc/ChangeLog \ doc/COMPILERS \ doc/CONFIGURE_DOC \ doc/COPYING \ doc/INSTALL \ doc/MacOSX \ doc/NEWS \ doc/README \ doc/SRC_GUIDELINES \ doc/THANKS \ tads2/LICENSE.TXT \ tads2/portnote.txt \ tads2/tadsver.htm \ tads3/LICENSE.TXT \ tads3/portnote.htm \ tads3/README.TXT ## Sources needed by both the interpreter as well as the compilers. ## COMMONSOURCES = \ src/common.h \ src/missing.cc \ src/missing.h \ src/osbeos.h \ src/osdos.h \ src/osfrobtads.h \ src/osos2.h \ src/osportable.cc \ src/osunixt.h \ src/oswin.h \ src/wchar/wchar.h \ tads2/osifc.c \ tads2/osnoui.c \ tads2/osrestad.c ## TADS 2 runtime and compiler headers. ## T2RCHEADERS = \ tads2/appctx.h \ tads2/argize.h \ tads2/bif.h \ tads2/cmap.h \ tads2/cmd.h \ tads2/dat.h \ tads2/dbg.h \ tads2/emt.h \ tads2/err.h \ tads2/fio.h \ tads2/h_ix86_64.h \ tads2/h_ix86.h \ tads2/h_ppc.h \ tads2/ler.h \ tads2/lib.h \ tads2/linf.h \ tads2/lin.h \ tads2/lst.h \ tads2/mch.h \ tads2/mcl.h \ tads2/mcm.h \ tads2/mcs.h \ tads2/obj.h \ tads2/oem.h \ tads2/opc.h \ tads2/osbigmem.h \ tads2/osgen.h \ tads2/os.h \ tads2/osifc.h \ tads2/osifctyp.h \ tads2/ply.h \ tads2/prp.h \ tads2/prs.h \ tads2/regex.h \ tads2/res.h \ tads2/run.h \ tads2/std.h \ tads2/sup.h \ tads2/tio.h \ tads2/tok.h \ tads2/trd.h \ tads2/voc.h ## TADS 2 runtime and compiler sources. ## T2RCSOURCES = \ tads2/askf_tx.c \ tads2/bif.c \ tads2/bifgdum.c \ tads2/cmap.c \ tads2/cmd.c \ tads2/dat.c \ tads2/errmsg.c \ tads2/fio.c \ tads2/fioxor.c \ tads2/getstr.c \ tads2/indlg_tx.c \ tads2/ler.c \ tads2/lst.c \ tads2/mch.c \ tads2/mcm.c \ tads2/mcs.c \ tads2/obj.c \ tads2/oserr.c \ tads2/osgen3.c \ tads2/out.c \ tads2/output.c \ tads2/regex.c \ tads2/run.c \ tads2/suprun.c \ tads2/voc.c ## TADS 3 runtime and compiler sources. ## T3RCSOURCES = \ tads3/askf_tx3.cpp \ tads3/charmap.cpp \ tads3/derived/vmuni_cs.cpp \ tads3/indlg_tx3.cpp \ tads3/resldexe.cpp \ tads3/resload.cpp \ tads3/std.cpp \ tads3/utf8.cpp \ tads3/vmanonfn.cpp \ tads3/vmbif.cpp \ tads3/vmbifreg.cpp \ tads3/vmbift3.cpp \ tads3/vmbiftad.cpp \ tads3/vmbiftio.cpp \ tads3/vmbignum.cpp \ tads3/vmbt3_nd.cpp \ tads3/vmbytarr.cpp \ tads3/vmcfgmem.cpp \ tads3/vmcoll.cpp \ tads3/vmconhmp.cpp \ tads3/vmconmor.cpp \ tads3/vmconsol.cpp \ tads3/vmcrc.cpp \ tads3/vmcset.cpp \ tads3/vmdict.cpp \ tads3/vmerr.cpp \ tads3/vmerrmsg.cpp \ tads3/vmfile.cpp \ tads3/vmfilobj.cpp \ tads3/vmfunc.cpp \ tads3/vmglob.cpp \ tads3/vmgram.cpp \ tads3/vmhash.cpp \ tads3/vmhostsi.cpp \ tads3/vmhosttx.cpp \ tads3/vmimage.cpp \ tads3/vmimg_nd.cpp \ tads3/vmini_nd.cpp \ tads3/vminit.cpp \ tads3/vminitim.cpp \ tads3/vmintcls.cpp \ tads3/vmiter.cpp \ tads3/vmlookup.cpp \ tads3/vmlst.cpp \ tads3/vmmcreg.cpp \ tads3/vmmeta.cpp \ tads3/vmobj.cpp \ tads3/vmpat.cpp \ tads3/vmpool.cpp \ tads3/vmpoolim.cpp \ tads3/vmregex.cpp \ tads3/vmrun.cpp \ tads3/vmrunsym.cpp \ tads3/vmsave.cpp \ tads3/vmsort.cpp \ tads3/vmsortv.cpp \ tads3/vmsrcf.cpp \ tads3/vmstack.cpp \ tads3/vmstrcmp.cpp \ tads3/vmstr.cpp \ tads3/vmtobj.cpp \ tads3/vmtype.cpp \ tads3/vmtypedh.cpp \ tads3/vmundo.cpp \ tads3/vmvec.cpp |