-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (25 loc) · 864 Bytes
/
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
VPATH = runtime
CFLAGS = -std=c99 -O3 -flto
OBJECTS = arith.o compare.o function.o io.o logic.o system.o
PREFIX = /usr/local
%.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
all : libtl1rtl.a tl1c
libtl1rtl.a : $(OBJECTS)
ar rv $@ $^
arith.o : arith.c runtime.h
compare.o : compare.c runtime.h
function.o : function.c runtime.h
io.o : io.c runtime.h
logic.o : logic.c runtime.h
system.o : system.c runtime.h
tl1c : tl1c.in
sed -e "s#@sharedir@#$(PREFIX)/share#" -e "s#@bindir@#$(PREFIX)/bin#" <tl1c.in >tl1c
install : libtl1rtl.a tl1c
install libtl1rtl.a $(PREFIX)/lib
install -d $(PREFIX)/share/tl1
install tl1c $(PREFIX)/bin
install tl1toc.scm $(PREFIX)/bin
install tl1/c-gen.sld tl1/exception.sld tl1/lexer.sld tl1/parser.sld tl1/pattern-match.sld tl1/peg.sld $(PREFIX)/share/tl1
clean :
rm -f libtl1rtl.a tl1c $(OBJECTS) *~