1*7871dc3eSAndrew Rist#**************************************************************
2*7871dc3eSAndrew Rist#
3*7871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*7871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*7871dc3eSAndrew Rist#  distributed with this work for additional information
6*7871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*7871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*7871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
9*7871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
10*7871dc3eSAndrew Rist#
11*7871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*7871dc3eSAndrew Rist#
13*7871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*7871dc3eSAndrew Rist#  software distributed under the License is distributed on an
15*7871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
17*7871dc3eSAndrew Rist#  specific language governing permissions and limitations
18*7871dc3eSAndrew Rist#  under the License.
19*7871dc3eSAndrew Rist#
20*7871dc3eSAndrew Rist#**************************************************************
21*7871dc3eSAndrew Rist
22*7871dc3eSAndrew Rist
23cdf0e10cSrcweirPRJ=..$/..$/..$/..
24cdf0e10cSrcweir
25cdf0e10cSrcweirPRJNAME=xmlsecurity
26cdf0e10cSrcweirTARGET=xmlsecurity-secfit-boot
27cdf0e10cSrcweirTARGETTYPE=GUI
28cdf0e10cSrcweir
29cdf0e10cSrcweirGEN_HID=TRUE
30cdf0e10cSrcweirAPP2NOSAL=TRUE
31cdf0e10cSrcweir
32cdf0e10cSrcweir# --- Settings -----------------------------------------------------------
33cdf0e10cSrcweirUSE_JAVAVER=TRUE
34cdf0e10cSrcweir
35cdf0e10cSrcweir.INCLUDE :  settings.mk
36cdf0e10cSrcweir
37cdf0e10cSrcweirVERINFONAME=verinfo
38cdf0e10cSrcweir
39cdf0e10cSrcweir.INCLUDE :  target.mk
40cdf0e10cSrcweir.INCLUDE :	$(PRJ)$/util$/target.pmk
41cdf0e10cSrcweir
42cdf0e10cSrcweir# -------------------------------------------------------------------------
43cdf0e10cSrcweir# --- Targets -------------------------------------------------------------
44cdf0e10cSrcweir
45cdf0e10cSrcweirALLTAR : $(BIN)$/boot_services.rdb
46cdf0e10cSrcweir
47cdf0e10cSrcweirREGISTERLIBS= \
48cdf0e10cSrcweir	i18npool.uno$(DLLPOST) \
49cdf0e10cSrcweir	$(DLLPRE)tk$(DLLPOSTFIX)$(DLLPOST) \
50cdf0e10cSrcweir	$(DLLPRE)mcnttype$(DLLPOST)
51cdf0e10cSrcweir
52cdf0e10cSrcweir#	$(DLLPRE)i18n$(DLLPOSTFIX)$(DLLPOST) \
53cdf0e10cSrcweir#	$(DLLPRE)i18npool$(DLLPOSTFIX)$(DLLPOST) \
54cdf0e10cSrcweir#	$(DLLPRE)tk$(DLLPOSTFIX)$(DLLPOST) \
55cdf0e10cSrcweir#	$(DLLPRE)mcnttype$(DLLPOST)
56cdf0e10cSrcweir
57cdf0e10cSrcweir# Additional libraries
58cdf0e10cSrcweirDLLPRE_NO=
59cdf0e10cSrcweirREGISTERLIBS+= \
60cdf0e10cSrcweir	$(DLLPRE_NO)dynamicloader.uno$(DLLPOST) \
61cdf0e10cSrcweir	$(DLLPRE_NO)namingservice.uno$(DLLPOST) \
62cdf0e10cSrcweir	$(DLLPRE_NO)bootstrap.uno$(DLLPOST) \
63cdf0e10cSrcweir	$(DLLPRE)xsec_fw$(DLLPOST) \
64cdf0e10cSrcweir	$(DLLPRE)xsec_xmlsec$(DLLPOST)
65cdf0e10cSrcweir
66cdf0e10cSrcweir.IF "$(GUI)" == "UNX"
67cdf0e10cSrcweirMY_DLLDIR=$(SOLARLIBDIR)
68cdf0e10cSrcweirREGISTERLIBS+= \
69cdf0e10cSrcweir	$(DLLPRE)dtransX11$(DLLPOSTFIX)$(DLLPOST)
70cdf0e10cSrcweir
71cdf0e10cSrcweir.ELSE			# "$(GUI)" == "UNX"
72cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
73cdf0e10cSrcweir
74cdf0e10cSrcweirMY_DLLDIR=$(SOLARBINDIR)
75cdf0e10cSrcweirREGISTERLIBS+= \
76cdf0e10cSrcweir	$(DLLPRE)sysdtrans$(DLLPOST) \
77cdf0e10cSrcweir	$(DLLPRE)ftransl$(DLLPOST) \
78cdf0e10cSrcweir	$(DLLPRE)dnd$(DLLPOST)
79cdf0e10cSrcweir
80cdf0e10cSrcweir.ELSE			# "$(GUI)"=="WNT"
81cdf0e10cSrcweir
82cdf0e10cSrcweir	@echo "**********************************************************"
83cdf0e10cSrcweir	@echo "*** unknown platform: don't know which librarys to use ***"
84cdf0e10cSrcweir	@echo "**********************************************************"
85cdf0e10cSrcweir	force_dmake_to_error
86cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
87cdf0e10cSrcweir.ENDIF			# "$(GUI)" == "UNX"
88cdf0e10cSrcweir
89cdf0e10cSrcweir.IF "$(SOLAR_JAVA)" != ""
90cdf0e10cSrcweir.IF "$(JAVANUMVER)" >= "000100040000"
91cdf0e10cSrcweir# native libraries, which are only necessary, when java shall run within setup
92cdf0e10cSrcweirREGISTERLIBS_JAVA= \
93cdf0e10cSrcweir	javavm.uno$(DLLPOST) \
94cdf0e10cSrcweir	javaloader.uno$(DLLPOST)
95cdf0e10cSrcweir
96cdf0e10cSrcweir# add here java components, which shall run with setup
97cdf0e10cSrcweirREGISTERJARS=\
98cdf0e10cSrcweir	java_uno_accessbridge.jar
99cdf0e10cSrcweir#	xsec_jxsec.jar
100cdf0e10cSrcweir
101cdf0e10cSrcweir# jar-files, which regcomp needs so that it can use java
102cdf0e10cSrcweirREGCOMP_JARS=unoil.jar java_uno.jar ridl.jar jurt.jar juh.jar
103cdf0e10cSrcweir
104cdf0e10cSrcweir# CLASSPATH, which regcomp needs to be run
105cdf0e10cSrcweir# $(SOLARLIBDIR) needs to be included in case Java components are registered,
106cdf0e10cSrcweir# because java_uno.jar needs to find the native java_uno shared library:
107cdf0e10cSrcweirMY_CLASSPATH_TMP=$(foreach,i,$(REGCOMP_JARS) $(SOLARBINDIR)$/$i)$(PATH_SEPERATOR)$(SOLARLIBDIR)$(PATH_SEPERATOR)$(XCLASSPATH)
108cdf0e10cSrcweirREGCOMP_CLASSPATH=$(strip $(subst,!,$(PATH_SEPERATOR) $(MY_CLASSPATH_TMP:s/ /!/)))
109cdf0e10cSrcweir
110cdf0e10cSrcweir.IF "$(GUI)"!="WNT"
111cdf0e10cSrcweirDOLLAR_SIGN=\$$
112cdf0e10cSrcweirMY_JAVA_COMPPATH=file://$(SOLARBINDIR)
113cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
114cdf0e10cSrcweirREGCOMP_ENV=\
115cdf0e10cSrcweir	setenv CLASSPATH $(REGCOMP_CLASSPATH) && \
116cdf0e10cSrcweir	setenv DYLD_LIBRARY_PATH $(DYLD_LIBRARY_PATH):$(JDKLIB)
117cdf0e10cSrcweir.ELSE
118cdf0e10cSrcweirREGCOMP_ENV=\
119cdf0e10cSrcweir	setenv CLASSPATH $(REGCOMP_CLASSPATH) && \
120cdf0e10cSrcweir	setenv LD_LIBRARY_PATH $(LD_LIBRARY_PATH):$(JDKLIB)
121cdf0e10cSrcweir.ENDIF
122cdf0e10cSrcweir.ELSE # "$(GUI)" != "WNT"
123cdf0e10cSrcweir.IF "$(USE_SHELL)" != "4nt"
124cdf0e10cSrcweirDOLLAR_SIGN=\$$
125cdf0e10cSrcweirREGCOMP_ENV=\
126cdf0e10cSrcweir	setenv CLASSPATH "$(strip $(subst,\,/ $(shell @guw.pl echo $(REGCOMP_CLASSPATH))))" && \
127cdf0e10cSrcweir	setenv PATH "$(PATH):$(JREPATH)"
128cdf0e10cSrcweirMY_JAVA_COMPPATH=$(strip $(subst,\,/ file:///$(shell @guw.pl echo $(SOLARBINDIR))))
129cdf0e10cSrcweir.ELSE # "$(USE_SHELL)" != "4nt"
130cdf0e10cSrcweirDOLLAR_SIGN=$$
131cdf0e10cSrcweirREGCOMP_ENV=\
132cdf0e10cSrcweir	set CLASSPATH=$(REGCOMP_CLASSPATH) && \
133cdf0e10cSrcweir	set PATH=$(PATH);$(JREPATH)
134cdf0e10cSrcweirMY_JAVA_COMPPATH=$(strip $(subst,\,/ file:///$(SOLARBINDIR)))
135cdf0e10cSrcweir.ENDIF  # "$(USE_SHELL)" != "4nt"
136cdf0e10cSrcweir.ENDIF  # "$(GUI)"!="WNT"
137cdf0e10cSrcweir.ENDIF  # "$(JAVANUMVER)" >= "000100040000"
138cdf0e10cSrcweir.ENDIF  # "$(SOLAR_JAVA)" != ""
139cdf0e10cSrcweir
140cdf0e10cSrcweir$(BIN)$/boot_services.rdb: \
141cdf0e10cSrcweir		makefile.mk \
142cdf0e10cSrcweir		$(foreach,i,$(REGISTERLIBS) $(MY_DLLDIR)$/$(i)) \
143cdf0e10cSrcweir		$(foreach,i,$(REGISTERLIBS_JAVA) $(MY_DLLDIR)$/$(i))
144cdf0e10cSrcweir	-rm -f $@ $(BIN)$/regcomp.rdb $(BIN)$/boot_services.tmp
145cdf0e10cSrcweir# register the native libraries
146cdf0e10cSrcweir	$(REGCOMP) -register -r $(BIN)$/boot_services.tmp -c "$(strip $(REGISTERLIBS))"
147cdf0e10cSrcweir.IF "$(SOLAR_JAVA)" != ""
148cdf0e10cSrcweir.IF "$(OS)"!="MACOSX"
149cdf0e10cSrcweir.IF "$(JAVANUMVER)" >= "000100040000"
150cdf0e10cSrcweir	$(REGCOMP) -register -r $(BIN)$/boot_services.tmp -c "$(strip $(REGISTERLIBS_JAVA))"
151cdf0e10cSrcweir# prepare a registry which regcomp can work on (types+java services)
152cdf0e10cSrcweir	$(REGCOMP) -register -r $(BIN)$/regcomp.rdb -c "$(strip $(REGISTERLIBS_JAVA))"
153cdf0e10cSrcweir	$(REGMERGE) $(BIN)$/regcomp.rdb / $(SOLARBINDIR)/udkapi.rdb
154cdf0e10cSrcweir# now do the registration
155cdf0e10cSrcweir	$(REGCOMP_ENV) && \
156cdf0e10cSrcweir		$(REGCOMP) -br $(BIN)$/regcomp.rdb 			\
157cdf0e10cSrcweir			-register					\
158cdf0e10cSrcweir			-r $(BIN)$/boot_services.tmp 		\
159cdf0e10cSrcweir			-l com.sun.star.loader.Java2			\
160cdf0e10cSrcweir			-env:UNO_JAVA_COMPPATH=$(MY_JAVA_COMPPATH)	\
161cdf0e10cSrcweir			$(foreach,i,$(REGISTERJARS) -c vnd.sun.star.expand:$(DOLLAR_SIGN)UNO_JAVA_COMPPATH/$(i))
162cdf0e10cSrcweir#			$(foreach,i,$(REGISTERJARS) -c vnd.sun.star.expand:$(DOLLAR_SIGN)UNO_JAVA_COMPPATH/$(i)) -c $(MY_JAVA_COMPPATH)$/xsec_jxsec.jar
163cdf0e10cSrcweir
164cdf0e10cSrcweir.ENDIF # "$(JAVANUMVER)" >= "000100040000"
165cdf0e10cSrcweir.ENDIF # "$(OS)" != "MACOSX"
166cdf0e10cSrcweir.ENDIF #  "$(SOLAR_JAVA)" != ""
167cdf0e10cSrcweir# to have a transaction, move it now to the final name
168cdf0e10cSrcweir	$(REGMERGE) $(BIN)$/boot_services.tmp / $(SOLARBINDIR)/types.rdb
169cdf0e10cSrcweir	mv $(BIN)$/boot_services.tmp $@
170cdf0e10cSrcweir
171