Fix build
[LibreOffice.git] / external / libjpeg-turbo / StaticLibrary_libjpeg-turbo.mk
blob9acf49095d71f35efc4f67eca3ca13897533e4c3
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozillarg/MPL/2.0/.
10 $(eval $(call gb_StaticLibrary_StaticLibrary,libjpeg-turbo))
12 $(eval $(call gb_StaticLibrary_use_unpacked,libjpeg-turbo,libjpeg-turbo))
14 $(eval $(call gb_StaticLibrary_set_warnings_disabled,libjpeg-turbo))
16 $(eval $(call gb_StaticLibrary_set_include,libjpeg-turbo,\
17 -I$(gb_UnpackedTarball_workdir)/libjpeg-turbo \
18 $$(INCLUDE) \
21 ifeq ($(OS),WNT)
22 $(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\
23 -DHAVE_INTRIN_H=1 \
25 endif
27 $(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\
28 -DSIZEOF_SIZE_T=$(SIZEOF_SIZE_T) \
31 ifeq ($(COM),GCC)
32 ifneq ($(ENABLE_OPTIMIZED),)
33 $(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\
34 -O3 \
36 endif
37 endif
39 $(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\
40 UnpackedTarball/libjpeg-turbo/jaricom \
41 UnpackedTarball/libjpeg-turbo/jcapimin \
42 UnpackedTarball/libjpeg-turbo/jcapistd \
43 UnpackedTarball/libjpeg-turbo/jcarith \
44 UnpackedTarball/libjpeg-turbo/jccoefct \
45 UnpackedTarball/libjpeg-turbo/jccolor \
46 UnpackedTarball/libjpeg-turbo/jcdctmgr \
47 UnpackedTarball/libjpeg-turbo/jchuff \
48 UnpackedTarball/libjpeg-turbo/jcicc \
49 UnpackedTarball/libjpeg-turbo/jcinit \
50 UnpackedTarball/libjpeg-turbo/jcmainct \
51 UnpackedTarball/libjpeg-turbo/jcmarker \
52 UnpackedTarball/libjpeg-turbo/jcmaster \
53 UnpackedTarball/libjpeg-turbo/jcomapi \
54 UnpackedTarball/libjpeg-turbo/jcparam \
55 UnpackedTarball/libjpeg-turbo/jcphuff \
56 UnpackedTarball/libjpeg-turbo/jcprepct \
57 UnpackedTarball/libjpeg-turbo/jcsample \
58 UnpackedTarball/libjpeg-turbo/jctrans \
59 UnpackedTarball/libjpeg-turbo/jdapimin \
60 UnpackedTarball/libjpeg-turbo/jdapistd \
61 UnpackedTarball/libjpeg-turbo/jdarith \
62 UnpackedTarball/libjpeg-turbo/jdatadst \
63 UnpackedTarball/libjpeg-turbo/jdatasrc \
64 UnpackedTarball/libjpeg-turbo/jdcoefct \
65 UnpackedTarball/libjpeg-turbo/jdcolor \
66 UnpackedTarball/libjpeg-turbo/jddctmgr \
67 UnpackedTarball/libjpeg-turbo/jdhuff \
68 UnpackedTarball/libjpeg-turbo/jdicc \
69 UnpackedTarball/libjpeg-turbo/jdinput \
70 UnpackedTarball/libjpeg-turbo/jdmainct \
71 UnpackedTarball/libjpeg-turbo/jdmarker \
72 UnpackedTarball/libjpeg-turbo/jdmaster \
73 UnpackedTarball/libjpeg-turbo/jdmerge \
74 UnpackedTarball/libjpeg-turbo/jdphuff \
75 UnpackedTarball/libjpeg-turbo/jdpostct \
76 UnpackedTarball/libjpeg-turbo/jdsample \
77 UnpackedTarball/libjpeg-turbo/jdtrans \
78 UnpackedTarball/libjpeg-turbo/jerror \
79 UnpackedTarball/libjpeg-turbo/jfdctflt \
80 UnpackedTarball/libjpeg-turbo/jfdctfst \
81 UnpackedTarball/libjpeg-turbo/jfdctint \
82 UnpackedTarball/libjpeg-turbo/jidctflt \
83 UnpackedTarball/libjpeg-turbo/jidctfst \
84 UnpackedTarball/libjpeg-turbo/jidctint \
85 UnpackedTarball/libjpeg-turbo/jidctred \
86 UnpackedTarball/libjpeg-turbo/jmemmgr \
87 UnpackedTarball/libjpeg-turbo/jmemnobs \
88 UnpackedTarball/libjpeg-turbo/jquant1 \
89 UnpackedTarball/libjpeg-turbo/jquant2 \
90 UnpackedTarball/libjpeg-turbo/jutils \
93 ifneq ($(NASM),)
95 $(eval $(call gb_StaticLibrary_add_nasmflags,libjpeg-turbo,\
96 -I$(gb_UnpackedTarball_workdir)/libjpeg-turbo/simd/nasm/ \
97 -I$(dir $(gb_UnpackedTarball_workdir)/libjpeg-turbo/$(1)) \
100 ifeq ($(CPUNAME),X86_64)
102 $(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\
103 -DWITH_SIMD \
106 $(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\
107 UnpackedTarball/libjpeg-turbo/simd/x86_64/jsimd \
110 $(eval $(call gb_StaticLibrary_add_generated_nasmobjects,libjpeg-turbo,\
111 UnpackedTarball/libjpeg-turbo/simd/x86_64/jsimdcpu.asm \
112 UnpackedTarball/libjpeg-turbo/simd/x86_64/jfdctflt-sse.asm \
113 UnpackedTarball/libjpeg-turbo/simd/x86_64/jccolor-sse2.asm \
114 UnpackedTarball/libjpeg-turbo/simd/x86_64/jcgray-sse2.asm \
115 UnpackedTarball/libjpeg-turbo/simd/x86_64/jchuff-sse2.asm \
116 UnpackedTarball/libjpeg-turbo/simd/x86_64/jcphuff-sse2.asm \
117 UnpackedTarball/libjpeg-turbo/simd/x86_64/jcsample-sse2.asm \
118 UnpackedTarball/libjpeg-turbo/simd/x86_64/jdcolor-sse2.asm \
119 UnpackedTarball/libjpeg-turbo/simd/x86_64/jdmerge-sse2.asm \
120 UnpackedTarball/libjpeg-turbo/simd/x86_64/jdsample-sse2.asm \
121 UnpackedTarball/libjpeg-turbo/simd/x86_64/jfdctfst-sse2.asm \
122 UnpackedTarball/libjpeg-turbo/simd/x86_64/jfdctint-sse2.asm \
123 UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctflt-sse2.asm \
124 UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctfst-sse2.asm \
125 UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctint-sse2.asm \
126 UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctred-sse2.asm \
127 UnpackedTarball/libjpeg-turbo/simd/x86_64/jquantf-sse2.asm \
128 UnpackedTarball/libjpeg-turbo/simd/x86_64/jquanti-sse2.asm \
129 UnpackedTarball/libjpeg-turbo/simd/x86_64/jccolor-avx2.asm \
130 UnpackedTarball/libjpeg-turbo/simd/x86_64/jcgray-avx2.asm \
131 UnpackedTarball/libjpeg-turbo/simd/x86_64/jcsample-avx2.asm \
132 UnpackedTarball/libjpeg-turbo/simd/x86_64/jdcolor-avx2.asm \
133 UnpackedTarball/libjpeg-turbo/simd/x86_64/jdmerge-avx2.asm \
134 UnpackedTarball/libjpeg-turbo/simd/x86_64/jdsample-avx2.asm \
135 UnpackedTarball/libjpeg-turbo/simd/x86_64/jfdctint-avx2.asm \
136 UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctint-avx2.asm \
137 UnpackedTarball/libjpeg-turbo/simd/x86_64/jquanti-avx2.asm \
140 else ifeq ($(CPUNAME),INTEL)
142 $(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\
143 -DWITH_SIMD \
146 $(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\
147 UnpackedTarball/libjpeg-turbo/simd/i386/jsimd \
150 $(eval $(call gb_StaticLibrary_add_generated_nasmobjects,libjpeg-turbo,\
151 UnpackedTarball/libjpeg-turbo/simd/i386/jsimdcpu.asm \
152 UnpackedTarball/libjpeg-turbo/simd/i386/jfdctflt-3dn.asm \
153 UnpackedTarball/libjpeg-turbo/simd/i386/jidctflt-3dn.asm \
154 UnpackedTarball/libjpeg-turbo/simd/i386/jquant-3dn.asm \
155 UnpackedTarball/libjpeg-turbo/simd/i386/jccolor-mmx.asm \
156 UnpackedTarball/libjpeg-turbo/simd/i386/jcgray-mmx.asm \
157 UnpackedTarball/libjpeg-turbo/simd/i386/jcsample-mmx.asm \
158 UnpackedTarball/libjpeg-turbo/simd/i386/jdcolor-mmx.asm \
159 UnpackedTarball/libjpeg-turbo/simd/i386/jdmerge-mmx.asm \
160 UnpackedTarball/libjpeg-turbo/simd/i386/jdsample-mmx.asm \
161 UnpackedTarball/libjpeg-turbo/simd/i386/jfdctfst-mmx.asm \
162 UnpackedTarball/libjpeg-turbo/simd/i386/jfdctint-mmx.asm \
163 UnpackedTarball/libjpeg-turbo/simd/i386/jidctfst-mmx.asm \
164 UnpackedTarball/libjpeg-turbo/simd/i386/jidctint-mmx.asm \
165 UnpackedTarball/libjpeg-turbo/simd/i386/jidctred-mmx.asm \
166 UnpackedTarball/libjpeg-turbo/simd/i386/jquant-mmx.asm \
167 UnpackedTarball/libjpeg-turbo/simd/i386/jfdctflt-sse.asm \
168 UnpackedTarball/libjpeg-turbo/simd/i386/jidctflt-sse.asm \
169 UnpackedTarball/libjpeg-turbo/simd/i386/jquant-sse.asm \
170 UnpackedTarball/libjpeg-turbo/simd/i386/jccolor-sse2.asm \
171 UnpackedTarball/libjpeg-turbo/simd/i386/jcgray-sse2.asm \
172 UnpackedTarball/libjpeg-turbo/simd/i386/jchuff-sse2.asm \
173 UnpackedTarball/libjpeg-turbo/simd/i386/jcphuff-sse2.asm \
174 UnpackedTarball/libjpeg-turbo/simd/i386/jcsample-sse2.asm \
175 UnpackedTarball/libjpeg-turbo/simd/i386/jdcolor-sse2.asm \
176 UnpackedTarball/libjpeg-turbo/simd/i386/jdmerge-sse2.asm \
177 UnpackedTarball/libjpeg-turbo/simd/i386/jdsample-sse2.asm \
178 UnpackedTarball/libjpeg-turbo/simd/i386/jfdctfst-sse2.asm \
179 UnpackedTarball/libjpeg-turbo/simd/i386/jfdctint-sse2.asm \
180 UnpackedTarball/libjpeg-turbo/simd/i386/jidctflt-sse2.asm \
181 UnpackedTarball/libjpeg-turbo/simd/i386/jidctfst-sse2.asm \
182 UnpackedTarball/libjpeg-turbo/simd/i386/jidctint-sse2.asm \
183 UnpackedTarball/libjpeg-turbo/simd/i386/jidctred-sse2.asm \
184 UnpackedTarball/libjpeg-turbo/simd/i386/jquantf-sse2.asm \
185 UnpackedTarball/libjpeg-turbo/simd/i386/jquanti-sse2.asm \
186 UnpackedTarball/libjpeg-turbo/simd/i386/jccolor-avx2.asm \
187 UnpackedTarball/libjpeg-turbo/simd/i386/jcgray-avx2.asm \
188 UnpackedTarball/libjpeg-turbo/simd/i386/jcsample-avx2.asm \
189 UnpackedTarball/libjpeg-turbo/simd/i386/jdcolor-avx2.asm \
190 UnpackedTarball/libjpeg-turbo/simd/i386/jdmerge-avx2.asm \
191 UnpackedTarball/libjpeg-turbo/simd/i386/jdsample-avx2.asm \
192 UnpackedTarball/libjpeg-turbo/simd/i386/jfdctint-avx2.asm \
193 UnpackedTarball/libjpeg-turbo/simd/i386/jidctint-avx2.asm \
194 UnpackedTarball/libjpeg-turbo/simd/i386/jquanti-avx2.asm \
197 else
199 $(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\
200 UnpackedTarball/libjpeg-turbo/jsimd_none \
203 endif
205 else
207 $(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\
208 UnpackedTarball/libjpeg-turbo/jsimd_none \
211 endif
214 # vim: set noet sw=4 ts=4: