Anders Carlsson | 799e750 | 2010-03-26 04:14:45 +0000 | [diff] [blame] | 1 | GXX := llvm-g++-4.2 |
Mike Stump | 46ae64f | 2010-01-07 18:58:28 +0000 | [diff] [blame] | 2 | CLANGXX := clang++ |
| 3 | |
| 4 | all: one |
| 5 | |
| 6 | test.cc: gen.cc |
| 7 | g++ gen.cc -o gen |
Douglas Gregor | 49b9545 | 2010-03-24 21:52:55 +0000 | [diff] [blame] | 8 | ./gen >test.cc |
Mike Stump | 46ae64f | 2010-01-07 18:58:28 +0000 | [diff] [blame] | 9 | |
| 10 | test-gcc.sum: test.cc |
Mike Stump | 1f48f4b | 2010-01-07 19:19:39 +0000 | [diff] [blame] | 11 | time $(GXX) test.cc -o test-gcc.s -S |
| 12 | $(GXX) test-gcc.s -o test-gcc |
Douglas Gregor | 49b9545 | 2010-03-24 21:52:55 +0000 | [diff] [blame] | 13 | ./test-gcc >test-gcc.sum |
Mike Stump | 46ae64f | 2010-01-07 18:58:28 +0000 | [diff] [blame] | 14 | |
| 15 | test-clang.sum: test.cc |
Mike Stump | 1f48f4b | 2010-01-07 19:19:39 +0000 | [diff] [blame] | 16 | time $(CLANGXX) test.cc -o test-clang.s -S |
| 17 | $(CLANGXX) test-clang.s -o test-clang |
Douglas Gregor | 49b9545 | 2010-03-24 21:52:55 +0000 | [diff] [blame] | 18 | ./test-clang >test-clang.sum |
Mike Stump | 46ae64f | 2010-01-07 18:58:28 +0000 | [diff] [blame] | 19 | |
| 20 | one: test-gcc.sum test-clang.sum |
| 21 | cmp test-gcc.sum test-clang.sum |
Douglas Gregor | 49b9545 | 2010-03-24 21:52:55 +0000 | [diff] [blame] | 22 | |
| 23 | clean: |
| 24 | rm -f gen test-gcc test-clang test.cc test-gcc.sum test-clang.sum test-gcc.s test-clang.s |