tools/reorder/Makefile

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.

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

mercurial