xref: /aoo41x/main/xmlsecurity/tools/demo/makefile.mk (revision 7871dc3e)
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# ---------- mozprofile ----------
102#
103APP4TARGET=mozprofile
104APP4DEPN=makefile.mk
105APP4STDLIBS+=$(SHARE_LIBS)
106APP4OBJS= $(SHARE_OBJS)	$(OBJ)$/mozprofile.obj
107
108#
109# ---------- performance ----------
110#
111APP5TARGET=performance
112APP5DEPN=makefile.mk
113APP5STDLIBS+=$(SHARE_LIBS)
114APP5OBJS= $(OBJ)$/util.obj	$(OBJ)$/performance.obj
115
116#
117# ---------- jflatfilter ----------
118#
119PACKAGE=	    com$/sun$/star$/xml$/security$/eval
120JARFILES=       ridl.jar jurt.jar unoil.jar juh.jar
121JAVAFILES:=     $(shell @ls *.java)
122JAVACLASSFILES= $(CLASSDIR)$/$(PACKAGE)$/JavaFlatFilter.class
123JARCLASSDIRS=   $(PACKAGE)
124JARTARGET=      jflatfilter.jar
125JARCOMPRESS=    TRUE
126
127
128# --- Targets ------------------------------------------------------
129
130.INCLUDE :  target.mk
131
132ALLTAR : $(BIN)$/demo.rdb
133
134$(JAVACLASSFILES) : $(JAVAFILES)
135
136REGISTERLIBS=					\
137	dynamicloader.uno$(DLLPOST) \
138	namingservice.uno$(DLLPOST) \
139	bootstrap.uno$(DLLPOST)	\
140	sax.uno$(DLLPOST)			\
141	$(DLLPRE)mozab2$(DLLPOST)
142
143$(BIN)$/demo.rdb: \
144		makefile.mk \
145	$(foreach,i,$(REGISTERLIBS) $(SOLARSHAREDBIN)$/$(i))
146	-rm -f $@ $(BIN)$/regcomp.rdb $(BIN)$/demo.tmp
147	$(REGCOMP) -register -r $(BIN)$/demo.tmp -c "$(strip $(REGISTERLIBS))"
148	$(REGCOMP) -register -r $(BIN)$/demo.tmp -c $(DLLPRE)xsec_fw$(DLLPOST)
149	$(REGCOMP) -register -r $(BIN)$/demo.tmp -c $(DLLPRE)xsec_xmlsec$(DLLPOST)
150	$(REGMERGE) $(BIN)$/demo.tmp / $(SOLARBINDIR)/types.rdb
151	mv $(BIN)$/demo.tmp $@
152
153
154