summaryrefslogtreecommitdiffstats
path: root/external/libjpeg-turbo/StaticLibrary_libjpeg-turbo.mk
blob: 0b6b3044d1b278fe0922eef59f36e47dc4895693 (plain)
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozillarg/MPL/2.0/.
#

$(eval $(call gb_StaticLibrary_StaticLibrary,libjpeg-turbo))

$(eval $(call gb_StaticLibrary_use_unpacked,libjpeg-turbo,libjpeg-turbo))

$(eval $(call gb_StaticLibrary_set_warnings_disabled,libjpeg-turbo))

$(eval $(call gb_StaticLibrary_set_include,libjpeg-turbo,\
    -I$(call gb_UnpackedTarball_get_dir,libjpeg-turbo) \
    $$(INCLUDE) \
))

ifeq ($(OS),WNT)
$(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\
    -DHAVE_INTRIN_H=1 \
))
endif

$(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\
    -DSIZEOF_SIZE_T=$(SIZEOF_SIZE_T) \
))

ifeq ($(COM),GCC)
ifneq ($(ENABLE_OPTIMIZED),)
$(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\
    -O3 \
))
endif
endif

$(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\
    UnpackedTarball/libjpeg-turbo/jcapimin \
    UnpackedTarball/libjpeg-turbo/jcapistd \
    UnpackedTarball/libjpeg-turbo/jccoefct \
    UnpackedTarball/libjpeg-turbo/jccolor \
    UnpackedTarball/libjpeg-turbo/jcdctmgr \
    UnpackedTarball/libjpeg-turbo/jchuff \
    UnpackedTarball/libjpeg-turbo/jcicc \
    UnpackedTarball/libjpeg-turbo/jcinit \
    UnpackedTarball/libjpeg-turbo/jcmainct \
    UnpackedTarball/libjpeg-turbo/jcmarker \
    UnpackedTarball/libjpeg-turbo/jcmaster \
    UnpackedTarball/libjpeg-turbo/jcomapi \
    UnpackedTarball/libjpeg-turbo/jcparam \
    UnpackedTarball/libjpeg-turbo/jcphuff \
    UnpackedTarball/libjpeg-turbo/jcprepct \
    UnpackedTarball/libjpeg-turbo/jcsample \
    UnpackedTarball/libjpeg-turbo/jctrans \
    UnpackedTarball/libjpeg-turbo/jdapimin \
    UnpackedTarball/libjpeg-turbo/jdapistd \
    UnpackedTarball/libjpeg-turbo/jdatadst \
    UnpackedTarball/libjpeg-turbo/jdatasrc \
    UnpackedTarball/libjpeg-turbo/jdcoefct \
    UnpackedTarball/libjpeg-turbo/jdcolor \
    UnpackedTarball/libjpeg-turbo/jddctmgr \
    UnpackedTarball/libjpeg-turbo/jdhuff \
    UnpackedTarball/libjpeg-turbo/jdicc \
    UnpackedTarball/libjpeg-turbo/jdinput \
    UnpackedTarball/libjpeg-turbo/jdmainct \
    UnpackedTarball/libjpeg-turbo/jdmarker \
    UnpackedTarball/libjpeg-turbo/jdmaster \
    UnpackedTarball/libjpeg-turbo/jdmerge \
    UnpackedTarball/libjpeg-turbo/jdphuff \
    UnpackedTarball/libjpeg-turbo/jdpostct \
    UnpackedTarball/libjpeg-turbo/jdsample \
    UnpackedTarball/libjpeg-turbo/jdtrans \
    UnpackedTarball/libjpeg-turbo/jerror \
    UnpackedTarball/libjpeg-turbo/jfdctflt \
    UnpackedTarball/libjpeg-turbo/jfdctfst \
    UnpackedTarball/libjpeg-turbo/jfdctint \
    UnpackedTarball/libjpeg-turbo/jidctflt \
    UnpackedTarball/libjpeg-turbo/jidctfst \
    UnpackedTarball/libjpeg-turbo/jidctint \
    UnpackedTarball/libjpeg-turbo/jidctred \
    UnpackedTarball/libjpeg-turbo/jquant1 \
    UnpackedTarball/libjpeg-turbo/jquant2 \
    UnpackedTarball/libjpeg-turbo/jutils \
    UnpackedTarball/libjpeg-turbo/jmemmgr \
    UnpackedTarball/libjpeg-turbo/jmemnobs \
    UnpackedTarball/libjpeg-turbo/jaricom \
    UnpackedTarball/libjpeg-turbo/jcarith \
    UnpackedTarball/libjpeg-turbo/jdarith \
))

ifneq ($(NASM),)

$(eval $(call gb_StaticLibrary_add_nasmflags,libjpeg-turbo,\
	-I$(call gb_UnpackedTarball_get_dir,libjpeg-turbo)/simd/nasm/ \
	-I$(dir $(call gb_UnpackedTarball_get_dir,libjpeg-turbo)/$(1)) \
))

ifeq ($(CPUNAME),X86_64)

$(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\
    -DWITH_SIMD \
))

$(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jsimd \
))

$(eval $(call gb_StaticLibrary_add_generated_nasmobjects,libjpeg-turbo,\
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jsimdcpu.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jfdctflt-sse.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jccolor-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jcgray-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jchuff-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jcphuff-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jcsample-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jdcolor-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jdmerge-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jdsample-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jfdctfst-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jfdctint-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctflt-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctfst-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctint-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctred-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jquantf-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jquanti-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jccolor-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jcgray-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jcsample-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jdcolor-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jdmerge-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jdsample-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jfdctint-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctint-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/x86_64/jquanti-avx2.asm \
))

else ifeq ($(CPUNAME),INTEL)

$(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\
    -DWITH_SIMD \
))

$(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\
    UnpackedTarball/libjpeg-turbo/simd/i386/jsimd \
))

$(eval $(call gb_StaticLibrary_add_generated_nasmobjects,libjpeg-turbo,\
    UnpackedTarball/libjpeg-turbo/simd/i386/jsimdcpu.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jfdctflt-3dn.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jidctflt-3dn.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jquant-3dn.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jccolor-mmx.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jcgray-mmx.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jcsample-mmx.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jdcolor-mmx.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jdmerge-mmx.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jdsample-mmx.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jfdctfst-mmx.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jfdctint-mmx.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jidctfst-mmx.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jidctint-mmx.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jidctred-mmx.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jquant-mmx.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jfdctflt-sse.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jidctflt-sse.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jquant-sse.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jccolor-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jcgray-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jchuff-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jcphuff-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jcsample-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jdcolor-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jdmerge-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jdsample-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jfdctfst-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jfdctint-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jidctflt-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jidctfst-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jidctint-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jidctred-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jquantf-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jquanti-sse2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jccolor-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jcgray-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jcsample-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jdcolor-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jdmerge-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jdsample-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jfdctint-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jidctint-avx2.asm \
    UnpackedTarball/libjpeg-turbo/simd/i386/jquanti-avx2.asm \
))

else

$(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\
    UnpackedTarball/libjpeg-turbo/jsimd_none \
))

endif

else

$(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\
    UnpackedTarball/libjpeg-turbo/jsimd_none \
))

endif


# vim: set noet sw=4 ts=4: