xref: /aoo42x/main/xmlsecurity/tools/demo/makefile.mk (revision cdf0e10c)
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
11# OpenOffice.org is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License version 3
13# only, as published by the Free Software Foundation.
14#
15# OpenOffice.org is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18# GNU Lesser General Public License version 3 for more details
19# (a copy is included in the LICENSE file that accompanied this code).
20#
21# You should have received a copy of the GNU Lesser General Public License
22# version 3 along with OpenOffice.org.  If not, see
23# <http://www.openoffice.org/license.html>
24# for a copy of the LGPLv3 License.
25#
26#*************************************************************************
27
28PRJ=..$/..
29
30PRJNAME=xmlsecurity
31TARGET=demo
32ENABLE_EXCEPTIONS=TRUE
33NO_BSYMBOLIC=TRUE
34LIBTARGET=NO
35
36# --- Settings -----------------------------------------------------
37
38.INCLUDE :  settings.mk
39.INCLUDE :	$(PRJ)$/util$/target.pmk
40
41CDEFS += -DXMLSEC_CRYPTO_NSS -DXMLSEC_NO_XSLT
42
43# --- Files --------------------------------------------------------
44
45SHARE_LIBS =			\
46	$(CPPULIB)			\
47	$(CPPUHELPERLIB)	\
48	$(SALLIB)			\
49	$(UCBHELPERLIB)		\
50	$(UNOTOOLSLIB)		\
51	$(TOOLSLIB)			\
52	$(XMLOFFLIB)		\
53	$(LIBXML2LIB)		\
54	$(NSS3LIB)			\
55	$(NSPR4LIB)			\
56	$(XMLSECLIB)		\
57	$(COMPHELPERLIB)
58
59.IF "$(CRYPTO_ENGINE)" == "mscrypto"
60SHARE_LIBS+= $(XMLSECLIB-MS)
61.ELSE
62SHARE_LIBS+= $(XMLSECLIB-NSS)
63.ENDIF
64
65
66
67# HACK: Use SLO for demo directly...
68SHARE_OBJS =	\
69	$(OBJ)$/util.obj \
70	$(OBJ)$/util2.obj \
71	$(SLO)$/biginteger.obj \
72	$(SLO)$/baseencoding.obj \
73	$(SLO)/xmlsignaturehelper.obj	\
74	$(SLO)/xmlsignaturehelper2.obj	\
75	$(SLO)/xsecctl.obj	\
76	$(SLO)/xsecparser.obj	\
77	$(SLO)/xsecsign.obj	\
78	$(SLO)/xsecverify.obj
79
80#
81# ---------- signdemo ----------
82#
83APP1TARGET=signdemo
84APP1DEPN=makefile.mk
85APP1STDLIBS+=$(SHARE_LIBS)
86APP1OBJS= $(SHARE_OBJS)	$(OBJ)$/signdemo.obj
87
88#
89# ---------- verifydemo ----------
90#
91APP2TARGET=verifydemo
92APP2DEPN=makefile.mk
93APP2STDLIBS+=$(SHARE_LIBS)
94APP2OBJS= $(SHARE_OBJS)	$(OBJ)$/verifydemo.obj
95
96#
97# ---------- multisigdemo ----------
98#
99APP3TARGET=multisigdemo
100APP3DEPN=makefile.mk
101APP3STDLIBS+=$(SHARE_LIBS)
102APP3OBJS= $(SHARE_OBJS)	$(OBJ)$/multisigdemo.obj
103
104#
105# ---------- mozprofile ----------
106#
107APP4TARGET=mozprofile
108APP4DEPN=makefile.mk
109APP4STDLIBS+=$(SHARE_LIBS)
110APP4OBJS= $(SHARE_OBJS)	$(OBJ)$/mozprofile.obj
111
112#
113# ---------- performance ----------
114#
115APP5TARGET=performance
116APP5DEPN=makefile.mk
117APP5STDLIBS+=$(SHARE_LIBS)
118APP5OBJS= $(OBJ)$/util.obj	$(OBJ)$/performance.obj
119
120#
121# ---------- jflatfilter ----------
122#
123PACKAGE=	    com$/sun$/star$/xml$/security$/eval
124JARFILES=       ridl.jar jurt.jar unoil.jar juh.jar
125JAVAFILES:=     $(shell @ls *.java)
126JAVACLASSFILES= $(CLASSDIR)$/$(PACKAGE)$/JavaFlatFilter.class
127JARCLASSDIRS=   $(PACKAGE)
128JARTARGET=      jflatfilter.jar
129JARCOMPRESS=    TRUE
130
131
132# --- Targets ------------------------------------------------------
133
134.INCLUDE :  target.mk
135
136ALLTAR : $(BIN)$/demo.rdb
137
138$(JAVACLASSFILES) : $(JAVAFILES)
139
140REGISTERLIBS=					\
141	dynamicloader.uno$(DLLPOST) \
142	namingservice.uno$(DLLPOST) \
143	bootstrap.uno$(DLLPOST)	\
144	sax.uno$(DLLPOST)			\
145	$(DLLPRE)mozab2$(DLLPOST)
146
147$(BIN)$/demo.rdb: \
148		makefile.mk \
149	$(foreach,i,$(REGISTERLIBS) $(SOLARSHAREDBIN)$/$(i))
150	-rm -f $@ $(BIN)$/regcomp.rdb $(BIN)$/demo.tmp
151	$(REGCOMP) -register -r $(BIN)$/demo.tmp -c "$(strip $(REGISTERLIBS))"
152	$(REGCOMP) -register -r $(BIN)$/demo.tmp -c $(DLLPRE)xsec_fw$(DLLPOST)
153	$(REGCOMP) -register -r $(BIN)$/demo.tmp -c $(DLLPRE)xsec_xmlsec$(DLLPOST)
154	$(REGMERGE) $(BIN)$/demo.tmp / $(SOLARBINDIR)/types.rdb
155	mv $(BIN)$/demo.tmp $@
156
157
158