1 | # $Id: Makefile.kmk 96464 2022-08-24 22:34:31Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the libxml2 library.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2007-2022 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | #
|
---|
27 |
|
---|
28 | SUB_DEPTH = ../../..
|
---|
29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
30 |
|
---|
31 | if !defined(VBOX_ONLY_VALIDATIONKIT) || defined(VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING) # Needed for VBoxRT for Validation Kit unit tests.
|
---|
32 | LIBRARIES += VBox-libxml2
|
---|
33 | endif
|
---|
34 | VBox-libxml2_TEMPLATE = VBoxR3RuntimeDllNonPedantic
|
---|
35 | VBox-libxml2_SDKS = VBOX_ZLIB
|
---|
36 | VBox-libxml2_DEFS = _REENTRANT # the latter triggers thread support, see xmlversion-default.h and win32xmlversion.h.
|
---|
37 | VBox-libxml2_DEFS.win = WIN32 _WINDOWS _MBCS _CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_DEPRECATE \
|
---|
38 | LIBXML_STATIC LIBXML_STATIC_FOR_DLL HAVE_WIN32_THREADS HAVE_COMPILER_TLS HAVE_ZLIB_H
|
---|
39 | VBox-libxml2_CFLAGS.win.amd64 = -wd4267
|
---|
40 | VBox-libxml2_CFLAGS.win += -wd4701 # potentially uninitialized local variable 'l' used
|
---|
41 | VBox-libxml2_CFLAGS.win += -wd4232 # nonstandard extension used : 'xmlFree' : address of dllimport 'free' is not static, identity not guaranteed
|
---|
42 | VBox-libxml2_CFLAGS.win += -wd4305 # 'type cast' : truncation from 'xmlChar *' to 'long'
|
---|
43 | VBox-libxml2_CFLAGS.win += -wd4306 # 'type cast' : conversion from 'long' to 'void *' of greater size [TODO: check these out?]
|
---|
44 | if "$(VBOX_VCC_TOOL_STEM)" >= "VCC120"
|
---|
45 | VBox-libxml2_CFLAGS.win += -wd4311 # parser.c(1346) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'long'
|
---|
46 | VBox-libxml2_CFLAGS.win += -wd4312 # parser.c(1327) : warning C4312: 'type cast' : conversion from 'long' to 'void *' of greater size
|
---|
47 | VBox-libxml2_CFLAGS.win += -wd4005 # sdk\v7.1\include\sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition
|
---|
48 | endif
|
---|
49 | if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140"
|
---|
50 | VBox-libxml2_CFLAGS.win += -wd4777 # timsort.h(326): warning C4777: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'unsigned int'
|
---|
51 | VBox-libxml2_CFLAGS.win += -wd4477 # timsort.h(326): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t'
|
---|
52 | VBox-libxml2_CFLAGS.win += -wd4723 # xpath.c(505) : warning C4723: potential divide by 0
|
---|
53 | endif
|
---|
54 | ifn1of ($(KBUILD_TARGET), win)
|
---|
55 | VBox-libxml2_CFLAGS = -Wno-format-security -Wno-strict-prototypes -Wno-format-extra-args $(VBOX_GCC_Wno-tautological-pointer-compare)
|
---|
56 | endif
|
---|
57 | VBox-libxml2_INCS = include
|
---|
58 | VBox-libxml2_SOURCES = \
|
---|
59 | buf.c \
|
---|
60 | c14n.c \
|
---|
61 | catalog.c \
|
---|
62 | chvalid.c \
|
---|
63 | debugXML.c \
|
---|
64 | dict.c \
|
---|
65 | DOCBparser.c \
|
---|
66 | encoding.c \
|
---|
67 | entities.c \
|
---|
68 | error.c \
|
---|
69 | globals.c \
|
---|
70 | hash.c \
|
---|
71 | HTMLparser.c \
|
---|
72 | HTMLtree.c \
|
---|
73 | legacy.c \
|
---|
74 | list.c \
|
---|
75 | parser.c \
|
---|
76 | parserInternals.c \
|
---|
77 | pattern.c \
|
---|
78 | relaxng.c \
|
---|
79 | SAX2.c \
|
---|
80 | SAX.c \
|
---|
81 | schematron.c \
|
---|
82 | threads.c \
|
---|
83 | tree.c \
|
---|
84 | uri.c \
|
---|
85 | valid.c \
|
---|
86 | xinclude.c \
|
---|
87 | xlink.c \
|
---|
88 | xmlIO.c \
|
---|
89 | xmlmemory.c \
|
---|
90 | xmlreader.c \
|
---|
91 | xmlregexp.c \
|
---|
92 | xmlsave.c \
|
---|
93 | xmlschemas.c \
|
---|
94 | xmlschemastypes.c \
|
---|
95 | xmlunicode.c \
|
---|
96 | xmlwriter.c \
|
---|
97 | xpath.c \
|
---|
98 | xpointer.c \
|
---|
99 | xmlstring.c
|
---|
100 |
|
---|
101 | # For linking:
|
---|
102 | # VBox-libxml2_LDFLAGS.win = /VERSION:$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION)
|
---|
103 | # VBox-libxml2_SDKS.win += WINPSDK
|
---|
104 |
|
---|
105 | ifdef VBOX_WITH_32_ON_64_MAIN_API # 32-bit edition.
|
---|
106 | LIBRARIES += VBox-libxml2-x86
|
---|
107 | VBox-libxml2-x86_TEMPLATE = VBoxR3DllNonPedantic-x86
|
---|
108 | VBox-libxml2-x86_EXTENDS = VBox-libxml2
|
---|
109 | endif
|
---|
110 |
|
---|
111 | LIBRARIES += VBox-libxml2-static
|
---|
112 | VBox-libxml2-static_TEMPLATE = VBoxR3StaticNonPedantic
|
---|
113 | VBox-libxml2-static_EXTENDS = VBox-libxml2
|
---|
114 | ifdef VBOX_WITH_NOCRT_STATIC
|
---|
115 | VBox-libxml2-static_DEFS = $(VBox-libxml2_DEFS) IPRT_NO_CRT_FOR_3RD_PARTY
|
---|
116 | endif
|
---|
117 |
|
---|
118 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|