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