-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.in
40 lines (31 loc) · 1015 Bytes
/
Makefile.in
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
CC=@CC@
CFLAGS=-Wall -Wextra -Wno-missing-braces @DISTRO@
OBJ=wsi.o disasm.o run.o parse.o compile.o tcc.o asm.tab.o asm_gen.o asm_optimize.o lex.yy.o
.PHONY: clean fix-libtcc cloc test
wsi: $(OBJ)
$(CC) $(CFLAGS) -o $@ $^ @LIBS@
lex.yy.c: asm.l
flex -f asm.l
asm.tab.c asm.tab.h: asm.y
bison -d asm.y
test: wsi
./test.sh @TEST_JIT@
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
clean:
rm -f *.o *~ config.log config.status
rm -f lex.yy.c asm.tab.c asm.tab.h
rm -f tests/ws-build-run/*.asm.ws
rm -rf autom4te.cache/
cloc: clean
cloc --exclude-list-file=.clocignore .
# there are many possible fixes to that, so we'll just try applying every
# of them. if you're a maintainer of ubuntu, debian, or tcc: if you don't
# patch this, I won't remove this ugly hack.
fix-libtcc:
# hack debian
-mkdir /usr/lib/x86_64-linux-gnu/tcc/
-cp /usr/lib/x86_64-linux-gnu/libtcc.a /usr/lib/x86_64-linux-gnu/tcc/libtcc1.a
# hack ubuntu
-cp /usr/lib/x86_64-linux-gnu/tcc/libtcc1.a /usr/local/lib/tcc/
# hack the planet