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=..$/..$/..
25
26PRJNAME=testtools
27TARGET=cli_cpp_bridgetest.uno
28USE_DEFFILE=TRUE
29NO_BSYMBOLIC=TRUE
30ENABLE_EXCEPTIONS=TRUE
31LIBTARGET=NO
32
33# disable caching to avoid stale objects
34# on version changes
35CCACHE_DISABLE=TRUE
36.EXPORT : CCACHE_DISABLE
37
38# --- Settings -----------------------------------------------------
39
40.INCLUDE :  settings.mk
41DLLPRE =
42CFLAGSENABLESYMBOLS:=-Z7
43# ------------------------------------------------------------------
44
45#These tests are for Windows only
46.IF "$(COM)" == "MSC" && "$(GUI)" == "WNT"
47
48.IF "$(CCNUMVER)" >= "001399999999"
49CFLAGSCXX += -clr:oldSyntax -AI $(OUT)$/bin -AI $(SOLARBINDIR)
50SHL1STDLIBS = \
51	mscoree.lib \
52	msvcmrt.lib
53.ELSE
54CFLAGSCXX += -clr -AI $(OUT)$/bin -AI $(SOLARBINDIR)
55SHL1STDLIBS = \
56	mscoree.lib
57.ENDIF
58SLOFILES= \
59	$(SLO)$/cli_cpp_bridgetest.obj
60
61SHL1OBJS = $(SLOFILES)
62
63SHL1TARGET = $(TARGET)
64
65SHL1DEF = $(MISC)$/$(SHL1TARGET).def
66DEF1NAME = $(SHL1TARGET)
67
68.ENDIF
69
70# --- Targets ------------------------------------------------------
71
72.INCLUDE :	target.mk
73
74.IF "$(COM)" == "MSC" && "$(GUI)" == "WNT"
75
76ALLTAR : $(BIN)$/cli_bridgetest_inprocess.exe
77
78#################################################################
79
80CLI_URE = $(SOLARBINDIR)$/cli_ure.dll
81CLI_URETYPES = $(SOLARBINDIR)$/cli_uretypes.dll
82CLI_BASETYPES = $(SOLARBINDIR)$/cli_basetypes.dll
83CLI_CPPUHELPER = $(SOLARBINDIR)$/cli_cppuhelper.dll
84CLI_OOOTYPES = $(SOLARBINDIR)$/cli_oootypes.dll
85CLI_TYPES_BRIDGETEST = $(BIN)$/cli_types_bridgetest.dll
86
87CSCFLAGS = -warnaserror+
88.IF "$(CCNUMVER)" <= "001399999999"
89VBC_FLAGS = -warnaserror+
90.ELSE
91VBC_FLAGS = -nowarn:42030 -warnaserror+
92.ENDIF
93.IF "$(debug)" != ""
94CSCFLAGS += -debug+ -checked+ -define:DEBUG -define:TRACE
95VBC_FLAGS += -debug+ -define:DEBUG=TRUE -define:TRACE=TRUE
96.ELSE
97CSCFLAGS += -optimize
98VBC_FLAGS += -optimize
99.ENDIF
100
101
102# C# ----------------------------------------------
103$(BIN)$/cli_cs_testobj.uno.dll : \
104		cli_cs_testobj.cs \
105		cli_cs_multi.cs \
106		$(CLI_BASETYPES) \
107		$(CLI_URETYPES) \
108		$(CLI_URE)
109	$(CSC) $(CSCFLAGS) -target:library -out:$@ \
110		-reference:$(CLI_TYPES_BRIDGETEST) \
111		-reference:$(CLI_URE) \
112		-reference:$(CLI_BASETYPES) \
113 		-reference:$(CLI_URETYPES) \
114		cli_cs_testobj.cs cli_cs_multi.cs
115
116$(BIN)$/cli_cs_bridgetest.uno.dll : \
117		cli_cs_bridgetest.cs \
118		$(CLI_BASETYPES) \
119		$(CLI_URETYPES) \
120		$(CLI_URE)
121	$(CSC) $(CSCFLAGS) -target:library -out:$@ \
122		-reference:$(CLI_TYPES_BRIDGETEST) \
123		-reference:$(CLI_URETYPES) \
124		-reference:$(CLI_BASETYPES) \
125		-reference:$(CLI_URE) \
126		-reference:System.dll \
127		cli_cs_bridgetest.cs
128
129# Visual Basic ------------------------------------------
130$(BIN)$/cli_vb_bridgetest.uno.dll : \
131		cli_vb_bridgetest.vb \
132		$(CLI_BASETYPES) \
133		$(CLI_URETYPES) \
134		$(CLI_URE)
135	$(VBC) $(VBC_FLAGS) \
136		-target:library \
137		-out:$@ \
138		-reference:$(CLI_URETYPES) \
139		-reference:$(CLI_BASETYPES) \
140		-reference:$(CLI_URE) \
141		-reference:$(CLI_TYPES_BRIDGETEST) \
142		-reference:System.dll \
143		-reference:System.Drawing.dll \
144		-reference:System.Windows.Forms.dll \
145		cli_vb_bridgetest.vb
146
147$(BIN)$/cli_vb_testobj.uno.dll : \
148		cli_vb_testobj.vb \
149		$(CLI_BASETYPES) \
150		$(CLI_URETYPES) \
151		$(CLI_URE)
152	$(VBC) $(VBC_FLAGS) \
153		-target:library \
154		-out:$@ \
155		-reference:$(CLI_BASETYPES) \
156		-reference:$(CLI_URETYPES) \
157		-reference:$(CLI_URE) \
158		-reference:$(CLI_TYPES_BRIDGETEST) \
159		-reference:System.dll \
160		-reference:System.Drawing.dll \
161		-reference:System.Windows.Forms.dll \
162		cli_vb_testobj.vb
163
164$(MISC)$/copyassemblies.done .ERRREMOVE:
165    $(GNUCOPY) $(CLI_CPPUHELPER) $(BIN)$/$(CLI_CPPUHELPER:f)
166    $(GNUCOPY) $(CLI_BASETYPES) $(BIN)$/$(CLI_BASETYPES:f)
167    $(GNUCOPY) $(CLI_URETYPES) $(BIN)$/$(CLI_URETYPES:f)
168    $(GNUCOPY) $(CLI_URE) $(BIN)$/$(CLI_URE:f)
169    $(GNUCOPY) $(CLI_OOOTYPES) $(BIN)$/$(CLI_OOOTYPES:f)
170    $(TOUCH) $@
171
172$(BIN)$/cli_bridgetest_inprocess.exe : \
173		cli_bridgetest_inprocess.cs \
174		$(BIN)$/cli_cs_bridgetest.uno.dll \
175		$(BIN)$/cli_cs_testobj.uno.dll \
176		$(BIN)$/cli_vb_bridgetest.uno.dll \
177		$(BIN)$/cli_vb_testobj.uno.dll \
178		$(BIN)$/cli_cpp_bridgetest.uno.dll \
179		$(MISC)$/copyassemblies.done \
180		$(CLI_BASETYPES) \
181		$(CLI_URETYPES) \
182		$(CLI_URE) \
183		$(CLI_CPPUHELPER)
184	$(CSC) $(CSCFLAGS) -target:exe -out:$@ \
185		-reference:$(CLI_TYPES_BRIDGETEST) \
186		-reference:$(CLI_BASETYPES) \
187		-reference:$(CLI_URETYPES) \
188		-reference:$(CLI_URE) \
189		-reference:$(CLI_CPPUHELPER) \
190		-reference:$(BIN)$/cli_cs_bridgetest.uno.dll \
191		-reference:$(BIN)$/cli_cs_testobj.uno.dll \
192		-reference:$(BIN)$/cli_vb_bridgetest.uno.dll \
193		-reference:$(BIN)$/cli_vb_testobj.uno.dll \
194		-reference:$(BIN)$/cli_cpp_bridgetest.uno.dll \
195		cli_bridgetest_inprocess.cs
196	$(GNUCOPY) cli_bridgetest_inprocess.ini $(BIN)
197
198.ENDIF
199
200