-
Notifications
You must be signed in to change notification settings - Fork 2
/
GNUmakefile
44 lines (32 loc) · 1.27 KB
/
GNUmakefile
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
RUNTIME := runtime/table.j runtime/parser.j runtime/list.j runtime/stringtable.j
RUNTIME += runtime/modified.j runtime/wrap-around.j runtime/print.j
RUNTIME += runtime/convert.j runtime/context.j runtime/types.j
RUNTIME += runtime/instruction.j runtime/interpreter.j runtime/init.j
PROCESSED := $(patsubst runtime/%.j, out/%.j, $(RUNTIME))
.PHONY: clean process all build
.PHONY: patch128 patch133
.PHONY: configure-old-patch configure-new-patch
all: patch133
# 1.26b to 1.28
patch128: COMMONJ=common-1.28.j
patch128: PATCH_LVL=128
patch128: CABAL_FLAGS=-f old-patch
patch128: clean build
patch133: COMMONJ=common-1.33.j
patch133: PATCH_LVL=133
patch133: CABAL_FLAGS=
patch133: clean build
build: $(PROCESSED) Hot/Types.hs Hot/CommonJHash.hs
cabal build $(CABAL_FLAGS) jhcr
jhcr.exe: build
rm -f $@
strip $$(cabal list-bin $(CABAL_FLAGS) jhcr)
upx -qq $$(cabal list-bin $(CABAL_FLAGS) jhcr) -o $@
runtime/convert.j Hot/Types.hs Hot/CommonJHash.hs runtime/types.j runtime/g-type-bin.j: $(COMMONJ)
cabal run $(CABAL_FLAGS) convert -- $(COMMONJ)
process: $(PROCESSED)
out/%.j: runtime/%.j runtime/alloc.j runtime/alloc-globals.j
@mkdir -p $(@D)
PATCH_LVL=$(PATCH_LVL) bash process.sh $< $@ JHCR_
clean:
rm -f $(PROCESSED) runtime/convert.j runtime/types.j Hot/Types.hs Hot/CommonJHash.hs