tools/reorder/Makefile

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

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 # Redefine this to something that makes sense for you.
michael@0 6 MOZ_SRC=/usr/src/seamonkey-clean/mozilla
michael@0 7 MKLINKSCRIPT=$(MOZ_SRC)/config/mklinkscript.pl
michael@0 8
michael@0 9 ifdef DEBUG
michael@0 10 CFLAGS=-g -Wall
michael@0 11 CXXFLAGS=-g -Wall
michael@0 12 else
michael@0 13 CFLAGS=-O2
michael@0 14 CXXFLAGS=-O2
michael@0 15 endif
michael@0 16
michael@0 17 ifdef PROFILE
michael@0 18 CFLAGS += -pg -g
michael@0 19 CXXFLAGS += -pg -g
michael@0 20 endif
michael@0 21
michael@0 22 TARGETS=\
michael@0 23 libmcount.so \
michael@0 24 libcygprof.so \
michael@0 25 addrs2text \
michael@0 26 garope \
michael@0 27 grope \
michael@0 28 histogram \
michael@0 29 mapaddrs \
michael@0 30 rseed \
michael@0 31 test \
michael@0 32 $(NULL)
michael@0 33
michael@0 34 all: $(TARGETS)
michael@0 35
michael@0 36 libmcount.so: mcount.c
michael@0 37 $(CC) -shared $(CFLAGS) -o $@ $<
michael@0 38
michael@0 39 libcygprof.so: cygprof.c
michael@0 40 $(CC) -shared $(CFLAGS) -o $@ $<
michael@0 41
michael@0 42 addrs2text: addrs2text.o
michael@0 43
michael@0 44 garope: garope.cpp elf_symbol_table.o elf_utils.o
michael@0 45 grope: grope.cpp elf_symbol_table.o elf_utils.o
michael@0 46 histogram: histogram.cpp elf_symbol_table.o elf_utils.o
michael@0 47 mapaddrs: mapaddrs.cpp elf_symbol_table.o elf_utils.o
michael@0 48 rseed: rseed.c
michael@0 49 elf_symbol_table.o: elf_symbol_table.cpp elf_symbol_table.h elf_utils.h interval_map.h
michael@0 50 elf_utils.o: elf_utils.cpp elf_utils.h
michael@0 51
michael@0 52 # Build these with -pg so we get profiling info
michael@0 53 TEST_CFLAGS=-ffunction-sections -finstrument-functions -O2
michael@0 54
michael@0 55 test: test.o mult.o test.ldscript
michael@0 56 $(CXX) -Wl,-T,test.ldscript -O2 -o $@ $^
michael@0 57
michael@0 58 test.ldscript: test.order $(MKLINKSCRIPT)
michael@0 59 perl $(MKLINKSCRIPT) -o $@ $<
michael@0 60
michael@0 61 # This should really be generated by one of the fine tools, above. If
michael@0 62 # it hasn't been, create an empty ordering file.
michael@0 63 test.order:
michael@0 64 touch $@
michael@0 65
michael@0 66 mult.o: mult.c
michael@0 67 $(CC) $(TEST_CFLAGS) -c -o $@ $<
michael@0 68
michael@0 69 test.o: test.cpp
michael@0 70 $(CXX) $(TEST_CFLAGS) -c -o $@ $<
michael@0 71
michael@0 72 clean:
michael@0 73 rm -f $(TARGETS) test.ldscript *.o *~ core
michael@0 74

mercurial