summaryrefslogtreecommitdiff
path: root/05/Makefile
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-02-18 14:15:09 -0500
committerpommicket <pommicket@gmail.com>2022-02-18 14:36:44 -0500
commit06def8fb862286658ef8cfc5cebb2711faadba1e (patch)
treece1486f57de6ce8f1d05d5a5ffc85b2a73977e35 /05/Makefile
parent826d1afd58c2e064a9c8fdb09eda1b08469de1a8 (diff)
satrt readme
Diffstat (limited to '05/Makefile')
-rw-r--r--05/Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/05/Makefile b/05/Makefile
index 0a2fcb5..628d286 100644
--- a/05/Makefile
+++ b/05/Makefile
@@ -1,4 +1,6 @@
-all: out04 a.out
+TCCDIR=tcc-0.9.27
+TCC=$(TCCDIR)/tcc
+all: out04 a.out test.out README.html
in04: *.b ../04a/out04
../04a/out04 main.b in04
out04: in04 ../04/out03
@@ -9,5 +11,13 @@ out04: in04 ../04/out03
./out04 $< $@
a.out: main.c *.h out04
./out04
+test.out: $(TCC) test.s.o test.c.o
+ $(TCC) -static -nostdlib test.s.o test.c.o -o test.out
+test.s.o: $(TCC) test.s
+ $(TCC) -static -nostdlib -c test.s -o test.s.o
+test.c.o: $(TCC) test.c
+ $(TCC) -static -nostdlib -c test.c -o test.c.o
+$(TCC): $(TCCDIR)/*.c $(TCCDIR)/*.h out04
+ cd $(TCCDIR) && ../out04 tcc.c tcc
clean:
- rm -f out* README.html *.out
+ rm -f out* README.html *.out *.o $(TCC)