mirror of
https://github.com/ganelson/inform.git
synced 2024-07-05 16:44:21 +03:00
65 lines
1.3 KiB
Plaintext
65 lines
1.3 KiB
Plaintext
# This is the script from which inweb -makefile will construct a makefile.
|
|
|
|
{platform-settings}
|
|
|
|
{identity-settings}
|
|
|
|
BLORBLIB = $(ME)/Tests/Assistants/blorblib
|
|
INTER = inter/Tangled/inter
|
|
|
|
.PHONY: all
|
|
all: executable preform
|
|
|
|
.PHONY: executable
|
|
executable: $(ME)/Tangled/$(MYNAME)
|
|
|
|
.PHONY: preform
|
|
preform: $(ME)/Tangled/Syntax.preform
|
|
|
|
# Making the program:
|
|
|
|
$(ME)/Tangled/$(MYNAME): {dependent-files}
|
|
$(call make-me)
|
|
|
|
$(ME)/TangledSyntax.preform:
|
|
$(call make-me)
|
|
|
|
.PHONY: force
|
|
force:
|
|
$(call make-me)
|
|
|
|
define make-me
|
|
$(INWEB) $(ME) -import-from modules -tangle
|
|
$(CC) -o $(ME)/Tangled/$(ME).o $(ME)/Tangled/$(ME).c
|
|
$(LINK) -o $(ME)/Tangled/$(ME)$(EXEEXTENSION) $(ME)/Tangled/$(ME).o $(LINKEROPTS)
|
|
endef
|
|
|
|
# Testing the program:
|
|
|
|
.PHONY: test
|
|
test:
|
|
$(INTEST) -from $(ME) all
|
|
|
|
# Cleaning up:
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
$(call clean-up)
|
|
|
|
.PHONY: purge
|
|
purge:
|
|
$(call clean-up)
|
|
rm -f $(ME)/Tangled/$(ME)
|
|
|
|
define clean-up
|
|
rm -f $(ME)/Tangled/*.o
|
|
rm -f $(ME)/Tangled/*.c
|
|
rm -f $(ME)/Tangled/*.h
|
|
rm -f $(ME)/Tests/Test\ Cases/_Results_Actual/*.txt
|
|
rm -f $(ME)/Tests/Test\ Extensions/_Results_Actual/*.txt
|
|
rm -f $(ME)/Tests/Test\ Index/_Results_Actual/*.txt
|
|
rm -f $(ME)/Tests/Test\ Maps/_Results_Actual/*.txt
|
|
rm -f $(ME)/Tests/Test\ Problems/_Results_Actual/*.txt
|
|
rm -f Documentation/Examples/_Results_Actual/*.txt
|
|
endef
|