xref: /aoo42x/main/nss/makefile.mk (revision 1439c24f)
1cdf0e10cSrcweir#*************************************************************************
2cdf0e10cSrcweir#
3cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4cdf0e10cSrcweir#
5cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates.
6cdf0e10cSrcweir#
7cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite
8cdf0e10cSrcweir#
9cdf0e10cSrcweir# This file is part of OpenOffice.org.
10cdf0e10cSrcweir#
11cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify
12cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3
13cdf0e10cSrcweir# only, as published by the Free Software Foundation.
14cdf0e10cSrcweir#
15cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful,
16cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of
17cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details
19cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code).
20cdf0e10cSrcweir#
21cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License
22cdf0e10cSrcweir# version 3 along with OpenOffice.org.  If not, see
23cdf0e10cSrcweir# <http://www.openoffice.org/license.html>
24cdf0e10cSrcweir# for a copy of the LGPLv3 License.
25cdf0e10cSrcweir#
26cdf0e10cSrcweir#*************************************************************************
27cdf0e10cSrcweir
28cdf0e10cSrcweirPRJ=.
29cdf0e10cSrcweir
30cdf0e10cSrcweirPRJNAME=nss
31cdf0e10cSrcweirTARGET=nss
32cdf0e10cSrcweir
33cdf0e10cSrcweir# --- Settings -----------------------------------------------------
34cdf0e10cSrcweir
35cdf0e10cSrcweir.INCLUDE :	settings.mk
36cdf0e10cSrcweir
37cdf0e10cSrcweir# --- Files --------------------------------------------------------
38cdf0e10cSrcweir
39cdf0e10cSrcweir.IF "$(ENABLE_NSS_MODULE)"!="YES"
40cdf0e10cSrcweirall:
41cdf0e10cSrcweir	@echo "NSS will not be built. ENABLE_NSS_MODULE is '$(ENABLE_NSS_MODULE)'"
42cdf0e10cSrcweir.ENDIF
43cdf0e10cSrcweir
44cdf0e10cSrcweirTARFILE_NAME=nss-3.12.6-with-nspr-4.8.4
45cdf0e10cSrcweirTARFILE_MD5=b92261a5679276c400555004937af965
46cdf0e10cSrcweirTARFILE_ROOTDIR=nss-3.12.6
47cdf0e10cSrcweirPATCH_FILES=nss.patch
48cdf0e10cSrcweir
49cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
50*1439c24fSJürgen SchmidtMACOS_SDK_DIR=/Developer/SDKs/MacOSX10.4u.sdk
51*1439c24fSJürgen Schmidt.EXPORT : MACOS_SDK_DIR
52cdf0e10cSrcweirPATCH_FILES+=nss_macosx.patch
53cdf0e10cSrcweir.ENDIF # "$(OS)"=="MACOSX"
54cdf0e10cSrcweir
55cdf0e10cSrcweir.IF "$(debug)" != ""
56cdf0e10cSrcweir.ELSE
57cdf0e10cSrcweirBUILD_OPT=1
58cdf0e10cSrcweir.EXPORT: BUILD_OPT
59cdf0e10cSrcweir.ENDIF
60cdf0e10cSrcweir
61cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
62cdf0e10cSrcweir.IF "$(OS)$(COM)"=="LINUXGCC"
63cdf0e10cSrcweir.IF "$(BUILD64)"=="1"
64cdf0e10cSrcweir# force 64-bit buildmode
65cdf0e10cSrcweirUSE_64:=1
66cdf0e10cSrcweir.EXPORT : USE_64
67cdf0e10cSrcweir.ENDIF			# "$(CPU)"=="X"
68cdf0e10cSrcweir.ENDIF                  # "$(OS)$(COM)"=="LINUXGCC"
69cdf0e10cSrcweir
70cdf0e10cSrcweir.IF "$(OS)$(COM)"=="FREEBSDGCC"
71cdf0e10cSrcweir.IF "$(CPU)"=="X"
72cdf0e10cSrcweir# force 64-bit buildmode
73cdf0e10cSrcweirUSE_64:=1
74cdf0e10cSrcweir.EXPORT : USE_64
75cdf0e10cSrcweir.ENDIF			# "$(CPU)"=="X"
76cdf0e10cSrcweir.ENDIF                  # "$(OS)$(COM)"=="LINUXGCC"
77cdf0e10cSrcweir
78cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
79cdf0e10cSrcweir.IF "$(EXTRA_CFLAGS)"!=""
80cdf0e10cSrcweirCPP:=gcc -E $(EXTRA_CFLAGS)
81cdf0e10cSrcweirCXX:=g++ $(EXTRA_CFLAGS)
82cdf0e10cSrcweirCC:=gcc $(EXTRA_CFLAGS)
83*1439c24fSJürgen Schmidt.EXPORT : CPP
84cdf0e10cSrcweir.ENDIF # "$(EXTRA_CFLAGS)"!=""
85cdf0e10cSrcweir.ENDIF # "$(OS)"=="MACOSX"
86cdf0e10cSrcweir
87cdf0e10cSrcweirOUT2LIB=mozilla$/dist$/out$/lib$/*$(DLLPOST)
88cdf0e10cSrcweir
89cdf0e10cSrcweirBUILD_DIR=mozilla$/security$/nss
90cdf0e10cSrcweirBUILD_ACTION= $(GNUMAKE) nss_build_all
91cdf0e10cSrcweir#See #i105566# && moz#513024#
92cdf0e10cSrcweir.IF "$(OS)"=="LINUX"
93cdf0e10cSrcweirBUILD_ACTION+=FREEBL_NO_DEPEND=1
94cdf0e10cSrcweir.ENDIF
95cdf0e10cSrcweir
96cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="UNX"
97cdf0e10cSrcweir
98cdf0e10cSrcweir
99cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
100cdf0e10cSrcweir
101cdf0e10cSrcweir.IF "$(COM)"=="GCC"
102cdf0e10cSrcweir
103cdf0e10cSrcweirPATCH_FILES+=nss.patch.mingw
104cdf0e10cSrcweir
105cdf0e10cSrcweirmoz_build:=$(shell cygpath -p $(MOZILLABUILD))
106cdf0e10cSrcweirPATH!:=$(moz_build)/bin:$(PATH)
107cdf0e10cSrcweir
108cdf0e10cSrcweirnss_CC=$(CC)
109cdf0e10cSrcweirnss_CXX=$(CXX)
110cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
111cdf0e10cSrcweirnss_CC+=-shared-libgcc
112cdf0e10cSrcweirnss_CXX+=-shared-libgcc
113cdf0e10cSrcweir.ENDIF
114cdf0e10cSrcweir
115cdf0e10cSrcweirnss_LIBS=
116cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
117cdf0e10cSrcweirnss_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
118cdf0e10cSrcweir.ENDIF
119cdf0e10cSrcweir
120cdf0e10cSrcweir
121cdf0e10cSrcweirBUILD_DIR=mozilla$/security$/nss
122cdf0e10cSrcweirBUILD_ACTION=NS_USE_GCC=1 CC="$(nss_CC)" CXX="$(nss_CXX)" OS_LIBS="$(nss_LIBS)" OS_TARGET=WIN95 _WIN32_IE=0x500 PATH="$(PATH)" DEFINES=-D_WIN32_IE=0x500 $(GNUMAKE) nss_build_all
123cdf0e10cSrcweir
124cdf0e10cSrcweirOUT2LIB= \
125cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libnspr4.a \
126cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libnss3.a \
127cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libnssdbm3.a \
128cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libnssutil3.a \
129cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libplc4.a \
130cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libplds4.a \
131cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libsmime3.a \
132cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libsoftokn3.a \
133cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libsqlite3.a \
134cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libssl3.a
135cdf0e10cSrcweir
136cdf0e10cSrcweir.ELSE			# "$(COM)"=="GCC"
137cdf0e10cSrcweirMOZ_MSVCVERSION= 9
138cdf0e10cSrcweir.EXPORT : MOZ_MSVCVERSION
139cdf0e10cSrcweirmoz_build:=$(shell cygpath -p $(MOZILLABUILD))
140cdf0e10cSrcweir
141cdf0e10cSrcweir#Using WINNT will cause at least that nspr4.dll, plc4.dll, plds4.dll
142cdf0e10cSrcweir#become libnspr4.dll, libplc4.dll, libplds4.dll
143cdf0e10cSrcweir#WINNT causes the use of Microsoft fibers (specific to Windows NT and Windows 2000).
144cdf0e10cSrcweir#OS_TARGET= WINNT
145cdf0e10cSrcweirOS_TARGET=WIN95
146cdf0e10cSrcweir.EXPORT : OS_TARGET
147cdf0e10cSrcweir
148cdf0e10cSrcweir# make use of stlport headerfiles
149cdf0e10cSrcweirEXT_USE_STLPORT=TRUE
150cdf0e10cSrcweir
151cdf0e10cSrcweir#To build nss one has to call "make nss_build_all" in
152cdf0e10cSrcweir#mozilla/security/nss
153cdf0e10cSrcweirNSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/mozilla/security/nss)
154cdf0e10cSrcweirBUILD_ACTION= PATH="$(moz_build)/msys/bin:$(moz_build)/moztools/bin:$(PATH)" && $(subst,/,$/ $(MOZILLABUILD)/msys/bin/bash) -i \
155cdf0e10cSrcweir	-c "cd $(NSS_BUILD_DIR) && make nss_build_all"
156cdf0e10cSrcweir
157cdf0e10cSrcweirOUT2LIB= \
158515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/nspr4.lib \
159515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/nss3.lib \
160515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/nssdbm3.lib \
161515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/nssutil3.lib \
162515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/plc4.lib \
163515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/plds4.lib \
164515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/smime3.lib \
165515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/softokn3.lib \
166515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/sqlite3.lib \
167515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/ssl3.lib
168cdf0e10cSrcweir
169cdf0e10cSrcweir.ENDIF			# "$(COM)"=="GCC"
170cdf0e10cSrcweir
171cdf0e10cSrcweirOUT2BIN=mozilla$/dist$/out$/lib$/*$(DLLPOST)
172cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
173cdf0e10cSrcweir
174cdf0e10cSrcweir
175cdf0e10cSrcweirOUTDIR2INC=mozilla$/dist$/public$/nss mozilla$/dist$/out$/include
176cdf0e10cSrcweir
177cdf0e10cSrcweir# --- Targets ------------------------------------------------------
178cdf0e10cSrcweir
179cdf0e10cSrcweir.INCLUDE : set_ext.mk
180cdf0e10cSrcweir.INCLUDE :	target.mk
181cdf0e10cSrcweir.INCLUDE :	tg_ext.mk
182cdf0e10cSrcweir
183515ef96aSAndre Fischer# This is a hack to build on a Linux 3.0 system.  Between unpacking
184515ef96aSAndre Fischer# the archive and building it, the existing Linux2.6.mk makefile is
185515ef96aSAndre Fischer# copied to Linux3.0.mk, which otherwise would be missing and break
186515ef96aSAndre Fischer# the build.  See moz module for a similar hack.
187515ef96aSAndre Fischer# If someone finds a better solution then please change this.
188515ef96aSAndre Fischer.IF "$(OS)"=="LINUX"
189515ef96aSAndre FischerBUILD_ACTION:= $(COPY) \
190515ef96aSAndre Fischer	../../../mozilla/security/coreconf/Linux2.6.mk \
191515ef96aSAndre Fischer	../../../mozilla/security/coreconf/Linux3.0.mk \
192515ef96aSAndre Fischer	&& $(BUILD_ACTION)
193515ef96aSAndre Fischer.ENDIF
194