JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Fancy clang stuff
authorMarco Peereboom <marco@conformal.com>
Tue, 25 Oct 2011 20:19:29 +0000 (15:19 -0500)
committerMarco Peereboom <marco@conformal.com>
Tue, 25 Oct 2011 20:19:29 +0000 (15:19 -0500)
Makefile

index 9e2e5f1..af73051 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -23,5 +23,19 @@ MANDIR= ${PREFIX}/man/man
 
 obj: _xenocara_obj
 
+# clang targets
+.if ${.TARGETS:M*analyze*}
+CC=clang
+CXX=clang++
+CPP=clang -E
+CFLAGS+=--analyze
+.elif ${.TARGETS:M*clang*}
+CC=clang
+CXX=clang++
+CPP=clang -E
+.endif
+
+analyze: all
+clang: all
 .include <bsd.prog.mk>
 .include <bsd.xorg.mk>