1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
11# OpenOffice.org is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License version 3
13# only, as published by the Free Software Foundation.
14#
15# OpenOffice.org is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18# GNU Lesser General Public License version 3 for more details
19# (a copy is included in the LICENSE file that accompanied this code).
20#
21# You should have received a copy of the GNU Lesser General Public License
22# version 3 along with OpenOffice.org.  If not, see
23# <http://www.openoffice.org/license.html>
24# for a copy of the LGPLv3 License.
25#
26#*************************************************************************
27
28PRJ=..$/..$/..
29
30PRJNAME = xmlsecurity
31TARGET = xs_nss
32
33ENABLE_EXCEPTIONS = TRUE
34
35# --- Settings -----------------------------------------------------
36
37.INCLUDE :  settings.mk
38.INCLUDE :	$(PRJ)$/util$/target.pmk
39
40.IF "$(SYSTEM_LIBXML)" == "YES"
41CFLAGS+=-DSYSTEM_LIBXML $(LIBXML_CFLAGS)
42.ENDIF
43
44.IF "$(WITH_MOZILLA)" == "NO" || "$(ENABLE_NSS_MODULE)"!="YES"
45.IF "$(SYSTEM_MOZILLA)" != "YES"
46@all:
47	@echo "No mozilla -> no nss -> no libxmlsec -> no xmlsecurity/nss"
48.ENDIF
49.ENDIF
50
51.IF "$(SYSTEM_MOZILLA)" != "YES"
52MOZ_INC = $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla
53NSS_INC = $(MOZ_INC)$/nss
54NSPR_INC = $(MOZ_INC)$/nspr
55.ELSE
56# MOZ_INC already defined from environment
57NSS_INC = $(MOZ_NSS_CFLAGS)
58NSPR_INC = $(MOZ_INC)$/nspr
59.ENDIF
60
61.IF "$(GUI)"=="UNX"
62.IF "$(COMNAME)"=="sunpro5"
63CFLAGS += -features=tmplife
64#This flag is needed to build mozilla 1.7 code
65.ENDIF		# "$(COMNAME)"=="sunpro5"
66.ENDIF
67
68.IF "$(GUI)" == "WNT"
69.IF "$(DBG_LEVEL)" == "0"
70INCPRE += \
71-I$(MOZ_INC)$/profile \
72-I$(MOZ_INC)$/string \
73-I$(MOZ_INC)$/embed_base
74.IF "$(COM)"=="GCC"
75CFLAGS += $(CFLAGSDEBUG)
76.ELSE
77CFLAGS +=   -GR- -W3 -Gy -MD -UDEBUG
78.ENDIF
79.ELSE
80INCPRE += \
81-I$(MOZ_INC)$/profile \
82-I$(MOZ_INC)$/string \
83-I$(MOZ_INC)$/embed_base
84.IF "$(COM)"=="GCC"
85.ELSE
86CFLAGS += -Zi -GR- -W3 -Gy -MDd -UNDEBUG
87.ENDIF
88.ENDIF
89.ENDIF
90.IF "$(GUI)" == "UNX"
91INCPOST += \
92$(MOZ_INC)$/profile \
93-I$(MOZ_INC)$/string \
94-I$(MOZ_INC)$/embed_base
95#.IF "$(OS)" == "LINUX"
96#CFLAGS +=   -fPIC -g
97#CFLAGSCXX += \
98#            -fno-rtti -Wall -Wconversion -Wpointer-arith \
99#            -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth \
100#            -Wno-long-long -pthread
101#CDEFS     += -DTRACING
102#.ELIF "$(OS)" == "NETBSD"
103#CFLAGS +=   -fPIC
104#CFLAGSCXX += \
105#            -fno-rtti -Wall -Wconversion -Wpointer-arith \
106#            -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth \
107#            -Wno-long-long
108#CDEFS     += -DTRACING
109#.ENDIF
110.ENDIF
111
112.IF "$(CRYPTO_ENGINE)" == "nss"
113CDEFS += -DXMLSEC_CRYPTO_NSS
114.ENDIF
115
116CDEFS += -DXMLSEC_NO_XSLT
117
118# --- Files --------------------------------------------------------
119
120SOLARINC += \
121 -I$(MOZ_INC) \
122-I$(NSPR_INC) \
123-I$(PRJ)$/source$/xmlsec
124
125.IF "$(SYSTEM_MOZILLA)" == "YES"
126SOLARINC += -DSYSTEM_MOZILLA $(NSS_INC)
127.ELSE
128SOLARINC += -I$(NSS_INC)
129.ENDIF
130
131SLOFILES = \
132	$(SLO)$/nssinitializer.obj \
133	$(SLO)$/digestcontext.obj \
134	$(SLO)$/ciphercontext.obj \
135	$(SLO)$/xsec_nss.obj
136
137.IF "$(CRYPTO_ENGINE)" == "nss"
138SLOFILES += \
139	$(SLO)$/securityenvironment_nssimpl.obj \
140	$(SLO)$/seinitializer_nssimpl.obj \
141	$(SLO)$/xmlencryption_nssimpl.obj \
142	$(SLO)$/xmlsecuritycontext_nssimpl.obj \
143	$(SLO)$/xmlsignature_nssimpl.obj \
144	$(SLO)$/x509certificate_nssimpl.obj \
145	$(SLO)$/sanextension_nssimpl.obj \
146    $(SLO)$/secerror.obj
147
148.ENDIF
149
150# --- Targets ------------------------------------------------------
151
152.INCLUDE :  target.mk
153