build/clang-plugin/Makefile.in

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/build/clang-plugin/Makefile.in	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,57 @@
     1.4 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.5 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.7 +
     1.8 +CXX      := @CXX@
     1.9 +CXXFLAGS := @CXXFLAGS@
    1.10 +LDFLAGS  := @LDFLAGS@
    1.11 +VPATH		 := @srcdir@
    1.12 +
    1.13 +# Helper for end
    1.14 +NULL :=
    1.15 +
    1.16 +CPPSRCS := \
    1.17 +	clang-plugin.cpp \
    1.18 +	$(NULL)
    1.19 +
    1.20 +TESTSRCS := \
    1.21 +	TestCustomHeap.cpp \
    1.22 +	TestMustOverride.cpp \
    1.23 +	TestNonHeapClass.cpp \
    1.24 +	TestStackClass.cpp \
    1.25 +	$(NULL)
    1.26 +
    1.27 +OBJS := $(patsubst %.cpp,%.o,$(CPPSRCS))
    1.28 +TESTS := $(patsubst %.cpp,test-%,$(TESTSRCS))
    1.29 +
    1.30 +PLUGIN := libclang-plugin.so
    1.31 +
    1.32 +all: $(PLUGIN) $(TESTS)
    1.33 +
    1.34 +$(OBJS): %.o: %.cpp Makefile
    1.35 +	$(CXX) -o $@ -c $(CXXFLAGS) $<
    1.36 +
    1.37 +$(PLUGIN): $(OBJS)
    1.38 +	rm -f $@
    1.39 +	$(CXX) -shared -o $@ $(CXXFLAGS) $(LDFLAGS) $(OBJS) -lclangASTMatchers
    1.40 +
    1.41 +TESTFLAGS := -fsyntax-only -Xclang -verify \
    1.42 +	-Xclang -load -Xclang $(CURDIR)/$(PLUGIN) \
    1.43 +	-Xclang -add-plugin -Xclang moz-check
    1.44 +
    1.45 +$(TESTS): test-%: tests/%.cpp $(PLUGIN)
    1.46 +	$(CXX) $(TESTFLAGS) $<
    1.47 +
    1.48 +compile libs export tools: all
    1.49 +
    1.50 +distclean clean:
    1.51 +	rm -f $(OBJS) $(TESTS) $(PLUGIN)
    1.52 +
    1.53 +check:
    1.54 +
    1.55 +libs: binaries
    1.56 +
    1.57 +binaries: all
    1.58 +	@touch $@
    1.59 +
    1.60 +.PHONY: compile libs export tools distclean clean check

mercurial