build/clang-plugin/Makefile.in

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

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

mercurial