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