-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
executable file
·45 lines (34 loc) · 1.23 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
# The commands that are not standard. You also need gzip, rm and cat.
CC = gcc
SQUEAK = C:/squeak/Squeak
GREG = ../greg/greg
CFLAGS = -Wall -O3
# The repository does not have msqueak-orig.image.
# Download http://tinlizzie.org/~ohshima/SqueakBootstrapper.zip and evaluate:
# "MicroSqueakImageBuilder new buildImageNamed: 'msqueak-orig.image'"
ORIGIMAGE = msqueak-orig.image
NEWIMAGE = msqueak.image
all : test
sq : sq.greg
$(GREG) -o sqgreg.c sq.greg
$(CC) $(CFLAGS) -o sq sqgreg.c
test: compiler.sto $(NEWIMAGE)
$(SQUEAK) $(NEWIMAGE) compiler.sto true
$(SQUEAK) $(NEWIMAGE) AllMCompilerMethods.st true
$(SQUEAK) $(NEWIMAGE) AllMCompilerMethods.st true
# It actually depends on mkimage $(ORIGIMAGE).gz
image.c:
./mkimage $(ORIGIMAGE).gz $@
$(ORIGIMAGE).gz: $(ORIGIMAGE)
gzip -c $< > $@
$(NEWIMAGE): $(NEWIMAGE).gz
gzip -dc $< > $@
rm $(NEWIMAGE).gz
$(NEWIMAGE).gz: image
./image $(NEWIMAGE).gz
compiler.sto: sq AllMCompilerClasses.st AllMCompilerMethods.st MCompilerInitialize.st
cat AllMCompilerClasses.st AllMCompilerMethods.st MCompilerInitialize.st > test.st
./sq test.st compiler.sto
rm -f test.st
clean :
rm -f *~ *.o *.exe sqgreg.c *.image *.image.gz sq mkimage image *.sto log.txt