Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 #
2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 include $(CORE_DEPTH)/coreconf/UNIX.mk
8 #
9 # The default implementation strategy for Irix is classic nspr.
10 #
11 ifeq ($(USE_PTHREADS),1)
12 ifeq ($(USE_N32),1)
13 IMPL_STRATEGY = _n32_PTH
14 else
15 IMPL_STRATEGY = _PTH
16 endif
17 endif
19 DEFAULT_COMPILER = cc
21 ifdef NS_USE_GCC
22 CC = gcc
23 AS = $(CC) -x assembler-with-cpp
24 ODD_CFLAGS = -Wall -Wno-format -Wno-switch
25 ifdef BUILD_OPT
26 OPTIMIZER = -O6
27 endif
28 else
29 CC = cc
30 CCC = CC
31 ODD_CFLAGS = -fullwarn -xansi -woff 1209
32 ifdef BUILD_OPT
33 ifeq ($(USE_N32),1)
34 OPTIMIZER = -O -OPT:Olimit=4000
35 else
36 OPTIMIZER = -O -Olimit 4000
37 endif
38 endif
40 # For 6.x machines, include this flag
41 ifeq (6., $(findstring 6., $(OS_RELEASE)))
42 ifeq ($(USE_N32),1)
43 ODD_CFLAGS += -n32 -mips3 -exceptions
44 else
45 ODD_CFLAGS += -32 -multigot
46 endif
47 else
48 ODD_CFLAGS += -xgot
49 endif
50 ifeq ($(USE_N32),1)
51 OS_CFLAGS += -dollar
52 endif
53 endif
55 ODD_CFLAGS += -DSVR4 -DIRIX
57 CPU_ARCH = mips
59 RANLIB = /bin/true
60 # For purify
61 # NOTE: should always define _SGI_MP_SOURCE
62 NOMD_OS_CFLAGS += $(ODD_CFLAGS) -D_SGI_MP_SOURCE
64 OS_CFLAGS += $(NOMD_OS_CFLAGS)
65 ifdef USE_MDUPDATE
66 OS_CFLAGS += -MDupdate $(DEPENDENCIES)
67 endif
69 ifeq ($(USE_N32),1)
70 SHLIB_LD_OPTS += -n32 -mips3
71 endif
73 MKSHLIB += $(LD) $(SHLIB_LD_OPTS) -shared -soname $(@:$(OBJDIR)/%.so=%.so)
74 ifdef MAPFILE
75 # Add LD options to restrict exported symbols to those in the map file
76 endif
77 # Change PROCESS to put the mapfile in the correct format for this platform
78 PROCESS_MAP_FILE = cp $< $@
80 DSO_LDOPTS = -elf -shared -all
82 ifdef DSO_BACKEND
83 DSO_LDOPTS += -soname $(DSO_NAME)
84 endif
86 #
87 # Revision notes:
88 #
89 # In the IRIX compilers prior to version 7.2, -n32 implied -mips3.
90 # Beginning in the 7.2 compilers, -n32 implies -mips4 when the compiler
91 # is running on a system with a mips4 CPU (e.g. R8K, R10K).
92 # We want our code to explicitly be mips3 code, so we now explicitly
93 # set -mips3 whenever we set -n32.
94 #