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