security/nss/coreconf/OS2.mk

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 #
michael@0 2 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 5
michael@0 6 MOZ_WIDGET_TOOLKIT = os2
michael@0 7
michael@0 8 # XP_PC is for Window and OS2 on Intel X86
michael@0 9 # XP_OS2 is strictly for OS2 only
michael@0 10 XP_DEFINE += -DXP_PC=1 -DXP_OS2=1
michael@0 11
michael@0 12 # Override prefix
michael@0 13 LIB_PREFIX = $(NULL)
michael@0 14
michael@0 15 # Override suffix in suffix.mk
michael@0 16 LIB_SUFFIX = lib
michael@0 17 # the DLL_SUFFIX must be uppercase for FIPS mode to work. bugzilla 240784
michael@0 18 DLL_SUFFIX = DLL
michael@0 19 PROG_SUFFIX = .exe
michael@0 20
michael@0 21
michael@0 22 CCC = gcc
michael@0 23 LINK = gcc
michael@0 24 AR = emxomfar r $@
michael@0 25 # Keep AR_FLAGS blank so that we do not have to change rules.mk
michael@0 26 AR_FLAGS =
michael@0 27 RANLIB = @echo OS2 RANLIB
michael@0 28 BSDECHO = @echo OS2 BSDECHO
michael@0 29 IMPLIB = emximp -o
michael@0 30 FILTER = emxexp -o
michael@0 31
michael@0 32 # GCC for OS/2 currently predefines these, but we don't want them
michael@0 33 DEFINES += -Uunix -U__unix -U__unix__
michael@0 34
michael@0 35 DEFINES += -DTCPV40HDRS
michael@0 36
michael@0 37 ifeq ($(MOZ_OS2_HIGH_MEMORY),1)
michael@0 38 HIGHMEM_LDFLAG = -Zhigh-mem
michael@0 39 endif
michael@0 40
michael@0 41 ifndef NO_SHARED_LIB
michael@0 42 WRAP_MALLOC_LIB =
michael@0 43 WRAP_MALLOC_CFLAGS =
michael@0 44 DSO_CFLAGS =
michael@0 45 DSO_PIC_CFLAGS =
michael@0 46 MKSHLIB = $(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@
michael@0 47 MKCSHLIB = $(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@
michael@0 48 MKSHLIB_FORCE_ALL =
michael@0 49 MKSHLIB_UNFORCE_ALL =
michael@0 50 DSO_LDOPTS = -Zomf -Zdll -Zmap $(HIGHMEM_LDFLAG)
michael@0 51 SHLIB_LDSTARTFILE =
michael@0 52 SHLIB_LDENDFILE =
michael@0 53 ifdef MAPFILE
michael@0 54 MKSHLIB += $(MAPFILE)
michael@0 55 endif
michael@0 56 PROCESS_MAP_FILE = \
michael@0 57 echo LIBRARY $(LIBRARY_NAME)$(LIBRARY_VERSION) INITINSTANCE TERMINSTANCE > $@; \
michael@0 58 echo PROTMODE >> $@; \
michael@0 59 echo CODE LOADONCALL MOVEABLE DISCARDABLE >> $@; \
michael@0 60 echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@; \
michael@0 61 echo EXPORTS >> $@; \
michael@0 62 grep -v ';+' $< | grep -v ';-' | \
michael@0 63 sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,\([\t ]*\),\1_,' | \
michael@0 64 awk 'BEGIN {ord=1;} { print($$0 " @" ord " RESIDENTNAME"); ord++;}' >> $@
michael@0 65
michael@0 66 endif #NO_SHARED_LIB
michael@0 67
michael@0 68 OS_CFLAGS = -Wall -Wno-unused -Wpointer-arith -Wcast-align -Wno-switch -Zomf -DDEBUG -DTRACING -g
michael@0 69
michael@0 70 ifdef BUILD_OPT
michael@0 71 ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
michael@0 72 OPTIMIZER += -Os -s
michael@0 73 else
michael@0 74 OPTIMIZER += -O2 -s
michael@0 75 endif
michael@0 76 DEFINES += -UDEBUG -U_DEBUG -DNDEBUG
michael@0 77 DLLFLAGS = -DLL -OUT:$@ -MAP:$(@:.dll=.map) $(HIGHMEM_LDFLAG)
michael@0 78 EXEFLAGS = -PMTYPE:VIO -OUT:$@ -MAP:$(@:.exe=.map) -nologo -NOE $(HIGHMEM_LDFLAG)
michael@0 79 OBJDIR_TAG = _OPT
michael@0 80 else
michael@0 81 #OPTIMIZER = -O+ -Oi
michael@0 82 DEFINES += -DDEBUG -D_DEBUG -DDEBUGPRINTS #HCT Need += to avoid overidding manifest.mn
michael@0 83 DLLFLAGS = -DEBUG -DLL -OUT:$@ -MAP:$(@:.dll=.map) $(HIGHMEM_LDFLAG)
michael@0 84 EXEFLAGS = -DEBUG -PMTYPE:VIO -OUT:$@ -MAP:$(@:.exe=.map) -nologo -NOE $(HIGHMEM_LDFLAG)
michael@0 85 OBJDIR_TAG = _DBG
michael@0 86 LDFLAGS = -DEBUG $(HIGHMEM_LDFLAG)
michael@0 87 endif # BUILD_OPT
michael@0 88
michael@0 89 # OS/2 use nsinstall that is included in the toolkit.
michael@0 90 # since we do not wish to support and maintain 3 version of nsinstall in mozilla, nspr and nss
michael@0 91
michael@0 92 ifdef BUILD_TREE
michael@0 93 NSINSTALL_DIR = $(BUILD_TREE)/nss
michael@0 94 else
michael@0 95 NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall
michael@0 96 endif
michael@0 97 # NSINSTALL = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/nsinstall
michael@0 98 NSINSTALL = nsinstall # HCT4OS2
michael@0 99 INSTALL = $(NSINSTALL)
michael@0 100
michael@0 101 MKDEPEND_DIR = $(CORE_DEPTH)/coreconf/mkdepend
michael@0 102 MKDEPEND = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend
michael@0 103 MKDEPENDENCIES = $(OBJDIR_NAME)/depend.mk
michael@0 104
michael@0 105 ####################################################################
michael@0 106 #
michael@0 107 # One can define the makefile variable NSDISTMODE to control
michael@0 108 # how files are published to the 'dist' directory. If not
michael@0 109 # defined, the default is "install using relative symbolic
michael@0 110 # links". The two possible values are "copy", which copies files
michael@0 111 # but preserves source mtime, and "absolute_symlink", which
michael@0 112 # installs using absolute symbolic links.
michael@0 113 # - THIS IS NOT PART OF THE NEW BINARY RELEASE PLAN for 9/30/97
michael@0 114 # - WE'RE KEEPING IT ONLY FOR BACKWARDS COMPATIBILITY
michael@0 115 ####################################################################
michael@0 116
michael@0 117 ifeq ($(NSDISTMODE),copy)
michael@0 118 # copy files, but preserve source mtime
michael@0 119 INSTALL = $(NSINSTALL)
michael@0 120 INSTALL += -t
michael@0 121 else
michael@0 122 ifeq ($(NSDISTMODE),absolute_symlink)
michael@0 123 # install using absolute symbolic links
michael@0 124 INSTALL = $(NSINSTALL)
michael@0 125 INSTALL += -L `pwd`
michael@0 126 else
michael@0 127 # install using relative symbolic links
michael@0 128 INSTALL = $(NSINSTALL)
michael@0 129 INSTALL += -R
michael@0 130 endif
michael@0 131 endif
michael@0 132
michael@0 133 define MAKE_OBJDIR
michael@0 134 if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
michael@0 135 endef
michael@0 136
michael@0 137 #
michael@0 138 # override the definition of DLL_PREFIX in prefix.mk
michael@0 139 #
michael@0 140
michael@0 141 ifndef DLL_PREFIX
michael@0 142 DLL_PREFIX = $(NULL)
michael@0 143 endif
michael@0 144
michael@0 145 #
michael@0 146 # override the TARGETS defined in ruleset.mk, adding IMPORT_LIBRARY
michael@0 147 #
michael@0 148 ifndef TARGETS
michael@0 149 TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(PROGRAM)
michael@0 150 endif
michael@0 151
michael@0 152
michael@0 153 ifdef LIBRARY_NAME
michael@0 154 IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).lib
michael@0 155 endif
michael@0 156

mercurial