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#*************************************************************************
27PRJ=..$/..$/..$/..
28
29PRJNAME=xmlsecurity
30TARGET=xmlsecurity-secfit-boot
31TARGETTYPE=GUI
32
33GEN_HID=TRUE
34APP2NOSAL=TRUE
35
36# --- Settings -----------------------------------------------------------
37USE_JAVAVER=TRUE
38
39.INCLUDE :  settings.mk
40
41VERINFONAME=verinfo
42
43.INCLUDE :  target.mk
44.INCLUDE :	$(PRJ)$/util$/target.pmk
45
46# -------------------------------------------------------------------------
47# --- Targets -------------------------------------------------------------
48
49ALLTAR : $(BIN)$/boot_services.rdb
50
51REGISTERLIBS= \
52	i18npool.uno$(DLLPOST) \
53	$(DLLPRE)tk$(DLLPOSTFIX)$(DLLPOST) \
54	$(DLLPRE)mcnttype$(DLLPOST)
55
56#	$(DLLPRE)i18n$(DLLPOSTFIX)$(DLLPOST) \
57#	$(DLLPRE)i18npool$(DLLPOSTFIX)$(DLLPOST) \
58#	$(DLLPRE)tk$(DLLPOSTFIX)$(DLLPOST) \
59#	$(DLLPRE)mcnttype$(DLLPOST)
60
61# Additional libraries
62DLLPRE_NO=
63REGISTERLIBS+= \
64	$(DLLPRE_NO)dynamicloader.uno$(DLLPOST) \
65	$(DLLPRE_NO)namingservice.uno$(DLLPOST) \
66	$(DLLPRE_NO)bootstrap.uno$(DLLPOST) \
67	$(DLLPRE)xsec_fw$(DLLPOST) \
68	$(DLLPRE)xsec_xmlsec$(DLLPOST)
69
70.IF "$(GUI)" == "UNX"
71MY_DLLDIR=$(SOLARLIBDIR)
72REGISTERLIBS+= \
73	$(DLLPRE)dtransX11$(DLLPOSTFIX)$(DLLPOST)
74
75.ELSE			# "$(GUI)" == "UNX"
76.IF "$(GUI)"=="WNT"
77
78MY_DLLDIR=$(SOLARBINDIR)
79REGISTERLIBS+= \
80	$(DLLPRE)sysdtrans$(DLLPOST) \
81	$(DLLPRE)ftransl$(DLLPOST) \
82	$(DLLPRE)dnd$(DLLPOST)
83
84.ELSE			# "$(GUI)"=="WNT"
85
86	@echo "**********************************************************"
87	@echo "*** unknown platform: don't know which librarys to use ***"
88	@echo "**********************************************************"
89	force_dmake_to_error
90.ENDIF			# "$(GUI)"=="WNT"
91.ENDIF			# "$(GUI)" == "UNX"
92
93.IF "$(SOLAR_JAVA)" != ""
94.IF "$(JAVANUMVER)" >= "000100040000"
95# native libraries, which are only necessary, when java shall run within setup
96REGISTERLIBS_JAVA= \
97	javavm.uno$(DLLPOST) \
98	javaloader.uno$(DLLPOST)
99
100# add here java components, which shall run with setup
101REGISTERJARS=\
102	java_uno_accessbridge.jar
103#	xsec_jxsec.jar
104
105# jar-files, which regcomp needs so that it can use java
106REGCOMP_JARS=unoil.jar java_uno.jar ridl.jar jurt.jar juh.jar
107
108# CLASSPATH, which regcomp needs to be run
109# $(SOLARLIBDIR) needs to be included in case Java components are registered,
110# because java_uno.jar needs to find the native java_uno shared library:
111MY_CLASSPATH_TMP=$(foreach,i,$(REGCOMP_JARS) $(SOLARBINDIR)$/$i)$(PATH_SEPERATOR)$(SOLARLIBDIR)$(PATH_SEPERATOR)$(XCLASSPATH)
112REGCOMP_CLASSPATH=$(strip $(subst,!,$(PATH_SEPERATOR) $(MY_CLASSPATH_TMP:s/ /!/)))
113
114.IF "$(GUI)"!="WNT"
115DOLLAR_SIGN=\$$
116MY_JAVA_COMPPATH=file://$(SOLARBINDIR)
117.IF "$(OS)"=="MACOSX"
118REGCOMP_ENV=\
119	setenv CLASSPATH $(REGCOMP_CLASSPATH) && \
120	setenv DYLD_LIBRARY_PATH $(DYLD_LIBRARY_PATH):$(JDKLIB)
121.ELSE
122REGCOMP_ENV=\
123	setenv CLASSPATH $(REGCOMP_CLASSPATH) && \
124	setenv LD_LIBRARY_PATH $(LD_LIBRARY_PATH):$(JDKLIB)
125.ENDIF
126.ELSE # "$(GUI)" != "WNT"
127.IF "$(USE_SHELL)" != "4nt"
128DOLLAR_SIGN=\$$
129REGCOMP_ENV=\
130	setenv CLASSPATH "$(strip $(subst,\,/ $(shell @guw.pl echo $(REGCOMP_CLASSPATH))))" && \
131	setenv PATH "$(PATH):$(JREPATH)"
132MY_JAVA_COMPPATH=$(strip $(subst,\,/ file:///$(shell @guw.pl echo $(SOLARBINDIR))))
133.ELSE # "$(USE_SHELL)" != "4nt"
134DOLLAR_SIGN=$$
135REGCOMP_ENV=\
136	set CLASSPATH=$(REGCOMP_CLASSPATH) && \
137	set PATH=$(PATH);$(JREPATH)
138MY_JAVA_COMPPATH=$(strip $(subst,\,/ file:///$(SOLARBINDIR)))
139.ENDIF  # "$(USE_SHELL)" != "4nt"
140.ENDIF  # "$(GUI)"!="WNT"
141.ENDIF  # "$(JAVANUMVER)" >= "000100040000"
142.ENDIF  # "$(SOLAR_JAVA)" != ""
143
144$(BIN)$/boot_services.rdb: \
145		makefile.mk \
146		$(foreach,i,$(REGISTERLIBS) $(MY_DLLDIR)$/$(i)) \
147		$(foreach,i,$(REGISTERLIBS_JAVA) $(MY_DLLDIR)$/$(i))
148	-rm -f $@ $(BIN)$/regcomp.rdb $(BIN)$/boot_services.tmp
149# register the native libraries
150	$(REGCOMP) -register -r $(BIN)$/boot_services.tmp -c "$(strip $(REGISTERLIBS))"
151.IF "$(SOLAR_JAVA)" != ""
152.IF "$(OS)"!="MACOSX"
153.IF "$(JAVANUMVER)" >= "000100040000"
154	$(REGCOMP) -register -r $(BIN)$/boot_services.tmp -c "$(strip $(REGISTERLIBS_JAVA))"
155# prepare a registry which regcomp can work on (types+java services)
156	$(REGCOMP) -register -r $(BIN)$/regcomp.rdb -c "$(strip $(REGISTERLIBS_JAVA))"
157	$(REGMERGE) $(BIN)$/regcomp.rdb / $(SOLARBINDIR)/udkapi.rdb
158# now do the registration
159	$(REGCOMP_ENV) && \
160		$(REGCOMP) -br $(BIN)$/regcomp.rdb 			\
161			-register					\
162			-r $(BIN)$/boot_services.tmp 		\
163			-l com.sun.star.loader.Java2			\
164			-env:UNO_JAVA_COMPPATH=$(MY_JAVA_COMPPATH)	\
165			$(foreach,i,$(REGISTERJARS) -c vnd.sun.star.expand:$(DOLLAR_SIGN)UNO_JAVA_COMPPATH/$(i))
166#			$(foreach,i,$(REGISTERJARS) -c vnd.sun.star.expand:$(DOLLAR_SIGN)UNO_JAVA_COMPPATH/$(i)) -c $(MY_JAVA_COMPPATH)$/xsec_jxsec.jar
167
168.ENDIF # "$(JAVANUMVER)" >= "000100040000"
169.ENDIF # "$(OS)" != "MACOSX"
170.ENDIF #  "$(SOLAR_JAVA)" != ""
171# to have a transaction, move it now to the final name
172	$(REGMERGE) $(BIN)$/boot_services.tmp / $(SOLARBINDIR)/types.rdb
173	mv $(BIN)$/boot_services.tmp $@
174
175