build/clang-plugin/Makefile.in

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 4
michael@0 5 CXX := @CXX@
michael@0 6 CXXFLAGS := @CXXFLAGS@
michael@0 7 LDFLAGS := @LDFLAGS@
michael@0 8 VPATH := @srcdir@
michael@0 9
michael@0 10 # Helper for end
michael@0 11 NULL :=
michael@0 12
michael@0 13 CPPSRCS := \
michael@0 14 clang-plugin.cpp \
michael@0 15 $(NULL)
michael@0 16
michael@0 17 TESTSRCS := \
michael@0 18 TestCustomHeap.cpp \
michael@0 19 TestMustOverride.cpp \
michael@0 20 TestNonHeapClass.cpp \
michael@0 21 TestStackClass.cpp \
michael@0 22 $(NULL)
michael@0 23
michael@0 24 OBJS := $(patsubst %.cpp,%.o,$(CPPSRCS))
michael@0 25 TESTS := $(patsubst %.cpp,test-%,$(TESTSRCS))
michael@0 26
michael@0 27 PLUGIN := libclang-plugin.so
michael@0 28
michael@0 29 all: $(PLUGIN) $(TESTS)
michael@0 30
michael@0 31 $(OBJS): %.o: %.cpp Makefile
michael@0 32 $(CXX) -o $@ -c $(CXXFLAGS) $<
michael@0 33
michael@0 34 $(PLUGIN): $(OBJS)
michael@0 35 rm -f $@
michael@0 36 $(CXX) -shared -o $@ $(CXXFLAGS) $(LDFLAGS) $(OBJS) -lclangASTMatchers
michael@0 37
michael@0 38 TESTFLAGS := -fsyntax-only -Xclang -verify \
michael@0 39 -Xclang -load -Xclang $(CURDIR)/$(PLUGIN) \
michael@0 40 -Xclang -add-plugin -Xclang moz-check
michael@0 41
michael@0 42 $(TESTS): test-%: tests/%.cpp $(PLUGIN)
michael@0 43 $(CXX) $(TESTFLAGS) $<
michael@0 44
michael@0 45 compile libs export tools: all
michael@0 46
michael@0 47 distclean clean:
michael@0 48 rm -f $(OBJS) $(TESTS) $(PLUGIN)
michael@0 49
michael@0 50 check:
michael@0 51
michael@0 52 libs: binaries
michael@0 53
michael@0 54 binaries: all
michael@0 55 @touch $@
michael@0 56
michael@0 57 .PHONY: compile libs export tools distclean clean check

mercurial