blob: dd615aef6a921ff3120f206bd329a398e1a92fa3 [file] [log] [blame]
Anders Carlsson799e7502010-03-26 04:14:45 +00001GXX := llvm-g++-4.2
Mike Stump46ae64f2010-01-07 18:58:28 +00002CLANGXX := clang++
3
4all: one
5
6test.cc: gen.cc
7 g++ gen.cc -o gen
Douglas Gregor49b95452010-03-24 21:52:55 +00008 ./gen >test.cc
Mike Stump46ae64f2010-01-07 18:58:28 +00009
10test-gcc.sum: test.cc
Mike Stump1f48f4b2010-01-07 19:19:39 +000011 time $(GXX) test.cc -o test-gcc.s -S
12 $(GXX) test-gcc.s -o test-gcc
Douglas Gregor49b95452010-03-24 21:52:55 +000013 ./test-gcc >test-gcc.sum
Mike Stump46ae64f2010-01-07 18:58:28 +000014
15test-clang.sum: test.cc
Mike Stump1f48f4b2010-01-07 19:19:39 +000016 time $(CLANGXX) test.cc -o test-clang.s -S
17 $(CLANGXX) test-clang.s -o test-clang
Douglas Gregor49b95452010-03-24 21:52:55 +000018 ./test-clang >test-clang.sum
Mike Stump46ae64f2010-01-07 18:58:28 +000019
20one: test-gcc.sum test-clang.sum
21 cmp test-gcc.sum test-clang.sum
Douglas Gregor49b95452010-03-24 21:52:55 +000022
23clean:
24 rm -f gen test-gcc test-clang test.cc test-gcc.sum test-clang.sum test-gcc.s test-clang.s