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_MOZILLA)" != "YES"
46MOZ_INC = $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla
47NSS_INC = $(MOZ_INC)$/nss
48NSPR_INC = $(MOZ_INC)$/nspr
49.ELSE
50# MOZ_INC already defined from environment
51NSS_INC = $(MOZ_NSS_CFLAGS)
52NSPR_INC = $(MOZ_INC)$/nspr
53.ENDIF
54
55.IF "$(GUI)" == "WNT"
56.IF "$(DBG_LEVEL)" == "0"
57INCPRE += \
58-I$(MOZ_INC)$/profile \
59-I$(MOZ_INC)$/string \
60-I$(MOZ_INC)$/embed_base
61.IF "$(COM)"=="GCC"
62CFLAGS += $(CFLAGSDEBUG)
63.ELSE
64CFLAGS +=   -GR- -W3 -Gy -MD -UDEBUG
65.ENDIF
66.ELSE
67INCPRE += \
68-I$(MOZ_INC)$/profile \
69-I$(MOZ_INC)$/string \
70-I$(MOZ_INC)$/embed_base
71.IF "$(COM)"=="GCC"
72.ELSE
73CFLAGS += -Zi -GR- -W3 -Gy -MDd -UNDEBUG
74.ENDIF
75.ENDIF
76.ENDIF
77.IF "$(GUI)" == "UNX"
78INCPOST += \
79$(MOZ_INC)$/profile \
80-I$(MOZ_INC)$/string \
81-I$(MOZ_INC)$/embed_base
82#.IF "$(OS)" == "LINUX"
83#CFLAGS +=   -fPIC -g
84#CFLAGSCXX += \
85#            -fno-rtti -Wall -Wconversion -Wpointer-arith \
86#            -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth \
87#            -Wno-long-long -pthread
88#CDEFS     += -DTRACING
89#.ELIF "$(OS)" == "NETBSD"
90#CFLAGS +=   -fPIC
91#CFLAGSCXX += \
92#            -fno-rtti -Wall -Wconversion -Wpointer-arith \
93#            -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth \
94#            -Wno-long-long
95#CDEFS     += -DTRACING
96#.ENDIF
97.ENDIF
98
99.IF "$(CRYPTO_ENGINE)" == "nss"
100CDEFS += -DXMLSEC_CRYPTO_NSS
101.ENDIF
102
103CDEFS += -DXMLSEC_NO_XSLT
104
105# --- Files --------------------------------------------------------
106
107SOLARINC += \
108 -I$(MOZ_INC) \
109-I$(NSPR_INC) \
110-I$(PRJ)$/source$/xmlsec
111
112SOLARINC += -I$(NSS_INC)
113
114SLOFILES = \
115	$(SLO)$/nssinitializer.obj \
116	$(SLO)$/digestcontext.obj \
117	$(SLO)$/ciphercontext.obj \
118	$(SLO)$/xsec_nss.obj
119
120.IF "$(CRYPTO_ENGINE)" == "nss"
121SLOFILES += \
122	$(SLO)$/securityenvironment_nssimpl.obj \
123	$(SLO)$/seinitializer_nssimpl.obj \
124	$(SLO)$/xmlencryption_nssimpl.obj \
125	$(SLO)$/xmlsecuritycontext_nssimpl.obj \
126	$(SLO)$/xmlsignature_nssimpl.obj \
127	$(SLO)$/x509certificate_nssimpl.obj \
128	$(SLO)$/sanextension_nssimpl.obj \
129    $(SLO)$/secerror.obj
130
131.ENDIF
132
133# --- Targets ------------------------------------------------------
134
135.INCLUDE :  target.mk
136