
MODULES = \
  platform-specific-impl \
  basic-math \
  bitwise-arithmetic \
  complex \
  console-io \
  core \
  core-forms \
  dynamic-list \
  goops-classes \
  hash-table \
  hash-table2 \
  iterator \
  list-utilities \
  math \
  matrix \
  nonpure-iterator \
  object-string-conversion \
  promise \
  rational \
  real-math \
  singleton \
  stream \
  string-utilities \
  text-file-io \
  statprof \
  system

if EXTRA_MATH
  MODULES += extra-math
endif

if POSIX_MATH
  MODULES += posix-math
endif

INTERFACE_TARGET = $(MODULES:%=%.tci)
BODY_TARGET = $(MODULES:%=%.tcb)

EXTRA_COMP_OPTIONS ?=
COMPILE = GUILE_LOAD_PATH=../.. THEME_D_CONFIG_FILE=../../theme-d-config-maint ../../theme-d/translator/theme-d-compile.scm

stdlibdir = $(THEME_D_LIB_DIR)/standard-library

stdlib_DATA = $(INTERFACE_TARGET) $(BODY_TARGET)

.thi.tci:
	$(COMPILE) -m .. -o $@ $(EXTRA_COMP_OPTIONS) $<

.thb.tcb:
	$(COMPILE) -m .. -o $@ $(EXTRA_COMP_OPTIONS) $<


.PHONY:  mostlyclean-local-check

mostlyclean-local-check:
	-rm -f *.tc?

mostlyclean-local: mostlyclean-local-check


platform-specific-impl.tcb : platform-specific-impl.tci

basic-math.tci : core.tci

basic-math.tcb : basic-math.tci bitwise-arithmetic.tci

bitwise-arithmetic.tci : core.tci

bitwise-arithmetic.tcb : bitwise-arithmetic.tci

complex.tci : core.tci rational.tci real-math.tci \
  object-string-conversion.tci

complex.tcb : complex.tci bitwise-arithmetic.tci basic-math.tci \
  string-utilities.tci

console-io.tci : core.tci

console-io.tcb : console-io.tci text-file-io.tci

core.tci : core-forms.tci platform-specific-impl.tci

core.tcb : core.tci

core-forms.tcb : core-forms.tci

dynamic-list.tci : core.tci

dynamic-list.tcb : dynamic-list.tci

goops-classes.tci : core.tci

goops-classes.tcb : goops-classes.tci

hash-table.tci : core.tci

hash-table.tcb : hash-table.tci list-utilities.tci

hash-table2.tci : core.tci

hash-table2.tcb : hash-table2.tci list-utilities.tci

iterator.tci : core.tci

iterator.tcb : iterator.tci

list-utilities.tci : core.tci

list-utilities.tcb : list-utilities.tci

math.tci : core.tci rational.tci real-math.tci complex.tci basic-math.tci

math.tcb : math.tci

matrix.tci : core.tci

matrix.tcb : matrix.tci list-utilities.tci

nonpure-iterator.tci : core.tci

nonpure-iterator.tcb : nonpure-iterator.tci

object-string-conversion.tci : core.tci

object-string-conversion.tcb : object-string-conversion.tci \
  string-utilities.tci list-utilities.tci

promise.tci : core.tci

promise.tcb : promise.tci

rational.tci : core.tci object-string-conversion.tci

rational.tcb : rational.tci basic-math.tci bitwise-arithmetic.tci \
  string-utilities.tci

real-math.tci : core.tci rational.tci

real-math.tcb : real-math.tci basic-math.tci

singleton.tci : core.tci

singleton.tcb : singleton.tci

statprof.tci : core.tci

statprof.tcb : statprof.tci

string-utilities.tci : core.tci

string-utilities.tcb : string-utilities.tci list-utilities.tci

stream.tci : core.tci promise.tci text-file-io.tci

stream.tcb : stream.tci

system.tci : core.tci

system.tcb : system.tci

text-file-io.tci : core.tci

text-file-io.tcb : text-file-io.tci object-string-conversion.tci \
  list-utilities.tci string-utilities.tci

extra-math.tci : core.tci math.tci

extra-math.tcb : extra-math.tci

posix-math.tci : core.tci math.tci

posix-math.tcb : posix-math.tci
