xref: /aoo42x/main/xmlsecurity/tools/demo/makefile.mk (revision 74cab430)
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=demo
28ENABLE_EXCEPTIONS=TRUE
29NO_BSYMBOLIC=TRUE
30LIBTARGET=NO
31
32# --- Settings -----------------------------------------------------
33
34.INCLUDE :  settings.mk
35.INCLUDE :	$(PRJ)$/util$/target.pmk
36
37CDEFS += -DXMLSEC_CRYPTO_NSS -DXMLSEC_NO_XSLT
38
39# --- Files --------------------------------------------------------
40
41SHARE_LIBS =			\
42	$(CPPULIB)			\
43	$(CPPUHELPERLIB)	\
44	$(SALLIB)			\
45	$(UCBHELPERLIB)		\
46	$(UNOTOOLSLIB)		\
47	$(TOOLSLIB)			\
48	$(XMLOFFLIB)		\
49	$(LIBXML2LIB)		\
50	$(NSS3LIB)			\
51	$(NSPR4LIB)			\
52	$(XMLSECLIB)		\
53	$(COMPHELPERLIB)
54
55.IF "$(CRYPTO_ENGINE)" == "mscrypto"
56SHARE_LIBS+= $(XMLSECLIB-MS)
57.ELSE
58SHARE_LIBS+= $(XMLSECLIB-NSS)
59.ENDIF
60
61
62
63# HACK: Use SLO for demo directly...
64SHARE_OBJS =	\
65	$(OBJ)$/util.obj \
66	$(OBJ)$/util2.obj \
67	$(SLO)$/biginteger.obj \
68	$(SLO)$/baseencoding.obj \
69	$(SLO)/xmlsignaturehelper.obj	\
70	$(SLO)/xmlsignaturehelper2.obj	\
71	$(SLO)/xsecctl.obj	\
72	$(SLO)/xsecparser.obj	\
73	$(SLO)/xsecsign.obj	\
74	$(SLO)/xsecverify.obj
75
76#
77# ---------- signdemo ----------
78#
79APP1TARGET=signdemo
80APP1DEPN=makefile.mk
81APP1STDLIBS+=$(SHARE_LIBS)
82APP1OBJS= $(SHARE_OBJS)	$(OBJ)$/signdemo.obj
83
84#
85# ---------- verifydemo ----------
86#
87APP2TARGET=verifydemo
88APP2DEPN=makefile.mk
89APP2STDLIBS+=$(SHARE_LIBS)
90APP2OBJS= $(SHARE_OBJS)	$(OBJ)$/verifydemo.obj
91
92#
93# ---------- multisigdemo ----------
94#
95APP3TARGET=multisigdemo
96APP3DEPN=makefile.mk
97APP3STDLIBS+=$(SHARE_LIBS)
98APP3OBJS= $(SHARE_OBJS)	$(OBJ)$/multisigdemo.obj
99
100#
101# ---------- performance ----------
102#
103APP5TARGET=performance
104APP5DEPN=makefile.mk
105APP5STDLIBS+=$(SHARE_LIBS)
106APP5OBJS= $(OBJ)$/util.obj	$(OBJ)$/performance.obj
107
108#
109# ---------- jflatfilter ----------
110#
111PACKAGE=	    com$/sun$/star$/xml$/security$/eval
112JARFILES=       ridl.jar jurt.jar unoil.jar juh.jar
113JAVAFILES:=     $(shell @ls *.java)
114JAVACLASSFILES= $(CLASSDIR)$/$(PACKAGE)$/JavaFlatFilter.class
115JARCLASSDIRS=   $(PACKAGE)
116JARTARGET=      jflatfilter.jar
117JARCOMPRESS=    TRUE
118
119
120# --- Targets ------------------------------------------------------
121
122.INCLUDE :  target.mk
123
124ALLTAR : $(BIN)$/demo.rdb
125
126$(JAVACLASSFILES) : $(JAVAFILES)
127
128REGISTERLIBS=					\
129	dynamicloader.uno$(DLLPOST) \
130	namingservice.uno$(DLLPOST) \
131	bootstrap.uno$(DLLPOST)	\
132	sax.uno$(DLLPOST)
133
134$(BIN)$/demo.rdb: \
135		makefile.mk \
136	$(foreach,i,$(REGISTERLIBS) $(SOLARSHAREDBIN)$/$(i))
137	-rm -f $@ $(BIN)$/regcomp.rdb $(BIN)$/demo.tmp
138	$(REGCOMP) -register -r $(BIN)$/demo.tmp -c "$(strip $(REGISTERLIBS))"
139	$(REGCOMP) -register -r $(BIN)$/demo.tmp -c $(DLLPRE)xsec_fw$(DLLPOST)
140	$(REGCOMP) -register -r $(BIN)$/demo.tmp -c $(DLLPRE)xsec_xmlsec$(DLLPOST)
141	$(REGMERGE) $(BIN)$/demo.tmp / $(SOLARBINDIR)/types.rdb
142	mv $(BIN)$/demo.tmp $@
143
144
145