update for name change
This commit is contained in:
parent
9a8dfaac35
commit
927c4afc0c
1 changed files with 38 additions and 29 deletions
67
Makefile
67
Makefile
|
@ -3,50 +3,59 @@ all: test cvt
|
||||||
test: prog.bin
|
test: prog.bin
|
||||||
cmp -l prog.bin prog.bin.ref
|
cmp -l prog.bin prog.bin.ref
|
||||||
|
|
||||||
run: tc prog.c
|
run: tcc prog.c
|
||||||
./tc prog.c
|
./tcc prog.c
|
||||||
|
|
||||||
run2: tc tc1.c prog.c
|
run2: tcc tcc1.c prog.c
|
||||||
./tc tc1.c prog.c
|
./tcc tcc1.c prog.c
|
||||||
|
|
||||||
run3: tc tc1.c prog.c
|
run3: tcc tcc1.c prog.c
|
||||||
./tc tc1.c tc1.c prog.c
|
./tcc tcc1.c tcc1.c prog.c
|
||||||
|
|
||||||
prog.bin: prog.c tct
|
prog.bin: prog.c tcc
|
||||||
./tct prog.c $@
|
./tc prog.c $@
|
||||||
ndisasm -b 32 $@
|
ndisasm -b 32 $@
|
||||||
|
|
||||||
p2.bin: p2.c tct
|
p2.bin: p2.c tcc
|
||||||
./tct $< $@
|
./tcc $< $@
|
||||||
ndisasm -b 32 $@
|
ndisasm -b 32 $@
|
||||||
|
|
||||||
tct: tc.c
|
# Tiny C Compiler
|
||||||
gcc -DTEST -O2 -g -o $@ $< -ldl
|
|
||||||
|
|
||||||
tc: tc.c Makefile
|
tcc: tcc.c
|
||||||
gcc -O2 -Wall -g -o $@ $< -ldl
|
gcc -O2 -Wall -g -o $@ $< -ldl
|
||||||
|
|
||||||
tc1: tc1.c
|
tcc1: tcc1.c
|
||||||
gcc -O2 -Wall -g -o $@ $<
|
gcc -O2 -Wall -g -o $@ $<
|
||||||
|
|
||||||
|
tcc1.i: tcc.c Makefile
|
||||||
|
gcc -E -P -o $@ $<
|
||||||
|
|
||||||
|
tcc1.c: tcc1.i cvt Makefile
|
||||||
|
./cvt -d $< $@
|
||||||
|
@ls -l $@
|
||||||
|
|
||||||
|
# obfuscated C compiler
|
||||||
|
otcc: otcc.c
|
||||||
|
gcc -O2 -Wall -g -o $@ $< -ldl
|
||||||
|
|
||||||
|
otcc.i: otcc.c Makefile
|
||||||
|
gcc -E -P -DTINY -o $@ $<
|
||||||
|
|
||||||
|
otcc1.c: otcc.i cvt Makefile
|
||||||
|
./cvt $< $@
|
||||||
|
@ls -l $@
|
||||||
|
|
||||||
|
orun: otcc otcc1.c
|
||||||
|
./otcc otcc1.c ex1.c
|
||||||
|
|
||||||
|
# misc
|
||||||
|
|
||||||
cvt: cvt.c
|
cvt: cvt.c
|
||||||
gcc -O2 -Wall -g -o $@ $<
|
gcc -O2 -Wall -g -o $@ $<
|
||||||
|
|
||||||
instr.o: instr.S
|
instr.o: instr.S
|
||||||
gcc -O2 -Wall -g -c -o $@ $<
|
gcc -O2 -Wall -g -c -o $@ $<
|
||||||
|
|
||||||
tc.i: tc.c Makefile
|
clean:
|
||||||
gcc -E -P -DTINY -o $@ tc.c
|
rm -f *~ *.o tcc tcc1 cvt
|
||||||
|
|
||||||
tc1.c: tc.i cvt Makefile
|
|
||||||
./cvt $< $@
|
|
||||||
@ls -l $@
|
|
||||||
|
|
||||||
test2: tct tc1.c
|
|
||||||
./tct tc1.c tc2
|
|
||||||
ndisasm -b 32 tc2
|
|
||||||
|
|
||||||
tc2: tc
|
|
||||||
./tct < tc1.c > tc2
|
|
||||||
ndisasm -b 32 tc2
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue