1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24PRJ=..$/..$/..
25
26PRJNAME = xmlsecurity
27TARGET = xs_nss
28
29ENABLE_EXCEPTIONS = TRUE
30
31# --- Settings -----------------------------------------------------
32
33.INCLUDE :  settings.mk
34.INCLUDE :	$(PRJ)$/util$/target.pmk
35
36.IF "$(SYSTEM_LIBXML)" == "YES"
37CFLAGS+=-DSYSTEM_LIBXML $(LIBXML_CFLAGS)
38.ENDIF
39
40.IF "$(ENABLE_NSS_MODULE)"!="YES"
41@all:
42	@echo "No nss -> no libxmlsec -> no xmlsecurity/nss"
43.ENDIF
44
45.IF "$(SYSTEM_NSS)" != "YES"
46MOZ_INC = $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla
47NSS_CFLAGS = -I$(MOZ_INC)$/nss
48NSPR_CFLAGS = -I$(MOZ_INC)$/nspr
49.ELIF "$(GUI)" == "OS2"
50NSS_CFLAGS = -I/@unixroot/usr/include/nss3
51NSPR_CFLAGS = I/@unixroot/usr/include/nspr4
52.ENDIF
53
54.IF "$(GUI)" == "WNT"
55.IF "$(DBG_LEVEL)" == "0"
56INCPRE += \
57-I$(MOZ_INC)$/profile \
58-I$(MOZ_INC)$/string \
59-I$(MOZ_INC)$/embed_base
60.IF "$(COM)"=="GCC"
61CFLAGS += $(CFLAGSDEBUG)
62.ELSE
63CFLAGS +=   -GR- -W3 -Gy -MD -UDEBUG
64.ENDIF
65.ELSE
66INCPRE += \
67-I$(MOZ_INC)$/profile \
68-I$(MOZ_INC)$/string \
69-I$(MOZ_INC)$/embed_base
70.IF "$(COM)"=="GCC"
71.ELSE
72CFLAGS += -Zi -GR- -W3 -Gy -MDd -UNDEBUG
73.ENDIF
74.ENDIF
75.ENDIF
76.IF "$(GUI)" == "UNX"
77INCPOST += \
78$(MOZ_INC)$/profile \
79-I$(MOZ_INC)$/string \
80-I$(MOZ_INC)$/embed_base
81#.IF "$(OS)" == "LINUX"
82#CFLAGS +=   -fPIC -g
83#CFLAGSCXX += \
84#            -fno-rtti -Wall -Wconversion -Wpointer-arith \
85#            -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth \
86#            -Wno-long-long -pthread
87#CDEFS     += -DTRACING
88#.ELIF "$(OS)" == "NETBSD"
89#CFLAGS +=   -fPIC
90#CFLAGSCXX += \
91#            -fno-rtti -Wall -Wconversion -Wpointer-arith \
92#            -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth \
93#            -Wno-long-long
94#CDEFS     += -DTRACING
95#.ENDIF
96.ENDIF
97
98.IF "$(CRYPTO_ENGINE)" == "nss"
99CDEFS += -DXMLSEC_CRYPTO_NSS
100.ENDIF
101
102CDEFS += -DXMLSEC_NO_XSLT
103
104# --- Files --------------------------------------------------------
105
106SOLARINC += \
107 $(NSPR_CFLAGS) \
108 -I$(PRJ)$/source$/xmlsec
109
110SOLARINC += $(NSS_CFLAGS)
111
112SLOFILES = \
113	$(SLO)$/nssinitializer.obj \
114	$(SLO)$/digestcontext.obj \
115	$(SLO)$/ciphercontext.obj \
116	$(SLO)$/xsec_nss.obj
117
118.IF "$(CRYPTO_ENGINE)" == "nss"
119SLOFILES += \
120	$(SLO)$/securityenvironment_nssimpl.obj \
121	$(SLO)$/seinitializer_nssimpl.obj \
122	$(SLO)$/xmlencryption_nssimpl.obj \
123	$(SLO)$/xmlsecuritycontext_nssimpl.obj \
124	$(SLO)$/xmlsignature_nssimpl.obj \
125	$(SLO)$/x509certificate_nssimpl.obj \
126	$(SLO)$/sanextension_nssimpl.obj \
127    $(SLO)$/secerror.obj
128
129.ENDIF
130
131# --- Targets ------------------------------------------------------
132
133.INCLUDE :  target.mk
134