| @@ -6,7 +6,7 @@ · 5 unmodified lines |
| 6 | TESTS = libtest test3 | 6 | TESTS = libtest test3 |
| 7 | | 7 | |
| 8 | # these should work too | 8 | # these should work too |
| 9 | # TESTS += test1 test2 speed btest | 9 | # TESTS += test1 test2 speedtest btest |
| 10 | | 10 | |
| 11 | # these don't work as they should | 11 | # these don't work as they should |
| 12 | # TESTS += test4 asmtest | 12 | # TESTS += test4 asmtest |
| @@ -23,6 +23,7 @@ all test : $(TESTS) · 10 unmodified lines |
| 23 | | 23 | |
| 24 | # make sure that tcc exists | 24 | # make sure that tcc exists |
| 25 | $(TESTS) : ../tcc | 25 | $(TESTS) : ../tcc |
| | 26 | |
| 26 | ../tcc ../libtcc.a : | 27 | ../tcc ../libtcc.a : |
| 27 | $(MAKE) -C .. | 28 | $(MAKE) -C .. |
| 28 | | 29 | |
| @@ -104,7 +105,7 @@ btest: boundtest.c · 75 unmodified lines |
| 104 | echo; echo Bound test OK | 105 | echo; echo Bound test OK |
| 105 | | 106 | |
| 106 | # speed test | 107 | # speed test |
| 107 | speed: ex2 ex3 | 108 | speedtest: ex2 ex3 |
| 108 | @echo ------------ $@ ------------ | 109 | @echo ------------ $@ ------------ |
| 109 | time ./ex2 1238 2 3 4 10 13 4 | 110 | time ./ex2 1238 2 3 4 10 13 4 |
| 110 | time $(TCC) -run ../examples/ex2.c 1238 2 3 4 10 13 4 | 111 | time $(TCC) -run ../examples/ex2.c 1238 2 3 4 10 13 4 |
| @@ -116,13 +117,13 @@ ex%: ../examples/ex%.c · 5 unmodified lines |
| 116 | | 117 | |
| 117 | # tiny assembler testing | 118 | # tiny assembler testing |
| 118 | asmtest.ref: asmtest.S | 119 | asmtest.ref: asmtest.S |
| 119 | $(CC) -o asmtest.ref.o -c asmtest.S | 120 | $(CC) -Wa,-W -o asmtest.ref.o -c asmtest.S |
| 120 | objdump -D asmtest.ref.o > $@ | 121 | objdump -D asmtest.ref.o > asmtest.ref |
| 121 | | 122 | |
| 122 | asmtest: asmtest.ref | 123 | asmtest: asmtest.ref |
| 123 | @echo ------------ $@ ------------ | 124 | @echo ------------ $@ ------------ |
| 124 | $(TCC) -c asmtest.S | 125 | $(TCC) -c asmtest.S |
| 125 | objdump -D asmtest.o > $@ | 126 | objdump -D asmtest.o > asmtest.out |
| 126 | @if diff -u --ignore-matching-lines="file format" asmtest.ref asmtest.out ; then echo "ASM Auto Test OK"; fi | 127 | @if diff -u --ignore-matching-lines="file format" asmtest.ref asmtest.out ; then echo "ASM Auto Test OK"; fi |
| 127 | | 128 | |
| 128 | # targets for development | 129 | # targets for development |