1*7871dc3eSAndrew Rist#**************************************************************
2*7871dc3eSAndrew Rist#
3*7871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*7871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*7871dc3eSAndrew Rist#  distributed with this work for additional information
6*7871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*7871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*7871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
9*7871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
10*7871dc3eSAndrew Rist#
11*7871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*7871dc3eSAndrew Rist#
13*7871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*7871dc3eSAndrew Rist#  software distributed under the License is distributed on an
15*7871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
17*7871dc3eSAndrew Rist#  specific language governing permissions and limitations
18*7871dc3eSAndrew Rist#  under the License.
19*7871dc3eSAndrew Rist#
20*7871dc3eSAndrew Rist#**************************************************************
21*7871dc3eSAndrew Rist
22*7871dc3eSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweirPRJ=..$/..$/..
25cdf0e10cSrcweir
26cdf0e10cSrcweirPRJNAME = xmlsecurity
27cdf0e10cSrcweirTARGET = xs_nss
28cdf0e10cSrcweir
29cdf0e10cSrcweirENABLE_EXCEPTIONS = TRUE
30cdf0e10cSrcweir
31cdf0e10cSrcweir# --- Settings -----------------------------------------------------
32cdf0e10cSrcweir
33cdf0e10cSrcweir.INCLUDE :  settings.mk
34cdf0e10cSrcweir.INCLUDE :	$(PRJ)$/util$/target.pmk
35cdf0e10cSrcweir
36cdf0e10cSrcweir.IF "$(SYSTEM_LIBXML)" == "YES"
37cdf0e10cSrcweirCFLAGS+=-DSYSTEM_LIBXML $(LIBXML_CFLAGS)
38cdf0e10cSrcweir.ENDIF
39cdf0e10cSrcweir
40cdf0e10cSrcweir.IF "$(WITH_MOZILLA)" == "NO" || "$(ENABLE_NSS_MODULE)"!="YES"
41cdf0e10cSrcweir.IF "$(SYSTEM_MOZILLA)" != "YES"
42cdf0e10cSrcweir@all:
43cdf0e10cSrcweir	@echo "No mozilla -> no nss -> no libxmlsec -> no xmlsecurity/nss"
44cdf0e10cSrcweir.ENDIF
45cdf0e10cSrcweir.ENDIF
46cdf0e10cSrcweir
47cdf0e10cSrcweir.IF "$(SYSTEM_MOZILLA)" != "YES"
48cdf0e10cSrcweirMOZ_INC = $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla
49cdf0e10cSrcweirNSS_INC = $(MOZ_INC)$/nss
50cdf0e10cSrcweirNSPR_INC = $(MOZ_INC)$/nspr
51cdf0e10cSrcweir.ELSE
52cdf0e10cSrcweir# MOZ_INC already defined from environment
53cdf0e10cSrcweirNSS_INC = $(MOZ_NSS_CFLAGS)
54cdf0e10cSrcweirNSPR_INC = $(MOZ_INC)$/nspr
55cdf0e10cSrcweir.ENDIF
56cdf0e10cSrcweir
57cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
58cdf0e10cSrcweir.IF "$(COMNAME)"=="sunpro5"
59cdf0e10cSrcweirCFLAGS += -features=tmplife
60cdf0e10cSrcweir#This flag is needed to build mozilla 1.7 code
61cdf0e10cSrcweir.ENDIF		# "$(COMNAME)"=="sunpro5"
62cdf0e10cSrcweir.ENDIF
63cdf0e10cSrcweir
64cdf0e10cSrcweir.IF "$(GUI)" == "WNT"
65cdf0e10cSrcweir.IF "$(DBG_LEVEL)" == "0"
66cdf0e10cSrcweirINCPRE += \
67cdf0e10cSrcweir-I$(MOZ_INC)$/profile \
68cdf0e10cSrcweir-I$(MOZ_INC)$/string \
69cdf0e10cSrcweir-I$(MOZ_INC)$/embed_base
705d5bb310SMichael Stahl.IF "$(COM)"=="GCC"
715d5bb310SMichael StahlCFLAGS += $(CFLAGSDEBUG)
725d5bb310SMichael Stahl.ELSE
73cdf0e10cSrcweirCFLAGS +=   -GR- -W3 -Gy -MD -UDEBUG
745d5bb310SMichael Stahl.ENDIF
75cdf0e10cSrcweir.ELSE
76cdf0e10cSrcweirINCPRE += \
77cdf0e10cSrcweir-I$(MOZ_INC)$/profile \
78cdf0e10cSrcweir-I$(MOZ_INC)$/string \
79cdf0e10cSrcweir-I$(MOZ_INC)$/embed_base
805d5bb310SMichael Stahl.IF "$(COM)"=="GCC"
815d5bb310SMichael Stahl.ELSE
82cdf0e10cSrcweirCFLAGS += -Zi -GR- -W3 -Gy -MDd -UNDEBUG
83cdf0e10cSrcweir.ENDIF
84cdf0e10cSrcweir.ENDIF
855d5bb310SMichael Stahl.ENDIF
86cdf0e10cSrcweir.IF "$(GUI)" == "UNX"
87cdf0e10cSrcweirINCPOST += \
88cdf0e10cSrcweir$(MOZ_INC)$/profile \
89cdf0e10cSrcweir-I$(MOZ_INC)$/string \
90cdf0e10cSrcweir-I$(MOZ_INC)$/embed_base
91cdf0e10cSrcweir#.IF "$(OS)" == "LINUX"
92cdf0e10cSrcweir#CFLAGS +=   -fPIC -g
93cdf0e10cSrcweir#CFLAGSCXX += \
94cdf0e10cSrcweir#            -fno-rtti -Wall -Wconversion -Wpointer-arith \
95cdf0e10cSrcweir#            -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth \
96cdf0e10cSrcweir#            -Wno-long-long -pthread
97cdf0e10cSrcweir#CDEFS     += -DTRACING
98cdf0e10cSrcweir#.ELIF "$(OS)" == "NETBSD"
99cdf0e10cSrcweir#CFLAGS +=   -fPIC
100cdf0e10cSrcweir#CFLAGSCXX += \
101cdf0e10cSrcweir#            -fno-rtti -Wall -Wconversion -Wpointer-arith \
102cdf0e10cSrcweir#            -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth \
103cdf0e10cSrcweir#            -Wno-long-long
104cdf0e10cSrcweir#CDEFS     += -DTRACING
105cdf0e10cSrcweir#.ENDIF
106cdf0e10cSrcweir.ENDIF
107cdf0e10cSrcweir
108cdf0e10cSrcweir.IF "$(CRYPTO_ENGINE)" == "nss"
109cdf0e10cSrcweirCDEFS += -DXMLSEC_CRYPTO_NSS
110cdf0e10cSrcweir.ENDIF
111cdf0e10cSrcweir
112cdf0e10cSrcweirCDEFS += -DXMLSEC_NO_XSLT
113cdf0e10cSrcweir
114cdf0e10cSrcweir# --- Files --------------------------------------------------------
115cdf0e10cSrcweir
116cdf0e10cSrcweirSOLARINC += \
117cdf0e10cSrcweir -I$(MOZ_INC) \
118cdf0e10cSrcweir-I$(NSPR_INC) \
119cdf0e10cSrcweir-I$(PRJ)$/source$/xmlsec
120cdf0e10cSrcweir
121cdf0e10cSrcweir.IF "$(SYSTEM_MOZILLA)" == "YES"
122cdf0e10cSrcweirSOLARINC += -DSYSTEM_MOZILLA $(NSS_INC)
123cdf0e10cSrcweir.ELSE
124cdf0e10cSrcweirSOLARINC += -I$(NSS_INC)
125cdf0e10cSrcweir.ENDIF
126cdf0e10cSrcweir
127cdf0e10cSrcweirSLOFILES = \
128cdf0e10cSrcweir	$(SLO)$/nssinitializer.obj \
129cdf0e10cSrcweir	$(SLO)$/digestcontext.obj \
130cdf0e10cSrcweir	$(SLO)$/ciphercontext.obj \
131cdf0e10cSrcweir	$(SLO)$/xsec_nss.obj
132cdf0e10cSrcweir
133cdf0e10cSrcweir.IF "$(CRYPTO_ENGINE)" == "nss"
134cdf0e10cSrcweirSLOFILES += \
135cdf0e10cSrcweir	$(SLO)$/securityenvironment_nssimpl.obj \
136cdf0e10cSrcweir	$(SLO)$/seinitializer_nssimpl.obj \
137cdf0e10cSrcweir	$(SLO)$/xmlencryption_nssimpl.obj \
138cdf0e10cSrcweir	$(SLO)$/xmlsecuritycontext_nssimpl.obj \
139cdf0e10cSrcweir	$(SLO)$/xmlsignature_nssimpl.obj \
140cdf0e10cSrcweir	$(SLO)$/x509certificate_nssimpl.obj \
141cdf0e10cSrcweir	$(SLO)$/sanextension_nssimpl.obj \
142cdf0e10cSrcweir    $(SLO)$/secerror.obj
143cdf0e10cSrcweir
144cdf0e10cSrcweir.ENDIF
145cdf0e10cSrcweir
146cdf0e10cSrcweir# --- Targets ------------------------------------------------------
147cdf0e10cSrcweir
148cdf0e10cSrcweir.INCLUDE :  target.mk
149