xref: /trunk/main/cli_ure/source/uno_bridge/makefile.mk (revision 91144cd0085a7583d2099b982122deb2184ab956)
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 = cli_ure
26
27TARGET = cli_uno
28NO_BSYMBOLIC = TRUE
29ENABLE_EXCEPTIONS = TRUE
30USE_DEFFILE = TRUE
31
32# --- Settings -----------------------------------------------------
33
34.INCLUDE :  settings.mk
35.INCLUDE : $(PRJ)$/util$/makefile.pmk
36
37
38# BUILD_FOR_CLI rather than COM == MSC, which is what every other makefile in
39# this module already tests.  makefile.pmk sets it only when COM is MSC, so on
40# VC9 the two conditions select the same thing -- but this one also follows the
41# module being switched off, which COM == MSC cannot.
42.IF "$(BUILD_FOR_CLI)" != ""
43# When compiling for CLR, disable "warning C4339: use of undefined type detected
44# in CLR meta-data - use of this type may lead to a runtime exception":
45.IF "$(CCNUMVER)" <= "001399999999"
46CFLAGSCXX += -clr -AI $(DLLDEST) -AI $(SOLARBINDIR) -wd4339
47.ELIF "$(COMEX)"=="14"
48# /clr:oldSyntax went away after VS2015; these sources are C++/CLI now.
49CFLAGSCXX += -clr -AI $(DLLDEST) -AI $(SOLARBINDIR) -wd4339
50.ELSE
51CFLAGSCXX += -clr:oldSyntax -AI $(DLLDEST) -AI $(SOLARBINDIR) -wd4339
52.ENDIF
53
54.IF "$(debug)" != ""
55CFLAGS += -Ob0
56.ENDIF
57
58
59
60.IF "$(CCNUMVER)" <= "001399999999"
61#see  Microsoft Knowledge Base Article - 814472
62LINKFLAGS += -NOENTRY -NODEFAULTLIB:nochkclr.obj -INCLUDE:__DllMainCRTStartup@12
63.ENDIF
64# --- Files --------------------------------------------------------
65
66SLOFILES = \
67    $(SLO)$/cli_environment.obj \
68    $(SLO)$/cli_bridge.obj      \
69    $(SLO)$/cli_data.obj        \
70    $(SLO)$/cli_proxy.obj       \
71    $(SLO)$/cli_uno.obj
72
73SHL1OBJS = $(SLOFILES)
74
75SHL1TARGET = $(TARGET)
76
77SHL1STDLIBS = \
78    $(CPPULIB)          \
79    $(SALLIB)           \
80    mscoree.lib
81
82.IF "$(CCNUMVER)" >= "001399999999"
83SHL1STDLIBS += \
84    msvcmrt.lib
85.ENDIF
86
87SHL1VERSIONMAP = bridge_exports.map
88
89SHL1IMPLIB = i$(TARGET)
90SHL1LIBS = $(SLB)$/$(TARGET).lib
91SHL1DEF = $(MISC)$/$(SHL1TARGET).def
92DEF1NAME = $(SHL1TARGET)
93
94.ENDIF
95
96# --- Targets ------------------------------------------------------
97
98.INCLUDE :  target.mk
99