-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
75 lines (56 loc) · 1.73 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
70
71
72
73
74
75
# Unix makefile for ATLAST
VERSION = 1.2
COPTIONS = -g -Wall
CC = gcc
#LIBRARIES = -lm
# LIBRARIES = -lrt -lm -L/usr/local/lib -lwiringPi -lnopoll -lpigpio
# LIBRARIES = -lrt -lm -L/usr/local/lib -lnopoll -lpigpio
LIBRARIES = -lrt -lm -L/usr/local/lib
#
INCLUDE =
# INCLUDE = -I/usr/local/include/nopoll -Wl,-rpath -Wl,/usr/local/lib
ATLCONFIG = -DMEMSTAT -DALIGNMENT -DEXPORT -DREADONLYSTRINGS
CFLAGS = $(COPTIONS) $(INCLUDE) $(ATLCONFIG)
ATLOBJ = atlast.o atlmain.o
# ATLOBJ = atlast.o gb_common.o gb_spi.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:
$(CC) $(CFLAGS) primdeftest.c atlast.c -o primdeftest $(LIBRARIES)
# Run the Atlast regression test
regression:
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 -iregress </tmp/regin.tmp >/tmp/regout.tmp
diff 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 tex ; make clean )
dist:
rm -rf dist
mkdir dist
mkdir dist/atlast-$(VERSION)
cp -p atlast.c atlast.h tex/atlast.pdf atldef.h \
atlast.html \
atlmain.c COPYING log.txt Makefile MANIFEST \
primdeftest.c \
regout.txt regress.atl dist/atlast-$(VERSION)
mkdir dist/atlast-$(VERSION)/tex
cp -p tex/*.tex tex/*.sty tex/Makefile dist/atlast-$(VERSION)/tex
find dist -type f -exec chmod 644 {} \;
( cd dist ; tar cfvz ../atlast-$(VERSION).tar.gz atlast-$(VERSION) )
rm -rf dist
lint: lintatlast
lintatlast:
lint atlast.c atlmain.c $(LIBRARIES) $(ATLCONFIG)