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 = ..$/..$/..
25PRJNAME = bridges
26TARGET = test_javauno_any
27
28PACKAGE = test$/java_uno$/anytest
29
30ENABLE_EXCEPTIONS = TRUE
31
32.INCLUDE: settings.mk
33
34.IF "$(GUI)" == "WNT"
35GIVE_EXEC_RIGHTS = @echo
36.ELSE
37GIVE_EXEC_RIGHTS = chmod +x
38.ENDIF
39
40JAVAFILES = \
41    $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES)))
42
43# Make sure TestBed.class is found under $(CLASSDIR)$/test:
44.IF "$(XCLASSPATH)" == ""
45XCLASSPATH := $(CLASSDIR)$/test
46.ELSE
47XCLASSPATH !:= $(XCLASSPATH)$(PATH_SEPERATOR)$(CLASSDIR)$/test
48.ENDIF
49
50EXEC_CLASSPATH_TMP = \
51    $(foreach,i,$(JARFILES) $(SOLARBINDIR)$/$i)$(PATH_SEPERATOR)$(XCLASSPATH)
52EXEC_CLASSPATH = \
53    $(strip $(subst,!,$(PATH_SEPERATOR) $(EXEC_CLASSPATH_TMP:s/ /!/)))
54
55JARFILES = juh.jar jurt.jar ridl.jar
56JAVACLASSFILES = \
57    $(CLASSDIR)$/$(PACKAGE)$/TestAny.class \
58    $(CLASSDIR)$/$(PACKAGE)$/TestRemote.class \
59    $(CLASSDIR)$/$(PACKAGE)$/TestJni.class
60
61#--------------------------------------------------
62
63USE_DEFFILE = TRUE
64ENABLE_EXCEPTIONS = TRUE
65INCPRE += $(OUT)$/inc$/test
66
67.IF "$(debug)" != ""
68.IF "$(COM)" == "MSC"
69CFLAGS += -Ob0
70.ENDIF
71.ENDIF
72
73SLOFILES= \
74	$(SLO)$/transport.obj
75
76SHL1TARGET=$(TARGET)
77
78SHL1STDLIBS= \
79	$(CPPUHELPERLIB)		\
80	$(SALHELPERLIB)			\
81	$(JVMACCESSLIB)			\
82	$(CPPULIB)			\
83	$(SALLIB)
84
85SHL1VERSIONMAP=$(TARGET).map
86SHL1IMPLIB=i$(TARGET)
87SHL1LIBS=$(SLB)$/$(TARGET).lib
88SHL1DEF=$(MISC)$/$(SHL1TARGET).def
89DEF1NAME=$(SHL1TARGET)
90
91.INCLUDE: target.mk
92
93#--------------------------------------------------
94
95$(SLOFILES) : $(MISC)$/gen_files.flag
96$(JAVACLASSFILES) : $(MISC)$/gen_files.flag
97
98ALLTAR : \
99    $(OUT)$/bin$/TestRemote \
100    $(OUT)$/bin$/TestJni
101
102$(OUT)$/bin$/TestRemote : $(JAVACLASSFILES)
103    -rm -f $@
104    echo java -classpath ..$/class$/test$(PATH_SEPERATOR)..$/class$(PATH_SEPERATOR)$(EXEC_CLASSPATH) \
105        test.java_uno.anytest.TestRemote > $@
106    $(GIVE_EXEC_RIGHTS) $@
107
108$(OUT)$/bin$/TestJni : $(JAVACLASSFILES)
109    -rm -f $@
110    echo '$(AUGMENT_LIBRARY_PATH)' java -classpath \
111        .$(PATH_SEPERATOR)..$/class$(PATH_SEPERATOR)$(EXEC_CLASSPATH) \
112        -Djava.library.path=..$/lib test.java_uno.anytest.TestJni >> $@
113    $(GIVE_EXEC_RIGHTS) $@
114
115$(BIN)$/test_java_uno_anytest.rdb : types.idl
116	$(IDLC) -I$(PRJ) -I$(SOLARIDLDIR) -O$(BIN) $?
117	$(REGMERGE) $@ /UCR $(BIN)$/{$(?:f:s/.idl/.urd/)}
118
119$(MISC)$/gen_files.flag : $(BIN)$/test_java_uno_anytest.rdb
120	$(CPPUMAKER) -C -BUCR -O $(OUT)$/inc$/test -X $(SOLARBINDIR)$/udkapi.rdb $?
121	$(CPPUMAKER) -C -BUCR -O $(OUT)$/inc$/test -T com.sun.star.uno.XInterface $(SOLARBINDIR)$/udkapi.rdb
122	$(JAVAMAKER) -nD -BUCR -O $(CLASSDIR) -X $(SOLARBINDIR)$/udkapi.rdb $?
123	$(TOUCH) $@
124