-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.uk
145 lines (133 loc) · 8.09 KB
/
Makefile.uk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# liblittlecms Makefile.uk
#
# Authors: Andrei Tatar <andrei@unikraft.io>
#
# Copyright (c) 2023, Unikraft GmbH and The Unikraft Authors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
################################################################################
# Library registration
################################################################################
$(eval $(call addlib_s,liblittlecms,$(CONFIG_LIBLITTLECMS)))
################################################################################
# Sources
################################################################################
LIBLITTLECMS_VERSION=2.15
LIBLITTLECMS_URL=https://github.com/mm2/Little-CMS/releases/download/lcms$(LIBLITTLECMS_VERSION)/lcms2-$(LIBLITTLECMS_VERSION).tar.gz
LIBLITTLECMS_DIRNAME=lcms2-$(LIBLITTLECMS_VERSION)
#LIBLITTLECMS_PATCHDIR=$(LIBLITTLECMS_BASE)/patches
$(eval $(call fetch,liblittlecms,$(LIBLITTLECMS_URL)))
#$(eval $(call patch,liblittlecms,$(LIBLITTLECMS_PATCHDIR),$(LIBLITTLECMS_DIRNAME)))
################################################################################
# Helpers
################################################################################
LIBLITTLECMS_SRC = $(LIBLITTLECMS_ORIGIN)/$(LIBLITTLECMS_DIRNAME)
################################################################################
# Library includes
################################################################################
# API
LIBLITTLECMS__API += -I$(LIBLITTLECMS_SRC)/include
CINCLUDES-$(CONFIG_LIBLITTLECMS) += $(LIBLITTLECMS__API)
CXXINCLUDES-$(CONFIG_LIBLITTLECMS) += $(LIBLITTLECMS__API)
# Internal
LIBLITTLECMS_CINCLUDES-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += -iquote$(LIBLITTLECMS_SRC)/plugins/fast_float/include
LIBLITTLECMS_CINCLUDES-$(CONFIG_LIBLITTLECMS_THREAD) += -iquote$(LIBLITTLECMS_SRC)/plugins/threaded/include
################################################################################
# Global flags
################################################################################
LIBLITTLECMS_CFLAGS += -fvisibility=hidden
LIBLITTLECMS_CFLAGS += -DSTDC_HEADERS=1
LIBLITTLECMS_CFLAGS += -DHAVE_FUNC_ATTRIBUTE_VISIBILITY=1
LIBLITTLECMS_CFLAGS += -DHAVE_STDINT_H=1
LIBLITTLECMS_CFLAGS += -DHAVE_UNISTD_H=1
LIBLITTLECMS_CFLAGS += -DHAVE_DLFCN_H=1
LIBLITTLECMS_CFLAGS += -DHAVE_MEMORY_H=1
LIBLITTLECMS_CFLAGS += -DHAVE_STDLIB_H=1
LIBLITTLECMS_CFLAGS += -DHAVE_SYS_STAT_H=1
LIBLITTLECMS_CFLAGS += -DHAVE_STRING_H=1
LIBLITTLECMS_CFLAGS += -DHAVE_STRINGS_H=1
LIBLITTLECMS_CFLAGS += -DHAVE_INTTYPES_H=1
LIBLITTLECMS_CFLAGS += -DHAVE_SYS_TYPES_H=1
LIBLITTLECMS_CFLAGS += -DHAVE_GMTIME_R=1
ifeq ($(CONFIG_LIBLITTLECMS_THREAD),y)
LIBLITTLECMS_CFLAGS-y += -DHasTHREADS=1
LIBLITTLECMS_CFLAGS-y += -DHAVE_PTHREAD=1
LIBLITTLECMS_CFLAGS-y += -DHAVE_PTHREAD_PRIO_INHERIT=1
else
LIBLITTLECMS_CFLAGS-y += -DHasTHREADS=0
endif
LIBLITTLECMS_CFLAGS-y += -Wno-type-limits
################################################################################
# Library sources
################################################################################
# These are taken from the upstream build in the order that make builds them.
# Please take care to maintain the order when updating.
################################################################################
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmscnvrt.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmserr.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmsgamma.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmsgmt.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmsintrp.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmsio0.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmsio1.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmslut.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmsplugin.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmssm.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmsmd5.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmsmtrx.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmspack.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmspcs.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmswtpnt.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmsxform.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmssamp.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmsnamed.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmscam02.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmsvirt.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmstypes.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmscgats.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmsps2.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmsopt.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmshalf.c
LIBLITTLECMS_SRCS-y += $(LIBLITTLECMS_SRC)/src/cmsalpha.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += $(LIBLITTLECMS_SRC)/plugins/fast_float/src/fast_8_curves.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += $(LIBLITTLECMS_SRC)/plugins/fast_float/src/fast_8_matsh_sse.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += $(LIBLITTLECMS_SRC)/plugins/fast_float/src/fast_8_matsh.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += $(LIBLITTLECMS_SRC)/plugins/fast_float/src/fast_8_tethra.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += $(LIBLITTLECMS_SRC)/plugins/fast_float/src/fast_16_tethra.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += $(LIBLITTLECMS_SRC)/plugins/fast_float/src/fast_float_15bits.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += $(LIBLITTLECMS_SRC)/plugins/fast_float/src/fast_float_15mats.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += $(LIBLITTLECMS_SRC)/plugins/fast_float/src/fast_float_cmyk.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += $(LIBLITTLECMS_SRC)/plugins/fast_float/src/fast_float_curves.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += $(LIBLITTLECMS_SRC)/plugins/fast_float/src/fast_float_matsh.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += $(LIBLITTLECMS_SRC)/plugins/fast_float/src/fast_float_separate.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += $(LIBLITTLECMS_SRC)/plugins/fast_float/src/fast_float_sup.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += $(LIBLITTLECMS_SRC)/plugins/fast_float/src/fast_float_tethra.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_FASTFLOAT) += $(LIBLITTLECMS_SRC)/plugins/fast_float/src/fast_float_lab.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_THREAD) += $(LIBLITTLECMS_SRC)/plugins/threaded/src/threaded_split.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_THREAD) += $(LIBLITTLECMS_SRC)/plugins/threaded/src/threaded_core.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_THREAD) += $(LIBLITTLECMS_SRC)/plugins/threaded/src/threaded_main.c
LIBLITTLECMS_SRCS-$(CONFIG_LIBLITTLECMS_THREAD) += $(LIBLITTLECMS_SRC)/plugins/threaded/src/threaded_scheduler.c