1# Scheme 48 Makefile 2# Part of Scheme 48 1.9. See file COPYING for notices and license. 3 4# Authors: Richard Kelsey, Jonathan Rees, Marcus Crestani, 5# Robert Ransom, Michael Zabka, Harald Glab-Phlak, David Frese, 6# Thorsten Alteholz. 7 8# Documentation in files INSTALL and doc/install.txt 9 10SHELL = /bin/sh 11 12### Filled in by `configure' ### 13srcdir = @srcdir@ 14VPATH = @srcdir@ 15CC = @CC@ 16LD = @LD@ 17DEFS = @DEFS@ 18LIBS = @LIBS@ 19CFLAGS = @CFLAGS@ 20CPPFLAGS = @CPPFLAGS@ 21INSTALL = @INSTALL@ 22INSTALL_PROGRAM = @INSTALL_PROGRAM@ 23INSTALL_DATA = @INSTALL_DATA@ 24 25LDFLAGS = @LDFLAGS@ 26LDFLAGS_VM = @LDFLAGS_VM@ 27LIBOBJS = @LIBOBJS@ 28 29GC_OBJS = @GC_OBJS@ 30 31ADDITIONAL_EXTERNALS = @ADDITIONAL_EXTERNALS@ 32ADDITIONAL_EXTERNAL_OBJS = @ADDITIONAL_EXTERNAL_OBJS@ 33 34ASM_OBJECTS = @ASM_OBJECTS@ 35ASM_STYLE = @ASM_STYLE@ 36 37HOST_ARCHITECTURE = @host@ 38BIT_SUFFIX = @BIT_SUFFIX@ 39 40prefix = @prefix@ 41exec_prefix = @exec_prefix@ 42 43bindir = @bindir@ 44libdir = @libdir@ 45incdir = @includedir@ 46manext = 1 47mandir = @mandir@/man$(manext) 48docdir = @docdir@ 49datarootdir = @datarootdir@ 50datadir = @datadir@ 51 52DYNAMIC_EXTERNALS_CFLAGS=@DYNAMIC_EXTERNALS_CFLAGS@ 53DYNAMIC_EXTERNALS_LDFLAGS=@DYNAMIC_EXTERNALS_LDFLAGS@ 54DYNAMIC_EXTERNALS_LDFLAGS_IN_PLACE=@DYNAMIC_EXTERNALS_LDFLAGS_IN_PLACE@ 55### End of `configure' section### 56 57# HP 9000 series, if you don't have gcc 58# CC = cc 59# CFLAGS = -Aa -O +Obb1800 60# DEFS = -D_HPUX_SOURCE -Dhpux 61 62# Ultrix 63# LDFLAGS = -N 64 65COMPILING_ITSELF_DEFS = $(DEFS) -D__COMPILING_SCHEME48_ITSELF__ -DS48_HOST_ARCHITECTURE=\"$(HOST_ARCHITECTURE)\" 66 67.c.o: 68 $(CC) -c $(CPPFLAGS) $(COMPILING_ITSELF_DEFS) -I ./c -I$(srcdir)/c -I$(srcdir)/c/net -I$(srcdir)/c/bibop $(CFLAGS) -o $@ $< 69 70# You might want to change RUNNABLE to "s48" 71VERSION = 1.`cat $(srcdir)/build/minor-version-number` 72RUNNABLE = scheme48 73CONFIG_SCRIPT = scheme48-config 74MANPAGE = $(RUNNABLE).$(manext) 75LIB = $(libdir)/scheme48-$(VERSION) 76SHARE = $(datadir)/scheme48-$(VERSION) 77 78distdir = /tmp 79 80# If make barfs on this include line, just comment it out. It's only 81# really needed if you want to build the linker or rebuild initial.image. 82include $(srcdir)/build/filenames.make 83# 84#NetBSD make wants to see this instead: 85#.include "$(srcdir)/build/filenames.make" 86 87 88# Static linker: 89# 90# You only need the linker if you're going to make changes to the 91# things that go into the initial.image, which in general means the 92# files in rts/. If you decide you need to use the linker, then you 93# gots your choice; it can run in just about any version of Scheme 48 94# or Pseudoscheme. (It has also been made to run in Scheme->C.) It 95# doesn't matter a whole lot which Scheme you use as long as it's not 96# broken or unavailable. The two best choices are: 97# 98# 1. As below. 99# These settings requires you to already have a $(RUNNABLE) 100# command. This is desirable if you are making changes to the 101# system that might break scheme48vm and/or scheme48.image. But it 102# requires you to have squirreled away a previous working version 103# of scheme48. The settings assume a Unicode version; if you want 104# to use an installed non-Unicode-capable Scheme 48 (1.4 or earlier), 105# you need to use this setting: 106# LINKER_WRITEBYTE = ,load scheme/alt/write-byte.scm 107# 108# 2. LINKER_VM = ./$(VM) $(BIG_HEAP) 109# LINKER_RUNNABLE = $(LINKER_VM) -i $(IMAGE) 110# LINKER_WRITEBYTE = ,open (subset i/o (write-byte)) (subset ports (set-port-crlf?!)) 111# This builds the linker on the scheme48vm and scheme48.image 112# that are in the current directory. 113 114BIG_HEAP = -h 8000000 115LINKER_VM = $(RUNNABLE) $(BIG_HEAP) 116LINKER_RUNNABLE = $(LINKER_VM) 117LINKER_WRITEBYTE = ,open (subset i/o (write-byte)) (subset ports (set-port-crlf?!)) 118START_LINKER-32 = echo ',batch'; \ 119 echo ',bench on'; \ 120 echo ',open signals features code-quote'; \ 121 echo ',open bitwise ascii code-vectors'; \ 122 echo '$(LINKER_WRITEBYTE)'; \ 123 echo ',config ,load scheme/platform-interfaces.scm'; \ 124 echo ',config ,load scheme/rts-packages-32.scm'; \ 125 echo ',open platform'; \ 126 echo ',open cells record-types'; \ 127 echo ',load scheme/alt/low-exception.scm'; \ 128 echo ',load $(linker-files)'; \ 129 echo ',load scheme/alt/init-defpackage.scm' 130 131START_LINKER-64 = echo ',batch'; \ 132 echo ',bench on'; \ 133 echo ',open signals features code-quote'; \ 134 echo ',open bitwise ascii code-vectors'; \ 135 echo '$(LINKER_WRITEBYTE)'; \ 136 echo ',config ,load scheme/platform-interfaces.scm'; \ 137 echo ',config ,load scheme/rts-packages-64.scm'; \ 138 echo ',open platform'; \ 139 echo ',open cells record-types'; \ 140 echo ',load scheme/alt/low-exception.scm'; \ 141 echo ',load $(linker-files)'; \ 142 echo ',load scheme/alt/init-defpackage.scm' 143 144# -------------------- 145# You shouldn't have to change anything below this point. 146 147# Targets: 148 149IMAGE = scheme48.image 150INITIAL = $(srcdir)/build/initial.image 151VM = scheme48vm 152LIBSCHEME48 = c/libscheme48.a 153POSIX_EXTERNAL = c/posix.so 154SRFI_27_EXTERNAL = c/srfi-27.so 155FFI_TEST_EXTERNAL = c/ffi-test.so 156R6RS_EXTERNAL = c/r6rs.so 157EXTERNALS = $(POSIX_EXTERNAL) $(SRFI_27_EXTERNAL) $(FFI_TEST_EXTERNAL) $(ADDITIONAL_EXTERNALS) $(R6RS_EXTERNAL) 158UNIX_OBJS = c/unix/misc.o c/unix/io.o c/unix/fd-io.o c/unix/event.o c/unix/time.o 159OBJS = c/scheme48vm-$(BIT_SUFFIX).o \ 160 c/extension.o c/free.o c/double_to_string.o c/bignum.o c/ffi.o \ 161 c/external.o c/external-lib.o c/external-init.o c/init.o 162 163FAKEHS = c/fake/dlfcn.h c/fake/sigact.h c/fake/strerror.h \ 164 c/fake/sys-select.h c/fake/langinfo.h 165 166SCHEME48HS = c/scheme48.h c/scheme48arch.h c/scheme48write-barrier.h 167 168# Sources: 169 170CONFIG_FILES = scheme/interfaces.scm scheme/packages.scm \ 171 scheme/vm/shared-interfaces.scm \ 172 scheme/low-packages.scm scheme/rts-packages.scm \ 173 scheme/comp-packages.scm scheme/initial-packages.scm 174 175# Rules: 176 177.PHONY: enough all clean install man doc dist 178 179# The following is the first rule and therefore the "make" command's 180# default target. 181enough: Makefile vm $(LIBSCHEME48) $(IMAGE) script-interpreter go 182enough: $(EXTERNALS) 183 184Makefile: ${srcdir}/Makefile.in config.status 185 ./config.status 186 $(MAKE) clean 187 $(MAKE) 188 189# -------------------- 190# External code to include in the VM 191# After changing any of these you should delete `scheme48vm' and remake it. 192 193EXTERNAL_OBJECTS = c/net/socket.o c/net/address.o c/net/net.o c/unix/socket.o \ 194 c/unix/dynlink.o \ 195 c/unix/sysexits.o $(ASM_OBJECTS) \ 196 $(ADDITIONAL_EXTERNAL_OBJS) 197 198# POSIX rules; this could have its own Makefile, but I don't want to bother. 199 200posix_dir = c/posix 201 202CC_POSIX = $(CC) -c $(CPPFLAGS) $(DEFS) -I ./c -I$(srcdir)/c -I$(srcdir)/c/bibop $(CFLAGS) $(DYNAMIC_EXTERNALS_CFLAGS) -o $@ $< 203 204$(posix_dir)/user.o: c/posix/user.c \ 205 $(SCHEME48HS) c/c-mods.h $(posix_dir)/posix.h 206 $(CC_POSIX) 207 208$(posix_dir)/regexp.o: c/posix/regexp.c \ 209 $(SCHEME48HS) c/c-mods.h $(posix_dir)/posix.h 210 $(CC_POSIX) 211 212$(posix_dir)/proc-env.o: c/posix/proc-env.c \ 213 $(SCHEME48HS) c/c-mods.h $(posix_dir)/posix.h 214 $(CC_POSIX) 215 216$(posix_dir)/io.o: c/posix/io.c \ 217 $(SCHEME48HS) c/c-mods.h $(posix_dir)/posix.h 218 $(CC_POSIX) 219 220$(posix_dir)/proc.o: c/posix/proc.c \ 221 $(SCHEME48HS) c/c-mods.h \ 222 c/event.h $(posix_dir)/posix.h $(posix_dir)/s48_signals.h 223 $(CC_POSIX) 224 225$(posix_dir)/errno.o: c/posix/errno.c \ 226 $(SCHEME48HS) c/c-mods.h \ 227 c/event.h $(posix_dir)/posix.h $(posix_dir)/s48_errno.h 228 $(CC_POSIX) 229 230$(posix_dir)/syslog.o: c/posix/syslog.c \ 231 $(SCHEME48HS) 232 $(CC_POSIX) 233 234$(posix_dir)/posix.o: c/posix/posix.c 235 $(CC_POSIX) 236 237$(posix_dir)/dir.o: c/posix/dir.c \ 238 $(SCHEME48HS) c/scheme48heap.h c/c-mods.h \ 239 c/event.h c/fd-io.h $(posix_dir)/posix.h 240 $(CC_POSIX) 241 242$(posix_dir)/time.o: c/posix/time.c \ 243 $(SCHEME48HS) c/c-mods.h $(posix_dir)/posix.h 244 $(CC_POSIX) 245 246POSIX_OBJECTS = $(posix_dir)/user.o $(posix_dir)/regexp.o \ 247 $(posix_dir)/proc-env.o $(posix_dir)/proc.o \ 248 $(posix_dir)/io.o $(posix_dir)/dir.o \ 249 $(posix_dir)/posix.o $(posix_dir)/time.o \ 250 $(posix_dir)/errno.o $(posix_dir)/syslog.o 251 252$(POSIX_EXTERNAL) : $(POSIX_OBJECTS) 253 $(LD) -o $@ $(POSIX_OBJECTS) $(DYNAMIC_EXTERNALS_LDFLAGS_IN_PLACE) 254 255 256# End of POSIX rules 257 258# R6RS native support 259 260r6rs_dir = c/r6rs 261 262$(r6rs_dir)/ieee_bytevect.o: c/r6rs/ieee_bytevect.c \ 263 $(SCHEME48HS) 264 $(CC) -c $(CPPFLAGS) $(DEFS) -I ./c -I$(srcdir)/c -I$(srcdir)/c/bibop $(CFLAGS) $(DYNAMIC_EXTERNALS_CFLAGS) -o $@ $< 265 266$(r6rs_dir)/r6rs_externals.o: c/r6rs/r6rs_externals.c \ 267 $(SCHEME48HS) 268 $(CC) -c $(CPPFLAGS) $(DEFS) -I ./c -I$(srcdir)/c -I$(srcdir)/c/bibop $(CFLAGS) $(DYNAMIC_EXTERNALS_CFLAGS) -o $@ $< 269 270R6RS_OBJECTS = $(r6rs_dir)/ieee_bytevect.o $(r6rs_dir)/r6rs_externals.o 271 272$(R6RS_EXTERNAL) : $(R6RS_OBJECTS) 273 $(LD) -o $@ $(R6RS_OBJECTS) $(DYNAMIC_EXTERNALS_LDFLAGS_IN_PLACE) 274 275 276c/srfi-27.o: c/srfi-27.c $(SCHEME48HS) 277 $(CC) -c $(CPPFLAGS) $(DEFS) -I ./c -I$(srcdir)/c -I$(srcdir)/c/bibop $(CFLAGS) $(DYNAMIC_EXTERNALS_CFLAGS) -o $@ $< 278 279$(SRFI_27_EXTERNAL) : c/srfi-27.o 280 $(LD) -o $@ c/srfi-27.o $(DYNAMIC_EXTERNALS_LDFLAGS_IN_PLACE) 281 282 283c/ffi-test/ffi-test.o: c/ffi-test/ffi-test.c c/ffi-test/ffi-test.h $(SCHEME48HS) 284 $(CC) -c $(CPPFLAGS) $(DEFS) -I ./c -I$(srcdir)/c -I$(srcdir)/c/bibop $(CFLAGS) $(DYNAMIC_EXTERNALS_CFLAGS) -o $@ $< 285 286$(FFI_TEST_EXTERNAL) : c/ffi-test/ffi-test.o 287 $(LD) -o $@ c/ffi-test/ffi-test.o $(DYNAMIC_EXTERNALS_LDFLAGS_IN_PLACE) 288 289 290# Native-code glue rules 291 292# Fake definitions if there is no support for native code 293FAKE_ASM_OBJECTS = c/fake/glue.o 294 295# Real definitions to be used when a. native code works and b. it is supported 296# on the machine we're compiling on 297# Does currently not work because of the new GC infrastructure 298X86_ASM_OBJECTS = c/glue.o c/asm-glue.o 299 300# Assumes s48-compiler/ in the working directory 301 302c/glue.o: c/glue_$(ASM_STYLE).s 303 gcc -c -o $@ $< 304 305c/glue_$(ASM_STYLE).s: s48-compiler/assembler/x86/x86-glue.scm 306 (echo ',batch'; \ 307 echo ',open srfi-23'; \ 308 echo ',load $<'; \ 309 echo '(glue-code "$@" (quote $(ASM_STYLE)))'; \ 310 echo ',exit' \ 311 ) | $(RUNNABLE) 312# End of native-code glue rules 313 314# Two-space copier objects 315 316GC_TWOSPACE_OBJS = c/scheme48-twospace-heap-$(BIT_SUFFIX).o 317 318c/scheme48-twospace-heap-$(BIT_SUFFIX).o: c/prescheme.h c/scheme48vm.h c/scheme48heap.h \ 319 c/scheme48vm-prelude.h c/c-mods.h \ 320 c/event.h c/io.h c/fd-io.h 321 322# The BIBOP Garbage Collector 323GC_BIBOP_OBJS = c/scheme48-bibop-heap-$(BIT_SUFFIX).o \ 324 c/bibop/page_alloc.o c/bibop/memory_map.o c/bibop/areas.o \ 325 c/bibop/generation_gc.o c/bibop/find_all.o c/bibop/check_heap.o \ 326 c/bibop/utils.o c/bibop/area_roots.o c/bibop/remset.o 327 328bibop: $(GC_BIBOP_OBJS) 329 330c/scheme48-bibop-heap-$(BIT_SUFFIX).o: c/prescheme.h c/scheme48vm.h c/scheme48heap.h \ 331 c/scheme48vm-prelude.h \ 332 c/bibop/bibop.h \ 333 c/c-mods.h c/event.h c/io.h c/fd-io.h 334 335c/bibop/page_alloc.o: c/bibop/page_alloc.h c/bibop/page_constants.h \ 336 c/bibop/memory.h 337c/bibop/memory_map.o: c/bibop/memory_map.h c/bibop/utils.h \ 338 c/bibop/page_constants.h 339c/bibop/areas.o: c/bibop/areas.h c/bibop/page_constants.h c/bibop/utils.h \ 340 c/bibop/memory_map.h c/bibop/area_roots.h c/bibop/gc_config.h \ 341 c/bibop/remset.h 342c/bibop/generation_gc.o: c/bibop/generation_gc.h c/bibop/page_constants.h \ 343 c/bibop/areas.h c/bibop/memory.h c/bibop/data.h c/bibop/utils.h \ 344 c/bibop/memory_map.h c/bibop/check_heap.h c/bibop/area_roots.h \ 345 c/bibop/measure.h c/bibop/measure.ci \ 346 c/bibop/gc_config.h c/bibop/remset.h \ 347 $(SCHEME48HS) 348c/bibop/find_all.o: c/bibop/find_all.h c/bibop/generation_gc.h c/bibop/areas.h \ 349 c/bibop/data.h c/bibop/memory.h \ 350 $(SCHEME48HS) 351c/bibop/check_heap.o: c/bibop/check_heap.h c/scheme48.h c/bibop/generation_gc.h\ 352 c/bibop/utils.h c/bibop/data.h c/bibop/memory.h c/bibop/memory_map.h \ 353 $(SCHEME48HS) 354c/bibop/area_roots.o: c/bibop/area_roots.h c/bibop/areas.h c/bibop/memory.h \ 355 c/bibop/memory_map.h c/bibop/measure.h c/bibop/gc_config.h \ 356 c/bibop/remset.h 357c/bibop/remset.o: c/bibop/remset.h c/bibop/memory.h c/scheme48.h \ 358 c/bibop/utils.h c/bibop/data.h c/bibop/generation_gc.h \ 359 c/bibop/gc_config.h \ 360 $(SCHEME48HS) 361 362 363# End of BIBOP GC rules 364 365$(VM): c/main.o $(LIBSCHEME48) c/scheme48.exp c/scheme48.def 366 $(CC) $(LDFLAGS) $(LDFLAGS_VM) $(CFLAGS) $(CPPFLAGS) -o $@ c/main.o $(LIBSCHEME48) $(LIBS) 367 # Cygwin 368 if test -x /usr/bin/dlltool; then \ 369 dlltool --dllname $(VM).exe --output-lib $(VM).a --def $(srcdir)/c/scheme48.def; \ 370 fi 371 372$(LIBSCHEME48): $(OBJS) $(GC_OBJS) $(UNIX_OBJS) $(LIBOBJS) $(EXTERNAL_OBJECTS) 373 rm -f $@; \ 374 ar cq $@ $(OBJS) $(GC_OBJS) $(UNIX_OBJS) $(LIBOBJS) $(EXTERNAL_OBJECTS) 375 ranlib $@ 376 377script-interpreter: c/script-interpreter.o 378 $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -o $@ c/script-interpreter.o 379 380c/main.o: c/main.c c/scheme48vm.h c/scheme48heap.h 381 $(CC) -c $(CFLAGS) -o $@ \ 382 -DDEFAULT_IMAGE_NAME=\"$(LIB)/$(IMAGE)\" \ 383 $(CPPFLAGS) $(COMPILING_ITSELF_DEFS) $(srcdir)/c/main.c 384 385c/scheme48vm-$(BIT_SUFFIX).o: c/prescheme.h c/scheme48vm.h \ 386 c/scheme48heap.h \ 387 c/scheme48image.h c/bignum.h c/event.h \ 388 c/io.h c/fd-io.h \ 389 c/scheme48vm-prelude.h c/c-mods.h \ 390 $(SCHEME48HS) 391 392c/bignum.o: c/bignum.h c/bignumint.h $(SCHEME48HS) 393c/extension.o: c/sysdep.h $(FAKEHS) $(SCHEME48HS) c/scheme48vm.h 394c/free.o: c/sysdep.h 395c/ffi.o: c/ffi.h $(SCHEME48HS) 396c/external.o: c/sysdep.h $(FAKEHS) $(SCHEME48HS) c/c-mods.h c/ffi.h 397c/external-lib.o: $(SCHEME48HS) 398c/unix/event.o: c/sysdep.h $(FAKEHS) c/c-mods.h \ 399 c/scheme48vm.h c/scheme48heap.h \ 400 c/event.h c/fd-io.h \ 401 c/c-mods.h 402c/unix/fd-io.o: c/sysdep.h $(FAKEHS) c/c-mods.h \ 403 c/scheme48vm.h c/scheme48heap.h \ 404 c/event.h c/fd-io.h 405c/unix/misc.o: c/sysdep.h $(FAKEHS) 406c/unix/io.o: c/io.h 407 408c/net/address.o: $(SCHEME48HS) c/net/address.h 409c/net/socket.o: $(SCHEME48HS) c/net/address.h c/net/socket.h 410c/unix/socket.o: $(SCHEME48HS) c/net/address.h c/net/socket.h c/fd-io.h c/event.h 411c/net/net.o: $(SCHEME48HS) 412c/unix/dynlink.o: $(SCHEME48HS) 413 414c/script-interpreter.o: c/sysdep.h $(FAKEHS) c/script-interpreter.c 415 $(CC) -c $(CFLAGS) -o $@ \ 416 -DRUNNABLE=\"$(bindir)/$(RUNNABLE)\" \ 417 $(CPPFLAGS) $(DEFS) \ 418 -I ./c -I$(srcdir)/c \ 419 $(srcdir)/c/script-interpreter.c 420c/fake/strerror.o: c/fake/strerror.h 421c/fake/langinfo.o: c/fake/langinfo.h 422 423# -------------------- 424# Make scheme48.image from initial.image and library .scm files. 425# 426# For bootstrap reasons, initial.image is *not* listed as a source, 427# even though it really is. 428 429$(IMAGE): $(VM) scheme/env/init-defpackage.scm scheme/more-interfaces.scm \ 430 scheme/link-packages.scm \ 431 scheme/env-packages.scm \ 432 scheme/more-packages.scm \ 433 scheme/sort/interfaces.scm scheme/sort/packages.scm \ 434 scheme/r6rs/packages.scm \ 435 scheme/cml/interfaces.scm scheme/cml/packages.scm \ 436 scheme/net/packages.scm \ 437 scheme/posix/packages.scm scheme/srfi/packages.scm \ 438 $(usual-files) build/initial.debug build/build-usual-image 439 $(srcdir)/build/build-usual-image $(srcdir) \ 440 "`(cd $(srcdir) && pwd)`/scheme" "`pwd`/c" '$(IMAGE)' './$(VM)' \ 441 '$(INITIAL)-$(BIT_SUFFIX)' 442 443# -------------------- 444# Documentation 445 446MANUAL_SRC = doc/src/manual.tex doc/src/bibliography.tex \ 447 doc/src/bibliography.tex \ 448 doc/src/code.tex doc/src/command.tex doc/src/external.tex \ 449 doc/src/hacks.tex doc/src/intro.tex \ 450 doc/src/module.tex doc/src/myindex.tex \ 451 doc/src/posix.tex doc/src/proto.tex \ 452 doc/src/thread.tex doc/src/unicode.tex doc/src/user-guide.tex \ 453 doc/src/utilities.tex doc/src/version-number.tex doc/src/matter.sty \ 454 455doc/manual.pdf: $(MANUAL_SRC) 456 cd $(srcdir)/doc/src && pdflatex manual && \ 457 makeindex manual && \ 458 pdflatex manual && pdflatex manual 459 mv $(srcdir)/doc/src/manual.pdf $(srcdir)/doc 460 461doc/manual.ps: $(MANUAL_SRC) 462 cd $(srcdir)/doc/src && latex manual && \ 463 makeindex manual && \ 464 latex manual && latex manual && \ 465 dvips manual 466 mv $(srcdir)/doc/src/manual.ps $(srcdir)/doc 467 468doc/html/manual.html: doc/manual.pdf 469 cd $(srcdir)/doc/src && tex2page manual && tex2page manual && tex2page manual 470 471doc: doc/manual.pdf doc/manual.ps doc/html/manual.html 472 473install: install-no-doc install-doc 474 475install-no-doc: enough dirs 476# install the VM 477 $(INSTALL_PROGRAM) $(VM) $(DESTDIR)$(LIB) 478 if test -e $(VM).a; then $(INSTALL_PROGRAM) $(VM).a $(DESTDIR)$(LIB); fi 479# build and install the image 480 rm -f '/tmp/$(IMAGE)' 481 $(srcdir)/build/build-usual-image $(srcdir) "$(SHARE)" "$(LIB)" \ 482 "/tmp/$(IMAGE)" "./$(VM)" "$(INITIAL)-$(BIT_SUFFIX)" 483 $(INSTALL_DATA) /tmp/$(IMAGE) $(DESTDIR)$(LIB) 484 rm /tmp/$(IMAGE) 485# install the man pages 486 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir) 487 sed 's=LBIN=$(bindir)=g' $(srcdir)/doc/scheme48.man | \ 488 sed "s=LLIB=$(LIB)=g" | \ 489 sed "s=LS48=$(RUNNABLE)=g" >$(MANPAGE) 490 $(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(mandir) 491 rm $(MANPAGE) 492# install the include files 493 $(INSTALL_DATA) $(srcdir)/c/scheme48.h $(DESTDIR)$(incdir) 494 $(INSTALL_DATA) c/scheme48arch.h $(DESTDIR)$(incdir) 495 $(INSTALL_DATA) $(srcdir)/c/scheme48write-barrier.h $(DESTDIR)$(incdir) 496 $(INSTALL_DATA) $(srcdir)/c/scheme48.exp $(DESTDIR)$(incdir) 497 $(INSTALL_DATA) $(srcdir)/c/scheme48.def $(DESTDIR)$(incdir) 498 $(INSTALL_DATA) $(srcdir)/c/scheme48-external.exp $(DESTDIR)$(incdir) 499# install Scheme source files 500 for stub in env big sort opt misc link posix net cml srfi r6rs; do \ 501 for f in $(srcdir)/scheme/$$stub/*.scm; do \ 502 $(INSTALL_DATA) $$f $(DESTDIR)$(SHARE)/$$stub || exit 1; \ 503 done; \ 504 done 505 for f in $(srcdir)/scheme/rts/*num.scm \ 506 $(srcdir)/scheme/rts/jar-defrecord.scm; do \ 507 $(INSTALL_DATA) $$f $(DESTDIR)$(SHARE)/rts || exit 1; \ 508 done 509# install the scheme48 script 510 script=$(DESTDIR)$(bindir)/$(RUNNABLE) && \ 511 LIB=$(LIB) && \ 512 echo "#!/bin/sh" >$$script && \ 513 echo >>$$script && \ 514 echo "lib=$$LIB" >>$$script && \ 515 echo 'exec $$lib/$(VM) -i $$lib/$(IMAGE) "$$@"' \ 516 >>$$script && \ 517 chmod +x $$script 518# install the script interpreter front end 519 for dialect in r5rs srfi-7; do \ 520 $(INSTALL_PROGRAM) script-interpreter \ 521 $(DESTDIR)$(bindir)/scheme-$$dialect; \ 522 done 523# install the scheme48-config script 524 config_script=$(DESTDIR)$(bindir)/$(CONFIG_SCRIPT) && \ 525 sed -e 's,@incdir\@,$(incdir),g' \ 526 -e 's,@libdir\@,$(libdir),g' \ 527 -e 's,@CC\@,$(CC),g' \ 528 -e 's,@LD\@,$(LD),g' \ 529 -e 's?@DYNAMIC_EXTERNALS_CFLAGS\@?$(DYNAMIC_EXTERNALS_CFLAGS)?g' \ 530 -e 's?@DYNAMIC_EXTERNALS_LDFLAGS\@?$(DYNAMIC_EXTERNALS_LDFLAGS)?g' \ 531 < $(srcdir)/build/$(CONFIG_SCRIPT).in > $$config_script && \ 532 chmod +x $$config_script 533# install the external modules 534 $(INSTALL_PROGRAM) $(EXTERNALS) $(DESTDIR)$(LIB)/ 535# install the documentation 536 $(srcdir)/mkinstalldirs $(DESTDIR)$(docdir) 537 538install-doc: dirs doc 539 $(srcdir)/mkinstalldirs $(DESTDIR)$(docdir) 540 $(INSTALL_DATA) $(srcdir)/doc/manual.pdf $(DESTDIR)$(docdir) 541 $(INSTALL_DATA) $(srcdir)/doc/manual.ps $(DESTDIR)$(docdir) 542 for f in $(srcdir)/doc/html/*; do \ 543 $(INSTALL_DATA) $$f $(DESTDIR)$(docdir) || exit 1; \ 544 done 545 546# Script to run scheme48 in this directory. 547go: 548 echo '#!/bin/sh' >$@ && \ 549 echo >>$@ && \ 550 echo "lib=\"`pwd`\"" >>$@ && \ 551 echo 'exec "$$lib"/$(VM) -i "$$lib"/$(IMAGE) "$$@"' \ 552 >>$@ && \ 553 chmod +x $@ 554 555# Exports file for AIX and Cygwin 556 557CAT_EXPORTS = cat $(srcdir)/c/scheme48.h $(srcdir)/c/fd-io.h $(srcdir)/c/event.h $(srcdir)/c/bibop/*.h | egrep '^S48_EXTERN' | sed 's,^S48_EXTERN.*\(s48_[a-zA-Z0-9_ ]*\)(.*$$,\1,' | sed 's,^S48_EXTERN.*\(ps_[a-zA-Z0-9_ ]*\)(.*$$,\1,' | sed 's,^S48_EXTERN.*\(s48_[a-zA-Z0-9_ ]*\).*$$,\1,' 558 559c/scheme48.exp: c/scheme48.h c/fd-io.h c/event.h 560 echo '#!..' > $(srcdir)/c/scheme48.exp && \ 561 $(CAT_EXPORTS) >> $(srcdir)/c/scheme48.exp 562 563c/scheme48.def: c/scheme48.h c/fd-io.h c/event.h 564 echo 'EXPORTS' > $(srcdir)/c/scheme48.def && \ 565 $(CAT_EXPORTS) >> $(srcdir)/c/scheme48.def 566 567dirs: 568 for dir in $(libdir) $(bindir) $(incdir) $(datadir); do \ 569 $(srcdir)/mkinstalldirs $(DESTDIR)$$dir || exit 1; \ 570 done 571 $(srcdir)/mkinstalldirs $(DESTDIR)$(LIB) 572 for dir in rts env big sort opt misc link posix net cml srfi r6rs; do \ 573 $(srcdir)/mkinstalldirs $(DESTDIR)$(SHARE)/$$dir || exit 1; \ 574 done 575 576configure: configure.in 577 ACLOCAL="aclocal -I m4" autoreconf -v -i 578 579clean: 580 -rm -f $(VM) script-interpreter \ 581 *.o c/unix/*.o c/posix/*.o c/net/*.o c/*.o \ 582 $(EXTERNALS) \ 583 c/fake/*.o c/bibop/*.o \ 584 c/*.a c/glue_gnu.s c/glue_darwin.s c/scheme48.exp \ 585 TAGS $(IMAGE) \ 586 $(srcdir)/build/*.tmp $(srcdir)/$(MANPAGE) \ 587 $(srcdir)/scheme/debug/*.image \ 588 $(srcdir)/scheme/debug/*.debug \ 589 $(srcdir)/scheme/vm/scheme48vm-??.c \ 590 $(srcdir)/scheme/vm/scheme48*heap-??.c \ 591 go $(distname) 592 593distclean: clean 594 rm -f Makefile config.log config.status config-cache \ 595 c/sysdep.h c/scheme48arch.h 596 597check: $(EXTERNALS) 598check: $(VM) $(IMAGE) scheme/debug/check.scm 599 ( \ 600 echo ',batch'; \ 601 echo ',exec ,load =scheme48/debug/check.scm'; \ 602 echo ',config ,load =scheme48/test-packages.scm'; \ 603 echo ',open base-test'; \ 604 echo ',open big-test'; \ 605 echo ',open sockets-test'; \ 606 echo ',open os-time-test'; \ 607 echo ',open tconc-queue-test'; \ 608 echo ',open transport-link-cell-test'; \ 609 echo ',open tlc-table-test'; \ 610 echo ',open env-test'; \ 611 echo ',config ,load =scheme48/sort/test-packages.scm'; \ 612 echo ',open sort-test'; \ 613 echo ',config ,load =scheme48/misc/packages.scm'; \ 614 echo ',config ,load =scheme48/misc/test-packages.scm'; \ 615 echo ',open misc-test'; \ 616 echo ',config ,load =scheme48/r6rs/test-packages.scm'; \ 617 echo ',open r6rs-test'; \ 618 echo ',config ,load =scheme48/cml/test-packages.scm'; \ 619 echo ',open cml-test'; \ 620 echo ',config ,load =scheme48/srfi/test-packages.scm'; \ 621 echo ',open srfi-test'; \ 622 echo ',config ,load =scheme48/posix/test-packages.scm'; \ 623 echo ',open posix-test'; \ 624 echo ',config ,load =scheme48/ffi-test/test-packages.scm'; \ 625 echo ',open ffi-test'; \ 626 echo ',open test-suites'; \ 627 echo '(define-test-suite all-tests (compiler-tests base-tests big-tests tcp-sockets-tests tconc-queue-tests transport-link-cell-tests tlc-table-tests tlc-table-weak-tests tlc-table-string-tests os-time-tests sort-tests misc-tests env-tests r6rs-tests cml-tests srfi-tests posix-tests ffi-tests))'; \ 628 echo '(run-test-suite all-tests)' \ 629 ) | ./$(VM) -i $(IMAGE) $(BIG_HEAP) 630 631# -------------------- 632# Rules from here on down are not essential for the basic installation 633# procedure. 634 635all: vm image $(LIBSCHEME48) script-interpreter go doc 636libscheme48: $(LIBSCHEME48) 637vm: $(VM) 638image: $(INITIAL)-$(BIT_SUFFIX) 639 $(MAKE) $(IMAGE) 640test: check 641 642tags: 643 find . -name "*.scm" -o -name "*.c" -o -name "*.h" | etags - 644 645# -------------------- 646# Distribution... 647 648# DISTFILES should include all sources. 649DISTFILES = README COPYING.rtf COPYING INSTALL WINDOWS.txt \ 650 configure configure.in config.sub config.guess \ 651 Makefile.in \ 652 scheme48.sln scheme48.vcxproj \ 653 srfi-27.vcxproj r6rs.vcxproj \ 654 ffi-test.vcxproj \ 655 mkinstalldirs install-sh \ 656 doc/*.ps doc/*.pdf doc/*.txt \ 657 doc/html/*.html doc/html/*.css doc/html/*.gif \ 658 doc/src/*.tex doc/src/*.sty doc/src/*.scm \ 659 doc/scheme48.man \ 660 emacs/README \ 661 build/*.scm build/*-version-number build/*.exec \ 662 build/*.lisp build/build-usual-image build/filenames.make \ 663 build/initial.debug \ 664 build/initial.image-32 build/initial.image-64 \ 665 build/*.bat build/*.sh build/*.rc \ 666 build/UnicodeData.txt build/PropList.txt \ 667 build/SpecialCasing.txt build/CaseFolding.txt \ 668 build/CompositionExclusions.txt \ 669 build/dummy build/*.wxs build/*.ico \ 670 build/scheme48-config.in \ 671 c/*.[ch] c/*/*.[ch] c/*/*.ci c/*.exp c/*.def \ 672 c/scheme48.h.in \ 673 c/scheme48write-barrier.h c/scheme48arch.h.in \ 674 c/sysdep.h.in \ 675 emacs/*.el gdbinit \ 676 scheme/*.scm scheme/*/*.scm scheme/vm/*/*.scm \ 677 ps-compiler/minor-version-number \ 678 ps-compiler/doc/node.txt ps-compiler/doc/todo.txt \ 679 ps-compiler/*.scm ps-compiler/*/*.scm \ 680 ps-compiler/prescheme/primop/*.scm \ 681 ps-compiler/prescheme/test/*.scm 682 683distname = scheme48-$(VERSION) 684 685dist: build/initial.image-32 build/initial.image-64 c/scheme48.h 686 distname=$(distname) && \ 687 distfile=$(distdir)/$$distname.tgz && \ 688 if [ -d $(distdir) ] && \ 689 [ -w $$distfile -o -w $(distdir) ]; then \ 690 cd $(srcdir) && \ 691 rm -f $$distname && \ 692 ln -s . $$distname && \ 693 files='' && \ 694 for i in $(DISTFILES); do \ 695 if [ "$$i" != "c/sysdep.h" -a "$$i" != "c/scheme48arch.h" ]; then \ 696 files="$$files $$distname/$$i"; \ 697 fi \ 698 done && \ 699 tar -cf - $$files | \ 700 gzip --best >$$distfile && \ 701 rm $$distname; \ 702 else \ 703 echo "Can't write $$distfile" >&2; \ 704 exit 1; \ 705 fi 706 707# Increment the minor version number 708inc: 709 f=build/minor-version-number && \ 710 expr `cat $$f` + 1 >$$f.tmp && \ 711 mv $$f.tmp $$f && \ 712 cp $$f doc/src/version-number.tex && \ 713 echo '(define version-info "1.'`cat $$f`'")' \ 714 >scheme/env/version-info.scm 715 716 717# -------------------- 718# Generate build/filenames.make from *packages.scm 719# 720# This hack traces the module dependencies described in the 721# various configuration files and converts them into dependency lists 722# that "make" can use for its purposes. 723# 724# Since the distribution comes with a filenames.make, this rule 725# shouldn't be invoked for simple installations. But it will be used 726# if you change any of the *-packages.scm files. 727# 728# You can actually run the forms in extract-filenames.scm in any Scheme 729# implementation that has syntax-rules and explicit-renaming low-level 730# macros (e.g., most versions of Scheme 48 and Pseudoscheme). 731# If there are errors running this script, and you need to debug, 732# don't use the initial.image, use something that has a reasonable 733# environment. 734# 735# If this fails and you don't feel like debugging or fixing the problem, 736# try "touch filenames.make" and hope for the best. 737 738PACKAGES=scheme/packages.scm scheme/rts-packages.scm scheme/alt-packages.scm \ 739 scheme/comp-packages.scm scheme/initial-packages.scm \ 740 scheme/link-packages.scm \ 741 scheme/env-packages.scm \ 742 scheme/sort/packages.scm scheme/more-packages.scm \ 743 scheme/cml/packages.scm scheme/r6rs/packages.scm 744 745$(srcdir)/build/filenames.make: $(PACKAGES) build/extract-filenames.scm 746# uncomment this if you activate the line below: 747# $(MAKE) $(VM) PACKAGES= 748 cd $(srcdir) && \ 749 $(RUNNABLE) -a batch <build/extract-filenames.scm 750# or: ./$(VM) -i $(srcdir)/$(INITIAL)-$(BIT_SUFFIX) -a batch <build/extract-filenames.scm 751 752 753# -------------------- 754# Static linker 755# 756# The linker is capable of rebuilding an image from sources, even 757# across an incompatible change in VM data representations. 758 759# Bootstrap from Lucid Common Lisp: (last tested with 760# Pseudoscheme 2.9 and Scheme 48 version 0.19) 761 762PSEUDODIR = ../pseudo 763 764link/linker-in-lucid: build/lucid-script.lisp $(linker-files) \ 765 scheme/alt/pseudoscheme-features.scm \ 766 scheme/alt/pseudoscheme-record.scm 767 (echo \(defvar pseudoscheme-directory \"$(PSEUDODIR)/\"\); \ 768 cat build/lucid-script.lisp; \ 769 echo \(dump-linker\) \(lcl:quit\)) \ 770 | lisp 771 772# -------------------- 773# Initial image 774# 775# The initial.image is built by the static linker. The image contains 776# Scheme, the byte-code compiler, and a minimal command processor, but 777# no debugging environment to speak of. 778 779$(INITIAL)-32: $(CONFIG_FILES) build/initial.scm \ 780 scheme/platform-interfaces.scm scheme/rts-packages-32.scm \ 781 scheme/alt/low-exception.scm \ 782 scheme/alt/init-defpackage.scm \ 783 $(initial-files) $(linker-files) 784 cd $(srcdir) && \ 785 ($(START_LINKER-32); \ 786 echo '(load-configuration "scheme/platform-interfaces.scm")'; \ 787 echo '(load-configuration "scheme/rts-packages-32.scm")'; \ 788 echo '(load-configuration "scheme/interfaces.scm")'; \ 789 echo '(load-configuration "scheme/vm/shared-interfaces.scm")'; \ 790 echo '(load-configuration "scheme/packages.scm")'; \ 791 echo '(flatload initial-structures)'; \ 792 echo '(load "build/initial.scm")'; \ 793 echo '(link-initial-system)' \ 794 ) | $(LINKER_RUNNABLE) 795 mv $(INITIAL) $@ 796 797$(INITIAL)-64: $(CONFIG_FILES) build/initial.scm \ 798 scheme/platform-interfaces.scm scheme/rts-packages-64.scm \ 799 scheme/alt/low-exception.scm \ 800 scheme/alt/init-defpackage.scm \ 801 $(initial-files) $(linker-files) 802 cd $(srcdir) && \ 803 ($(START_LINKER-64); \ 804 echo '(load-configuration "scheme/platform-interfaces.scm")'; \ 805 echo '(load-configuration "scheme/rts-packages-64.scm")'; \ 806 echo '(load-configuration "scheme/interfaces.scm")'; \ 807 echo '(load-configuration "scheme/vm/shared-interfaces.scm")'; \ 808 echo '(load-configuration "scheme/packages.scm")'; \ 809 echo '(flatload initial-structures)'; \ 810 echo '(load "build/initial.scm")'; \ 811 echo '(link-initial-system)' \ 812 ) | $(LINKER_RUNNABLE) 813 mv $(INITIAL) $@ 814 815# -------------------- 816# Various small images for debugging low-level changes 817 818LOAD_DEBUG = \ 819 $(START_LINKER-32); \ 820 echo \(load-configuration \"scheme/interfaces.scm\"\); \ 821 echo \(load-configuration \"scheme/packages.scm\"\); \ 822 echo \(load-configuration \"scheme/vm/shared-interfaces.scm\"\); \ 823 echo \(flatload debug-structures\) 824 825scheme/debug/tiny.image: scheme/debug/tiny-packages.scm \ 826 scheme/debug/tiny.scm 827 cd $(srcdir) && \ 828 ($(START_LINKER-32); \ 829 echo \(load-configuration \"scheme/debug/tiny-packages.scm\"\); \ 830 echo \(link-simple-system \'\(scheme/debug tiny\) \'start tiny-system\)) \ 831 | $(LINKER_RUNNABLE) 832 833scheme/debug/low-test.image: scheme/debug/low-test-packages.scm \ 834 scheme/debug/low-test.scm 835 cd $(srcdir) && \ 836 ($(START_LINKER-32); \ 837 echo \(load-configuration \"scheme/debug/low-test-packages.scm\"\); \ 838 echo \(link-simple-system \'\(scheme/debug low-test\) \'start low-test-system\)) \ 839 | $(LINKER_RUNNABLE) 840 841scheme/debug/bignum-test.image: scheme/debug/low-test-packages.scm \ 842 scheme/debug/bignum-test.scm 843 cd $(srcdir) && \ 844 ($(START_LINKER-32); \ 845 echo \(load-configuration \"scheme/debug/low-test-packages.scm\"\); \ 846 echo \(link-simple-system \'\(scheme/debug bignum-test\) \'start bignum-test-system\)) \ 847 | $(LINKER_RUNNABLE) 848 849scheme/debug/little.image: $(CONFIG_FILES) scheme/debug-packages.scm 850 cd $(srcdir) && \ 851 ($(LOAD_DEBUG); echo \(link-little-system\)) \ 852 | $(LINKER_RUNNABLE) 853 854scheme/debug/mini.image: $(CONFIG_FILES) 855 cd $(srcdir) && \ 856 ($(LOAD_DEBUG); echo \(link-mini-system\)) \ 857 | $(LINKER_RUNNABLE) 858 859scheme/debug/medium.image: $(CONFIG_FILES) 860 cd $(srcdir) && \ 861 ($(LOAD_DEBUG); echo \(flatload compiler-structures\); \ 862 echo \(link-medium-system\)) \ 863 | $(LINKER_RUNNABLE) 864 865# The following have not been updated for the new directory organization 866 867c/smain.o: c/main.c 868 $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) -DSTATIC_AREAS -o $@ $(srcdir)/c/main.c 869 870mini: mini-heap.o smain.o 871 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ c/smain.o mini-heap.o $(OBJS) $(LIBS) 872 873mini-heap.o: mini-heap.c 874 $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) -o $@ $(srcdir)/mini-heap.c 875 876mini-heap.c: scheme/debug/mini1.image 877 (echo ,exec ,load misc/load-static.scm; \ 878 echo \(do-it 150000 \"$(srcdir)/scheme/debug/mini1.image\" \"$@\"\)) \ 879 | $(RUNNABLE) -h 3000000 -a batch 880 881scheme/debug/mini1.image: $(VM) scheme/debug/mini.image 882 echo "(write-image \"scheme/debug/mini1.image\" \ 883 (usual-resumer (lambda (args) \ 884 (command-processor #f args))) \ 885 \"foo\")" \ 886 | ./$(VM) -i scheme/debug/mini.image -a batch 887 888 889# -------------------- 890# Generate unicode-info.scm, srfi-14-base-char-set.scm, and unicode-normalization-info 891# from UnicodeData.txt 892# Get fresh UnicodeData.txt from http://www.unicode.org. 893 894scheme/rts/syntax-info.scm: build/UnicodeData.txt \ 895 build/PropList.txt \ 896 build/SpecialCasing.txt \ 897 build/CaseFolding.txt \ 898 build/CompositionExclusions.txt \ 899 scheme/link/unicode-data.scm \ 900 scheme/env/unicode-category.scm \ 901 scheme/big/compact-table.scm 902 cd $(srcdir) && \ 903 (echo ',batch'; \ 904 echo ',config ,load scheme/link/unicode-data-packages.scm'; \ 905 echo ",in unicode-data (create-unicode-tables \"build/UnicodeData.txt\" \"build/PropList.txt\" \"build/SpecialCasing.txt\" \"build/CaseFolding.txt\" \"build/CompositionExclusions.txt\" \"scheme/env/unicode-info.scm\" \"scheme/rts/syntax-info.scm\" \"scheme/big/unicode-normalization-info.scm\" \"scheme/srfi/srfi-14-base-char-sets.scm\")" \ 906 ) | $(RUNNABLE) -h 6000000 907 908# -------------------- 909# Generate scheme48.h from VM sources 910 911c/scheme48.h: c/scheme48.h.in scheme/vm/interp/arch.scm \ 912 scheme/vm/data/data.scm scheme/link/generate-c-header.scm 913 cd $(srcdir) && \ 914 (echo ',bench'; \ 915 echo ',batch'; \ 916 echo ',load-package big-scheme'; \ 917 echo ',open big-scheme'; \ 918 echo ',load scheme/link/generate-c-header.scm'; \ 919 echo "(make-c-header-file \"$@\" \ 920 \"c/scheme48.h.in\" \ 921 \"scheme/vm/interp/arch.scm\" \ 922 \"scheme/vm/data/data.scm\" \ 923 \"scheme/rts/record.scm\")" \ 924 ) | $(RUNNABLE) 925 926# An old version of the above for legacy code. 927 928c/old-scheme48.h: scheme/vm/interp/arch.scm scheme/vm/data/data.scm \ 929 scheme/link/generate-old-c-header.scm 930 (echo ',bench'; \ 931 echo ',batch'; \ 932 echo ',load-package big-scheme'; \ 933 echo ',open big-scheme'; \ 934 echo ',load scheme/link/generate-old-c-header.scm'; \ 935 echo "(make-c-header-file \"$@\" \ 936 \"$(srcdir)/scheme/vm/interp/arch.scm\" \ 937 \"$(srcdir)/scheme/vm/data/data.scm\")" \ 938 ) | $(RUNNABLE) 939 940# Generate VM and GC from VM sources. 941# Never called automatically. Do not use unless you are sure you 942# know what you are doing. 943# Afterwards, you should probably make c/scheme48.h. 944 945i-know-what-i-am-doing: \ 946 compile-vm-32 compile-twospace-gc-32 compile-bibop-gc-32 \ 947 compile-vm-64 compile-twospace-gc-64 compile-bibop-gc-64 948 949# compiles VM without GC 950 951compile-vm-32: 952 cd $(srcdir)/ps-compiler && \ 953 (echo ',batch'; \ 954 echo ',config ,load ../scheme/platform-interfaces.scm'; \ 955 echo ',config ,load ../scheme/rts-packages-32.scm'; \ 956 echo ',config ,load ../scheme/prescheme/interface.scm'; \ 957 echo ',config ,load ../scheme/prescheme/package-defs.scm'; \ 958 echo ',exec ,load load-ps-compiler.scm'; \ 959 echo ',exec ,load compile-vm-no-gc-32.scm'; \ 960 echo ',exit' \ 961 ) | $(RUNNABLE) -h 12000000 && \ 962 mv ../scheme/vm/scheme48vm-32.c ../c 963 964compile-vm-64: 965 cd $(srcdir)/ps-compiler && \ 966 (echo ',batch'; \ 967 echo ',config ,load ../scheme/platform-interfaces.scm'; \ 968 echo ',config ,load ../scheme/rts-packages-64.scm'; \ 969 echo ',config ,load ../scheme/prescheme/interface.scm'; \ 970 echo ',config ,load ../scheme/prescheme/package-defs.scm'; \ 971 echo ',exec ,load load-ps-compiler.scm'; \ 972 echo ',exec ,load compile-vm-no-gc-64.scm'; \ 973 echo ',exit' \ 974 ) | $(RUNNABLE) -h 12000000 && \ 975 mv ../scheme/vm/scheme48vm-64.c ../c 976 977# compiles the two-space copier GC 978 979compile-twospace-gc-32: 980 cd $(srcdir)/ps-compiler && \ 981 (echo ',batch'; \ 982 echo ',config ,load ../scheme/platform-interfaces.scm'; \ 983 echo ',config ,load ../scheme/rts-packages-32.scm'; \ 984 echo ',config ,load ../scheme/prescheme/interface.scm'; \ 985 echo ',config ,load ../scheme/prescheme/package-defs.scm'; \ 986 echo ',exec ,load load-ps-compiler.scm'; \ 987 echo ',exec ,load compile-twospace-gc-32.scm'; \ 988 echo ',exit' \ 989 ) | $(RUNNABLE) -h 8000000 && \ 990 mv ../scheme/vm/scheme48-twospace-heap-32.c ../c 991 992compile-twospace-gc-64: 993 cd $(srcdir)/ps-compiler && \ 994 (echo ',batch'; \ 995 echo ',config ,load ../scheme/platform-interfaces.scm'; \ 996 echo ',config ,load ../scheme/rts-packages-64.scm'; \ 997 echo ',config ,load ../scheme/prescheme/interface.scm'; \ 998 echo ',config ,load ../scheme/prescheme/package-defs.scm'; \ 999 echo ',exec ,load load-ps-compiler.scm'; \ 1000 echo ',exec ,load compile-twospace-gc-64.scm'; \ 1001 echo ',exit' \ 1002 ) | $(RUNNABLE) -h 8000000 && \ 1003 mv ../scheme/vm/scheme48-twospace-heap-64.c ../c 1004 1005# compiles the BIBOP GC 1006 1007compile-bibop-gc-32: 1008 cd $(srcdir)/ps-compiler && \ 1009 (echo ',batch'; \ 1010 echo ',config ,load ../scheme/platform-interfaces.scm'; \ 1011 echo ',config ,load ../scheme/rts-packages-32.scm'; \ 1012 echo ',config ,load ../scheme/prescheme/interface.scm'; \ 1013 echo ',config ,load ../scheme/prescheme/package-defs.scm'; \ 1014 echo ',exec ,load load-ps-compiler.scm'; \ 1015 echo ',exec ,load compile-bibop-gc-32.scm'; \ 1016 echo ',exit' \ 1017 ) | $(RUNNABLE) -h 8000000 && \ 1018 mv ../scheme/vm/scheme48-bibop-heap-32.c ../c 1019 1020compile-bibop-gc-64: 1021 cd $(srcdir)/ps-compiler && \ 1022 (echo ',batch'; \ 1023 echo ',config ,load ../scheme/platform-interfaces.scm'; \ 1024 echo ',config ,load ../scheme/rts-packages-64.scm'; \ 1025 echo ',config ,load ../scheme/prescheme/interface.scm'; \ 1026 echo ',config ,load ../scheme/prescheme/package-defs.scm'; \ 1027 echo ',exec ,load load-ps-compiler.scm'; \ 1028 echo ',exec ,load compile-bibop-gc-64.scm'; \ 1029 echo ',exit' \ 1030 ) | $(RUNNABLE) -h 8000000 && \ 1031 mv ../scheme/vm/scheme48-bibop-heap-64.c ../c 1032