forked from larsbrinkhoff/lbForth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (45 loc) · 1.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
TARGET = c
OS = .
-include conf.mk
prefix ?= /usr/local
DESTDIR = $(prefix)
bindir = $(DESTDIR)/bin
sharedir = $(DESTDIR)/share
sysdir ?= $(sharedir)/lbForth
TFORTH = $(TARGET)-forth
TDIR = targets/$(TARGET)
TSTAMP = $(TARGET)-$(OS)-stamp
META = $(TDIR)/build.fth
FORTH = $(TDIR)/run.sh ./forth
DEPS = src/kernel.fth src/dictionary.fth $(TDIR)/nucleus.fth
PARAMS = params.fth jump.fth threading.fth target.fth
GREP = grep -a
ERROR_PATTERNS = -e 'INCORRECT RESULT' -e 'WRONG NUMBER'
all: b-forth forth
b-forth:
$(MAKE) -ftargets/c/bootstrap.mk
cp $@ forth
tforth: $(TFORTH)
forth: $(TFORTH)
rm -f forth.exe
cp $< $@
$(TSTAMP): $(wildcard conf.mk)
rm -f *-stamp
touch $@
install: $(TFORTH)
install $< $(bindir)/forth
install -d $(sysdir)
cp src/* $(sysdir)
cp -r lib $(sysdir)
cp -r targets $(sysdir)
uninstall:
rm $(bindir)/forth
rm -rf $(sysdir)
web:
make tforth TARGET=asmjs
cp asmjs-forth forth.js
cp targets/asmjs/forth.html .
include $(TDIR)/forth.mk
include test/check.mk
clean: t-clean
rm -f forth *-forth test-* *-stamp *.exe conf.mk forth.html forth.js