[Lldb-commits] [lldb] r124763 - /lldb/trunk/test/load_unload/Makefile
Johnny Chen
johnny.chen at apple.com
Wed Feb 2 16:38:18 PST 2011
Author: johnny
Date: Wed Feb 2 18:38:18 2011
New Revision: 124763
URL: http://llvm.org/viewvc/llvm-project?rev=124763&view=rev
Log:
Parametrize make variable CC to also test with clang.
Modified:
lldb/trunk/test/load_unload/Makefile
Modified: lldb/trunk/test/load_unload/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/load_unload/Makefile?rev=124763&r1=124762&r2=124763&view=diff
==============================================================================
--- lldb/trunk/test/load_unload/Makefile (original)
+++ lldb/trunk/test/load_unload/Makefile Wed Feb 2 18:38:18 2011
@@ -1,41 +1,45 @@
all: a.out liba.dylib libb.dylib libc.dylib libd.dylib
+CC ?= gcc
+ifeq "$(CC)" "cc"
+ CC = gcc
+endif
CFLAGS ?=-arch x86_64 -gdwarf-2 -O0
CWD := $(shell pwd)
a.out: main.o libd.dylib
- gcc $(CFLAGS) -o a.out main.o -L. -ld
+ $(CC) $(CFLAGS) -o a.out main.o -L. -ld
main.o: main.c
- gcc $(CFLAGS) -c main.c
+ $(CC) $(CFLAGS) -c main.c
liba.dylib: a.o libb.dylib
- gcc $(CFLAGS) -dynamiclib -install_name "@executable_path/liba.dylib" -o liba.dylib a.o -L. -lb
+ $(CC) $(CFLAGS) -dynamiclib -install_name "@executable_path/liba.dylib" -o liba.dylib a.o -L. -lb
dsymutil liba.dylib
a.o: a.c
- gcc $(CFLAGS) -c a.c
+ $(CC) $(CFLAGS) -c a.c
libb.dylib: b.o
- gcc $(CFLAGS) -dynamiclib -install_name "@executable_path/libb.dylib" -o libb.dylib b.o
+ $(CC) $(CFLAGS) -dynamiclib -install_name "@executable_path/libb.dylib" -o libb.dylib b.o
dsymutil libb.dylib
b.o: b.c
- gcc $(CFLAGS) -c b.c
+ $(CC) $(CFLAGS) -c b.c
libc.dylib: c.o
- gcc $(CFLAGS) -dynamiclib -install_name "@executable_path/libc.dylib" -o libc.dylib c.o
+ $(CC) $(CFLAGS) -dynamiclib -install_name "@executable_path/libc.dylib" -o libc.dylib c.o
dsymutil libc.dylib
c.o: c.c
- gcc $(CFLAGS) -c c.c
+ $(CC) $(CFLAGS) -c c.c
libd.dylib: d.o
- gcc $(CFLAGS) -dynamiclib -install_name "$(CWD)/libd.dylib" -o libd.dylib d.o
+ $(CC) $(CFLAGS) -dynamiclib -install_name "$(CWD)/libd.dylib" -o libd.dylib d.o
dsymutil libd.dylib
d.o: d.c
- gcc $(CFLAGS) -c d.c
+ $(CC) $(CFLAGS) -c d.c
clean:
rm -rf *.o *~ *.dylib a.out *.dSYM
More information about the lldb-commits
mailing list