-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
69 lines (52 loc) · 1.57 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
62
63
64
65
66
67
68
69
# Unix makefile for ATLAST
VERSION = 2.0
COPTIONS = -g -Wall
#COPTIONS = -O3 -Wall
CC = gcc
LIBRARIES = -lm
INCLUDE =
ATLCONFIG = -DMEMSTAT -DEXPORT -DREADONLYSTRINGS
CFLAGS = $(COPTIONS) $(INCLUDE) $(ATLCONFIG)
ATLOBJ = atlast.o atlmain.o
APPS = atlast primdeftest
all: $(APPS)
atlast: $(ATLOBJ)
$(CC) $(CFLAGS) $(ATLOBJ) -o atlast $(LIBRARIES)
atlast.o: atlast.c atldef.h
atldef.h: atlast.h
atlmain.o: atlmain.c atlast.h
primdeftest: primdeftest.c atldef.h
$(CC) $(CFLAGS) primdeftest.c atlast.c -o primdeftest $(LIBRARIES)
# Run the Atlast regression test
regress:
echo testcons >/tmp/regin.tmp
echo Test 1234 >>/tmp/regin.tmp
echo ls atlast.c >>/tmp/regin.tmp
echo >>/tmp/regin.tmp
echo >>/tmp/regin.tmp
./atlast -iregression/regress.atl </tmp/regin.tmp >/tmp/regout.tmp
diff regression/regout.txt /tmp/regout.tmp
clean:
rm -f $(APPS)
rm -f *.bak *.o *.dvi *.aux *.log
rm -f core core.* cscope.out *.tar.gz
rm -rf dist
( cd benchmark ; make clean )
dist: clean
rm -rf dist
mkdir dist
mkdir dist/atlast-$(VERSION)
mkdir dist/atlast-$(VERSION)/benchmark
mkdir dist/atlast-$(VERSION)/examples
mkdir dist/atlast-$(VERSION)/regression
cp -p benchmark/* dist/atlast-$(VERSION)/benchmark
cp -p examples/* dist/atlast-$(VERSION)/examples
cp -p regression/* dist/atlast-$(VERSION)/regression
cp -p atlast.c atlast.h atldef.h \
atlast2.html \
atlmain.c COPYING log.txt Makefile MANIFEST \
primdeftest.c \
dist/atlast-$(VERSION)
find dist -type f -exec chmod 644 {} \;
( cd dist ; tar cfvz ../atlast-$(VERSION).tar.gz atlast-$(VERSION) )
rm -rf dist