2022-04-22 02:09:24 +03:00
|
|
|
# This is "inform6.mkscript", a script used to generate the makefile "inform6.mk"
|
|
|
|
# used to build the tool "inform6". Do not edit "inform6.mk" directly. Instead,
|
|
|
|
# edit this script, and then rebuild "inform6.mk" with the command:
|
|
|
|
|
|
|
|
# ../inweb/Tangled/inweb inform6 -makefile inform6/inform6.mk
|
|
|
|
|
|
|
|
# (Or simply type "make makers" to make all of the subsidiary makefiles inside the
|
|
|
|
# inform repository, including this one.)
|
|
|
|
|
|
|
|
# See the inweb manual for documentation on the *.mkscript file format, i.e.,
|
|
|
|
# the format in which this file is written. But it is essentially just a makefile
|
|
|
|
# with a number of special macro and loop features whose syntax involves braces
|
|
|
|
# { ... }, so anywhere that you see braces, you're looking at something special
|
|
|
|
# to *.mkscript; anything else is straightforward make syntax.
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# Note that the resulting makefile expects to be used with the current working
|
|
|
|
# directory set to "inform", _not_ its subdirectory "inform/inform6". So it
|
|
|
|
# should usually be invoked as e.g. "make -f inform6/inform6.mk".
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
{platform-settings}
|
|
|
|
|
|
|
|
ME = inform6
|
|
|
|
INTEST = ../intest/Tangled/intest
|
2022-05-29 01:03:16 +03:00
|
|
|
SANDBOX = $(ME)/Inform6
|
2022-04-22 02:09:24 +03:00
|
|
|
INTERPRETERS = $(ME)/Tests/Assistants
|
|
|
|
|
|
|
|
# Making the program:
|
|
|
|
|
|
|
|
$(ME)/Tangled/$(ME): $(SANDBOX)/*.c $(SANDBOX)/*.h
|
|
|
|
$(call make-me)
|
|
|
|
|
|
|
|
.PHONY: force
|
|
|
|
force:
|
|
|
|
$(call make-me)
|
|
|
|
|
|
|
|
define make-me
|
2022-05-12 00:11:41 +03:00
|
|
|
{compile-indulgently from: $(SANDBOX)/arrays.c to: $(SANDBOX)/arrays.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/asm.c to: $(SANDBOX)/asm.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/bpatch.c to: $(SANDBOX)/bpatch.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/chars.c to: $(SANDBOX)/chars.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/directs.c to: $(SANDBOX)/directs.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/errors.c to: $(SANDBOX)/errors.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/expressc.c to: $(SANDBOX)/expressc.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/expressp.c to: $(SANDBOX)/expressp.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/files.c to: $(SANDBOX)/files.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/inform.c to: $(SANDBOX)/inform.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/lexer.c to: $(SANDBOX)/lexer.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/memory.c to: $(SANDBOX)/memory.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/objects.c to: $(SANDBOX)/objects.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/states.c to: $(SANDBOX)/states.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/symbols.c to: $(SANDBOX)/symbols.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/syntax.c to: $(SANDBOX)/syntax.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/tables.c to: $(SANDBOX)/tables.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/text.c to: $(SANDBOX)/text.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/veneer.c to: $(SANDBOX)/veneer.o options: -D$(INFORM6OS)}
|
|
|
|
{compile-indulgently from: $(SANDBOX)/verbs.c to: $(SANDBOX)/verbs.o options: -D$(INFORM6OS)}
|
2022-05-28 20:11:25 +03:00
|
|
|
{link from: $(SANDBOX)/*.o to: $(ME)/Tangled/$(ME)$(EXEEXTENSION)}
|
|
|
|
rm -f $(SANDBOX)/*.o
|
2022-04-22 02:09:24 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
# Testing the program:
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test: $(INTERPRETERS)/dumb-frotz/dumb-frotz $(INTERPRETERS)/dumb-glulx/glulxe/glulxe
|
|
|
|
$(INTEST) -from $(ME) all
|
|
|
|
|
|
|
|
.PHONY: interpreters
|
|
|
|
interpreters: $(INTERPRETERS)/dumb-frotz/dumb-frotz $(INTERPRETERS)/dumb-glulx/glulxe/glulxe
|
|
|
|
|
|
|
|
# "dumb-frotz" is a Z-machine interpreter and is used in development to test
|
|
|
|
# that story files in Z format perform as intended. It's written in old C,
|
|
|
|
# and is dumb in the sense that it uses a dumb terminal.
|
|
|
|
|
|
|
|
GLKLIB = libcheapglk.a
|
|
|
|
GLKINCLUDEDIR = ../cheapglk
|
|
|
|
GLKLIBDIR = ../cheapglk
|
|
|
|
GLKMAKEFILE = Make.cheapglk
|
|
|
|
|
|
|
|
CHEAPGLK_OBJS = \
|
|
|
|
cgfref.o cggestal.o cgmisc.o cgstream.o cgstyle.o cgwindow.o cgschan.o \
|
|
|
|
cgunicod.o main.o gi_dispa.o gi_blorb.o cgblorb.o
|
|
|
|
|
|
|
|
GLULXE_OBJS = main.o files.o vm.o exec.o float.o funcs.o operand.o string.o glkop.o \
|
|
|
|
heap.o serial.o search.o gestalt.o osdepend.o unixstrt.o accel.o profile.o
|
|
|
|
|
|
|
|
CHEAPGLK_HEADERS = cheapglk.h gi_dispa.h
|
|
|
|
|
|
|
|
$(INTERPRETERS)/dumb-frotz/dumb-frotz: \
|
|
|
|
$(INTERPRETERS)/dumb-frotz/*.c \
|
|
|
|
$(INTERPRETERS)/dumb-frotz/*.h
|
2022-05-12 00:11:41 +03:00
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/buffer.c to: $(INTERPRETERS)/dumb-frotz/buffer.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/dumb-init.c to: $(INTERPRETERS)/dumb-frotz/dumb-init.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/dumb-input.c to: $(INTERPRETERS)/dumb-frotz/dumb-input.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/dumb-output.c to: $(INTERPRETERS)/dumb-frotz/dumb-output.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/dumb-pic.c to: $(INTERPRETERS)/dumb-frotz/dumb-pic.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/fastmem.c to: $(INTERPRETERS)/dumb-frotz/fastmem.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/files.c to: $(INTERPRETERS)/dumb-frotz/files.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/hotkey.c to: $(INTERPRETERS)/dumb-frotz/hotkey.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/input.c to: $(INTERPRETERS)/dumb-frotz/input.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/math.c to: $(INTERPRETERS)/dumb-frotz/math.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/object.c to: $(INTERPRETERS)/dumb-frotz/object.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/process.c to: $(INTERPRETERS)/dumb-frotz/process.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/random.c to: $(INTERPRETERS)/dumb-frotz/random.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/redirect.c to: $(INTERPRETERS)/dumb-frotz/redirect.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/screen.c to: $(INTERPRETERS)/dumb-frotz/screen.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/sound.c to: $(INTERPRETERS)/dumb-frotz/sound.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/stream.c to: $(INTERPRETERS)/dumb-frotz/stream.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/table.c to: $(INTERPRETERS)/dumb-frotz/table.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/text.c to: $(INTERPRETERS)/dumb-frotz/text.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/variable.c to: $(INTERPRETERS)/dumb-frotz/variable.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/profiling.c to: $(INTERPRETERS)/dumb-frotz/profiling.o}
|
|
|
|
{compile-indulgently from: $(INTERPRETERS)/dumb-frotz/main.c to: $(INTERPRETERS)/dumb-frotz/main.o}
|
|
|
|
{link from: $(INTERPRETERS)/dumb-frotz/*.o to: $(INTERPRETERS)/dumb-frotz/dumb-frotz$(EXEEXTENSION)}
|
2022-05-28 20:11:25 +03:00
|
|
|
rm -f $(INTERPRETERS)/dumb-frotz/*.o
|
2022-04-22 02:09:24 +03:00
|
|
|
|
|
|
|
# "dumb-glulxe" is the analogous thing for Glulx-format story files.
|
|
|
|
|
|
|
|
$(INTERPRETERS)/dumb-glulx/glulxe/glulxe: \
|
|
|
|
$(INTERPRETERS)/dumb-glulx/cheapglk/*.c \
|
|
|
|
$(INTERPRETERS)/dumb-glulx/cheapglk/*.h \
|
|
|
|
$(INTERPRETERS)/dumb-glulx/glulxe/*.c \
|
|
|
|
$(INTERPRETERS)/dumb-glulx/glulxe/*.h
|
2022-07-29 13:49:29 +03:00
|
|
|
cd $(INTERPRETERS)/dumb-glulx/cheapglk; make clean
|
2022-04-22 02:09:24 +03:00
|
|
|
cd $(INTERPRETERS)/dumb-glulx/cheapglk; make
|
2022-07-29 13:49:29 +03:00
|
|
|
cd $(INTERPRETERS)/dumb-glulx/glulxe; make clean
|
2022-04-22 02:09:24 +03:00
|
|
|
cd $(INTERPRETERS)/dumb-glulx/glulxe; make
|
|
|
|
|
|
|
|
# Cleaning up:
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
$(call clean-up)
|
|
|
|
|
|
|
|
.PHONY: purge
|
|
|
|
purge:
|
|
|
|
$(call clean-up)
|
|
|
|
rm -f $(ME)/Tangled/$(ME)
|
|
|
|
rm -f $(INTERPRETERS)/dumb-frotz/dumb-frotz
|
|
|
|
rm -f $(INTERPRETERS)/dumb-glulx/glulxe/glulxe
|
|
|
|
|
|
|
|
define clean-up
|
|
|
|
rm -f $(SANDBOX)/*.o
|
|
|
|
rm -f $(INTERPRETERS)/dumb-frotz/*.o
|
|
|
|
rm -f $(INTERPRETERS)/dumb-glulx/glulxe/*.o
|
|
|
|
rm -f $(INTERPRETERS)/dumb-glulx/cheapglk/*.o
|
|
|
|
endef
|