Import from 1.9a8 tarball
[mozilla-nss.git] / security / nss / lib / freebl / Makefile
blob04dd74ef820e3ef070217e99e09815057dc50f22
1 #! gmake
3 # ***** BEGIN LICENSE BLOCK *****
4 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 # The contents of this file are subject to the Mozilla Public License Version
7 # 1.1 (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 # http://www.mozilla.org/MPL/
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 # for the specific language governing rights and limitations under the
14 # License.
16 # The Original Code is the Netscape security libraries.
18 # The Initial Developer of the Original Code is
19 # Netscape Communications Corporation.
20 # Portions created by the Initial Developer are Copyright (C) 1994-2000
21 # the Initial Developer. All Rights Reserved.
23 # Contributor(s):
24 # Stephen Fung <fungstep@hotmail.com> and
25 # Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
27 # Alternatively, the contents of this file may be used under the terms of
28 # either the GNU General Public License Version 2 or later (the "GPL"), or
29 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 # in which case the provisions of the GPL or the LGPL are applicable instead
31 # of those above. If you wish to allow use of your version of this file only
32 # under the terms of either the GPL or the LGPL, and not to allow others to
33 # use your version of this file under the terms of the MPL, indicate your
34 # decision by deleting the provisions above and replace them with the notice
35 # and other provisions required by the GPL or the LGPL. If you do not delete
36 # the provisions above, a recipient may use your version of this file under
37 # the terms of any one of the MPL, the GPL or the LGPL.
39 # ***** END LICENSE BLOCK *****
41 #######################################################################
42 # (1) Include initial platform-independent assignments (MANDATORY). #
43 #######################################################################
45 include manifest.mn
47 #######################################################################
48 # (2) Include "global" configuration information. (OPTIONAL) #
49 #######################################################################
51 include $(CORE_DEPTH)/coreconf/config.mk
53 #######################################################################
54 # (3) Include "component" configuration information. (OPTIONAL) #
55 #######################################################################
59 #######################################################################
60 # (4) Include "local" platform-dependent assignments (OPTIONAL). #
61 #######################################################################
63 -include config.mk
65 # default for all platforms
66 # unset this on those that have multiple freebl libraries
67 FREEBL_BUILD_SINGLE_SHLIB = 1
69 ifdef USE_64
70 DEFINES += -DNSS_USE_64
71 endif
73 ifdef USE_ABI32_FPU
74 DEFINES += -DNSS_USE_ABI32_FPU
75 endif
77 # des.c wants _X86_ defined for intel CPUs.
78 # coreconf does this for windows, but not for Linux, FreeBSD, etc.
79 ifeq ($(CPU_ARCH),x86)
80 ifneq (,$(filter-out WIN%,$(OS_TARGET)))
81 OS_REL_CFLAGS += -D_X86_
82 endif
83 endif
85 ifeq ($(OS_TARGET),OSF1)
86 DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_NO_MP_WORD
87 MPI_SRCS += mpvalpha.c
88 endif
90 ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET))) #omits WIN16 and WINCE
91 ifdef NS_USE_GCC
92 # Ideally, we want to use assembler
93 # ASFILES = mpi_x86.s
94 # DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE \
95 # -DMP_ASSEMBLY_DIV_2DX1D
96 # but we haven't figured out how to make it work, so we are not
97 # using assembler right now.
98 ASFILES =
99 DEFINES += -DMP_NO_MP_WORD -DMP_USE_UINT_DIGIT
100 else
101 MPI_SRCS += mpi_x86_asm.c
102 DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
103 DEFINES += -DMP_ASSEMBLY_DIV_2DX1D -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD
104 ifdef BUILD_OPT
105 OPTIMIZER += -Ox # maximum optimization for freebl
106 endif
107 endif
108 endif
110 ifeq ($(OS_TARGET),WINCE)
111 DEFINES += -DMP_ARGCHK=0 # no assert in WinCE
112 DEFINES += -DSHA_NO_LONG_LONG # avoid 64-bit arithmetic in SHA512
113 endif
115 ifeq ($(OS_TARGET),IRIX)
116 ifeq ($(USE_N32),1)
117 ASFILES = mpi_mips.s
118 ifeq ($(NS_USE_GCC),1)
119 ASFLAGS = -Wp,-P -Wp,-traditional -O -mips3
120 else
121 ASFLAGS = -O -OPT:Olimit=4000 -dollar -fullwarn -xansi -n32 -mips3
122 endif
123 DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
124 DEFINES += -DMP_USE_UINT_DIGIT
125 endif
126 endif
128 ifeq ($(OS_TARGET),Linux)
129 ifeq ($(CPU_ARCH),x86_64)
130 ASFILES = arcfour-amd64-gas.s mpi_amd64_gas.s
131 ASFLAGS += -march=opteron -m64 -fPIC
132 DEFINES += -DNSS_BEVAND_ARCFOUR -DMPI_AMD64 -DMP_ASSEMBLY_MULTIPLY
133 DEFINES += -DNSS_USE_COMBA
134 DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
135 # DEFINES += -DMPI_AMD64_ADD
136 MPI_SRCS += mpi_amd64.c mp_comba.c
137 endif
138 ifeq ($(CPU_ARCH),x86)
139 ASFILES = mpi_x86.s
140 DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
141 DEFINES += -DMP_ASSEMBLY_DIV_2DX1D
142 DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
143 # The floating point ECC code doesn't work on Linux x86 (bug 311432).
144 #ECL_USE_FP = 1
145 endif
146 endif # Linux
148 ifeq ($(OS_TARGET),AIX)
149 DEFINES += -DMP_USE_UINT_DIGIT
150 ifndef USE_64
151 DEFINES += -DMP_NO_DIV_WORD -DMP_NO_ADD_WORD -DMP_NO_SUB_WORD
152 endif
153 endif # AIX
155 ifeq ($(OS_TARGET), HP-UX)
156 ifneq ($(OS_TEST), ia64)
157 # PA-RISC
158 ASFILES += ret_cr16.s
159 ifndef USE_64
160 FREEBL_BUILD_SINGLE_SHLIB =
161 HAVE_ABI32_INT32 = 1
162 HAVE_ABI32_FPU = 1
163 endif
164 ifdef FREEBL_CHILD_BUILD
165 ifdef USE_ABI32_INT32
166 # build for DA1.1 (HP PA 1.1) 32-bit ABI build with 32-bit arithmetic
167 DEFINES += -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD
168 DEFINES += -DSHA_NO_LONG_LONG # avoid 64-bit arithmetic in SHA512
169 else
170 ifdef USE_64
171 # this builds for DA2.0W (HP PA 2.0 Wide), the LP64 ABI, using 64-bit digits
172 MPI_SRCS += mpi_hp.c
173 ASFILES += hpma512.s hppa20.s
174 DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
175 else
176 # this builds for DA2.0 (HP PA 2.0 Narrow) ABI32_FPU model
177 # (the 32-bit ABI with 64-bit registers) using 64-bit digits
178 MPI_SRCS += mpi_hp.c
179 ASFILES += hpma512.s hppa20.s
180 DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
181 ARCHFLAG = -Aa +e +DA2.0 +DS2.0
182 endif
183 endif
184 endif
185 endif
186 endif
188 # The blapi functions are defined not only in the freebl shared
189 # libraries but also in the shared libraries linked with loader.c
190 # (libsoftokn3.so and libssl3.so). We need to use GNU ld's
191 # -Bsymbolic option or the equivalent option for other linkers
192 # to bind the blapi function references in FREEBLVector vector
193 # (ldvector.c) to the blapi functions defined in the freebl
194 # shared libraries.
195 ifeq (,$(filter-out BSD_OS FreeBSD Linux NetBSD OpenBSD, $(OS_TARGET)))
196 MKSHLIB += -Wl,-Bsymbolic
197 endif
199 ifeq ($(OS_TARGET),SunOS)
201 # The -R '$ORIGIN' linker option instructs this library to search for its
202 # dependencies in the same directory where it resides.
203 MKSHLIB += -R '$$ORIGIN'
204 ifdef NS_USE_GCC
205 ifdef GCC_USE_GNU_LD
206 MKSHLIB += -Wl,-Bsymbolic,-z,now,-z,text
207 else
208 MKSHLIB += -Wl,-B,symbolic,-z,now,-z,text
209 endif # GCC_USE_GNU_LD
210 else
211 MKSHLIB += -B symbolic -z now -z text
212 endif # NS_USE_GCC
214 # Sun's WorkShop defines v8, v8plus and v9 architectures.
215 # gcc on Solaris defines v8 and v9 "cpus".
216 # gcc's v9 is equivalent to Workshop's v8plus.
217 # gcc's -m64 is equivalent to Workshop's v9
218 # We always use Sun's assembler, which uses Sun's naming convention.
219 ifeq ($(CPU_ARCH),sparc)
220 FREEBL_BUILD_SINGLE_SHLIB=
221 ifdef USE_64
222 HAVE_ABI64_INT = 1
223 HAVE_ABI64_FPU = 1
224 else
225 HAVE_ABI32_INT32 = 1
226 HAVE_ABI32_FPU = 1
227 HAVE_ABI32_INT64 = 1
228 endif
229 SYSV_SPARC = 1
230 SOLARIS_AS = /usr/ccs/bin/as
231 #### set arch, asm, c flags
232 ifdef NS_USE_GCC
233 ifdef USE_ABI32_INT32
234 # default ARCHFLAG=-mcpu=v8 set by coreconf/sunOS5.mk
235 endif
236 ifdef USE_ABI32_INT64
237 ARCHFLAG=-mcpu=v9 -Wa,-xarch=v8plus
238 SOLARIS_AS_FLAGS = -xarch=v8plus -K PIC
239 endif
240 ifdef USE_ABI32_FPU
241 ARCHFLAG=-mcpu=v9 -Wa,-xarch=v8plusa
242 SOLARIS_AS_FLAGS = -xarch=v8plusa -K PIC
243 endif # USE_ABI32_FPU
244 ifdef USE_ABI64_INT
245 # this builds for Sparc v9a pure 64-bit architecture
246 ARCHFLAG += -mcpu=v9 -Wa,-xarch=v9
247 SOLARIS_AS_FLAGS = -xarch=v9 -K PIC
248 endif
249 ifdef USE_ABI64_FPU
250 # this builds for Sparc v9a pure 64-bit architecture
251 # It uses floating point, and 32-bit word size
252 ARCHFLAG += -mcpu=v9 -Wa,-xarch=v9a
253 SOLARIS_AS_FLAGS = -xarch=v9a -K PIC
254 endif
255 else # NS_USE_GCC
256 # FPU_TARGET_OPTIMIZER specifies the target processor and cache
257 # properties of the ABI32_FPU and ABI64_FPU architectures for use
258 # by the optimizer.
259 ifeq (,$(findstring Sun WorkShop 6,$(shell $(CC) -V 2>&1)))
260 # if the compiler is not Forte 6
261 FPU_TARGET_OPTIMIZER = -xcache=64/32/4:1024/64/4 -xchip=ultra3
262 else
263 # Forte 6 C compiler generates incorrect code for rijndael.c
264 # if -xchip=ultra3 is used (Bugzilla bug 333925). So we revert
265 # to what we used in NSS 3.10.
266 FPU_TARGET_OPTIMIZER = -xchip=ultra2
267 endif
268 ifdef USE_ABI32_INT32
269 #ARCHFLAG=-xarch=v8 set in coreconf/sunOS5.mk
270 endif
271 ifdef USE_ABI32_INT64
272 # this builds for Sparc v8+a ABI32_FPU architecture, 64-bit registers,
273 # 32-bit ABI, it uses 64-bit words, integer arithmetic,
274 # no FPU (non-VIS cpus).
275 # These flags were suggested by the compiler group for building
276 # with SunStudio 10.
277 ifdef BUILD_OPT
278 SOL_CFLAGS += -xO4
279 endif
280 SOL_CFLAGS += -xtarget=generic
281 ARCHFLAG = -xarch=v8plus
282 SOLARIS_AS_FLAGS = -xarch=v8plus -K PIC
283 endif
284 ifdef USE_ABI32_FPU
285 # this builds for Sparc v8+a ABI32_FPU architecture, 64-bit registers,
286 # 32-bit ABI, it uses FPU code, and 32-bit word size.
287 # these flags were determined by running cc -### -fast and copying
288 # the generated flag settings
289 SOL_CFLAGS += -fsingle -xmemalign=8s
290 ifdef BUILD_OPT
291 SOL_CFLAGS += -D__MATHERR_ERRNO_DONTCARE -fsimple=1
292 SOL_CFLAGS += -xalias_level=basic -xbuiltin=%all
293 SOL_CFLAGS += $(FPU_TARGET_OPTIMIZER) -xdepend
294 SOL_CFLAGS += -xlibmil -xO5
295 endif
296 ARCHFLAG = -xarch=v8plusa
297 SOLARIS_AS_FLAGS = -xarch=v8plusa -K PIC
298 endif
299 ifdef USE_ABI64_INT
300 # this builds for Sparc v9a pure 64-bit architecture,
301 # no FPU (non-VIS cpus). For building with SunStudio 10.
302 ifdef BUILD_OPT
303 SOL_CFLAGS += -xO4
304 endif
305 SOL_CFLAGS += -xtarget=generic
306 ARCHFLAG = -xarch=v9
307 SOLARIS_AS_FLAGS = -xarch=v9 -K PIC
308 endif
309 ifdef USE_ABI64_FPU
310 # this builds for Sparc v9a pure 64-bit architecture
311 # It uses floating point, and 32-bit word size.
312 # See comment for USE_ABI32_FPU.
313 SOL_CFLAGS += -fsingle -xmemalign=8s
314 ifdef BUILD_OPT
315 SOL_CFLAGS += -D__MATHERR_ERRNO_DONTCARE -fsimple=1
316 SOL_CFLAGS += -xalias_level=basic -xbuiltin=%all
317 SOL_CFLAGS += $(FPU_TARGET_OPTIMIZER) -xdepend
318 SOL_CFLAGS += -xlibmil -xO5
319 endif
320 ARCHFLAG = -xarch=v9a
321 SOLARIS_AS_FLAGS = -xarch=v9a -K PIC
322 endif
323 endif # NS_USE_GCC
325 ### set flags for both GCC and Sun cc
326 ifdef USE_ABI32_INT32
327 # this builds for Sparc v8 pure 32-bit architecture
328 DEFINES += -DMP_USE_UINT_DIGIT -DMP_ASSEMBLY_MULTIPLY
329 ASFILES = mpv_sparcv8x.s
330 DEFINES += -DSHA_NO_LONG_LONG # avoid 64-bit arithmetic in SHA512
331 endif
332 ifdef USE_ABI32_INT64
333 # this builds for Sparc v8+a ABI32_FPU architecture, 64-bit registers,
334 # 32-bit ABI, it uses 64-bit words, integer arithmetic, no FPU
335 # best times are with no MP_ flags specified
336 endif
337 ifdef USE_ABI32_FPU
338 # this builds for Sparc v8+a ABI32_FPU architecture, 64-bit registers,
339 # 32-bit ABI, it uses FPU code, and 32-bit word size
340 MPI_SRCS += mpi_sparc.c
341 ASFILES = mpv_sparcv8.s montmulfv8.s
342 DEFINES += -DMP_NO_MP_WORD -DMP_USE_UINT_DIGIT -DMP_ASSEMBLY_MULTIPLY
343 DEFINES += -DMP_USING_MONT_MULF -DMP_MONT_USE_MP_MUL
344 ECL_USE_FP = 1
345 endif
346 ifdef USE_ABI64_INT
347 # this builds for Sparc v9a pure 64-bit architecture
348 # best times are with no MP_ flags specified
349 endif
350 ifdef USE_ABI64_FPU
351 # this builds for Sparc v9a pure 64-bit architecture
352 # It uses floating point, and 32-bit word size
353 MPI_SRCS += mpi_sparc.c
354 ASFILES = mpv_sparcv9.s montmulfv9.s
355 DEFINES += -DMP_NO_MP_WORD -DMP_USE_UINT_DIGIT -DMP_ASSEMBLY_MULTIPLY
356 DEFINES += -DMP_USING_MONT_MULF -DMP_MONT_USE_MP_MUL
357 ECL_USE_FP = 1
358 endif
360 else
361 # Solaris for non-sparc family CPUs
362 ifdef NS_USE_GCC
363 LD = gcc
364 AS = gcc
365 ASFLAGS =
366 endif
367 ifeq ($(USE_64),1)
368 # Solaris for AMD64
369 ifdef NS_USE_GCC
370 ASFILES = arcfour-amd64-gas.s mpi_amd64_gas.s
371 ASFLAGS += -march=opteron -m64 -fPIC
372 MPI_SRCS += mp_comba.c
373 else
374 ASFILES = arcfour-amd64-sun.s mpi_amd64_sun.s sha-fast-amd64-sun.s
375 ASFILES += mp_comba_amd64_sun.s mpcpucache_amd64.s
376 ASFLAGS += -xarch=generic64 -K PIC
377 SHA_SRCS =
378 MPCPU_SRCS =
379 endif
380 DEFINES += -DNSS_BEVAND_ARCFOUR -DMPI_AMD64 -DMP_ASSEMBLY_MULTIPLY
381 DEFINES += -DNSS_USE_COMBA -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
382 MPI_SRCS += mpi_amd64.c
383 else
384 # Solaris x86
385 DEFINES += -D_X86_
386 DEFINES += -DMP_USE_UINT_DIGIT
387 DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
388 DEFINES += -DMP_ASSEMBLY_DIV_2DX1D
389 ASFILES = mpi_i86pc.s
390 ifndef NS_USE_GCC
391 MPCPU_SRCS =
392 ASFILES += mpcpucache_x86.s
393 endif
394 endif
395 endif # Solaris for non-sparc family CPUs
396 endif # target == SunOS
398 ifdef NSS_ENABLE_ECC
399 ifdef ECL_USE_FP
400 #enable floating point ECC code
401 DEFINES += -DECL_USE_FP
402 ECL_SRCS += ecp_fp160.c ecp_fp192.c ecp_fp224.c ecp_fp.c
403 ECL_HDRS += ecp_fp.h
404 endif
405 endif # NSS_ENABLE_ECC
407 #######################################################################
408 # (5) Execute "global" rules. (OPTIONAL) #
409 #######################################################################
411 include $(CORE_DEPTH)/coreconf/rules.mk
413 #######################################################################
414 # (6) Execute "component" rules. (OPTIONAL) #
415 #######################################################################
419 #######################################################################
420 # (7) Execute "local" rules. (OPTIONAL). #
421 #######################################################################
423 export:: private_export
425 rijndael_tables:
426 $(CC) -o $(OBJDIR)/make_rijndael_tab rijndael_tables.c \
427 $(DEFINES) $(INCLUDES) $(OBJDIR)/libfreebl.a
428 $(OBJDIR)/make_rijndael_tab
430 vpath %.h mpi ecl
431 vpath %.c mpi ecl
432 vpath %.S mpi ecl
433 vpath %.s mpi ecl
434 INCLUDES += -Impi -Iecl
437 DEFINES += -DMP_API_COMPATIBLE
439 MPI_USERS = dh.c pqg.c dsa.c rsa.c ec.c
441 MPI_OBJS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(MPI_SRCS:.c=$(OBJ_SUFFIX)))
442 MPI_OBJS += $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(MPI_USERS:.c=$(OBJ_SUFFIX)))
444 $(MPI_OBJS): $(MPI_HDRS)
446 ECL_USERS = ec.c
448 ECL_OBJS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(ECL_SRCS:.c=$(OBJ_SUFFIX)) $(ECL_ASM_SRCS:$(ASM_SUFFIX)=$(OBJ_SUFFIX)))
449 ECL_OBJS += $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(ECL_USERS:.c=$(OBJ_SUFFIX)))
451 $(ECL_OBJS): $(ECL_HDRS)
455 $(OBJDIR)/sysrand$(OBJ_SUFFIX): sysrand.c unix_rand.c win_rand.c mac_rand.c os2_rand.c
457 $(OBJDIR)/$(PROG_PREFIX)mpprime$(OBJ_SUFFIX): primes.c
459 $(OBJDIR)/ldvector$(OBJ_SUFFIX) $(OBJDIR)/loader$(OBJ_SUFFIX) : loader.h
461 ifeq ($(SYSV_SPARC),1)
463 $(OBJDIR)/mpv_sparcv8.o $(OBJDIR)/mpv_sparcv8x.o $(OBJDIR)/montmulfv8.o : $(OBJDIR)/%.o : %.s
464 @$(MAKE_OBJDIR)
465 $(SOLARIS_AS) -o $@ $(SOLARIS_AS_FLAGS) $<
467 $(OBJDIR)/mpv_sparcv9.o $(OBJDIR)/montmulfv9.o : $(OBJDIR)/%.o : %.s
468 @$(MAKE_OBJDIR)
469 $(SOLARIS_AS) -o $@ $(SOLARIS_AS_FLAGS) $<
471 $(OBJDIR)/mpmontg.o: mpmontg.c montmulf.h
473 endif
475 ifndef FREEBL_CHILD_BUILD
477 # Parent build. This is where we decide which shared libraries to build
479 ifdef FREEBL_BUILD_SINGLE_SHLIB
481 ################### Single shared lib stuff #########################
482 SINGLE_SHLIB_DIR = $(OBJDIR)/$(OS_TARGET)_SINGLE_SHLIB
483 ALL_TRASH += $(SINGLE_SHLIB_DIR)
485 $(SINGLE_SHLIB_DIR):
486 -mkdir $(SINGLE_SHLIB_DIR)
488 release_md libs:: $(SINGLE_SHLIB_DIR)
489 $(MAKE) FREEBL_CHILD_BUILD=1 \
490 OBJDIR=$(SINGLE_SHLIB_DIR) $@
491 ######################## common stuff #########################
493 endif
495 # multiple shared libraries
497 ######################## ABI32_FPU stuff #########################
498 ifdef HAVE_ABI32_FPU
499 ABI32_FPU_DIR = $(OBJDIR)/$(OS_TARGET)_ABI32_FPU
500 ALL_TRASH += $(ABI32_FPU_DIR)
502 $(ABI32_FPU_DIR):
503 -mkdir $(ABI32_FPU_DIR)
505 release_md libs:: $(ABI32_FPU_DIR)
506 $(MAKE) FREEBL_CHILD_BUILD=1 USE_ABI32_FPU=1 \
507 OBJDIR=$(ABI32_FPU_DIR) $@
508 endif
510 ######################## ABI32_INT32 stuff #########################
511 ifdef HAVE_ABI32_INT32
512 ABI32_INT32_DIR = $(OBJDIR)/$(OS_TARGET)_ABI32_INT32
513 ALL_TRASH += $(ABI32_INT32_DIR)
515 $(ABI32_INT32_DIR):
516 -mkdir $(ABI32_INT32_DIR)
518 release_md libs:: $(ABI32_INT32_DIR)
519 $(MAKE) FREEBL_CHILD_BUILD=1 USE_ABI32_INT32=1 \
520 OBJDIR=$(ABI32_INT32_DIR) $@
521 endif
523 ######################## ABI32_INT64 stuff #########################
524 ifdef HAVE_ABI32_INT64
525 ABI32_INT64_DIR = $(OBJDIR)/$(OS_TARGET)_ABI32_INT64
526 ALL_TRASH += $(ABI32_INT64_DIR)
528 $(ABI32_INT64_DIR):
529 -mkdir $(ABI32_INT64_DIR)
531 release_md libs:: $(ABI32_INT64_DIR)
532 $(MAKE) FREEBL_CHILD_BUILD=1 USE_ABI32_INT64=1\
533 OBJDIR=$(ABI32_INT64_DIR) $@
534 endif
536 ######################## END of 32-bit stuff #########################
538 # above is 32-bit builds, below is 64-bit builds
540 ######################## ABI64_FPU stuff #########################
541 ifdef HAVE_ABI64_FPU
542 ABI64_FPU_DIR = $(OBJDIR)/$(OS_TARGET)_ABI64_FPU
543 ALL_TRASH += $(ABI64_FPU_DIR)
545 $(ABI64_FPU_DIR):
546 -mkdir $(ABI64_FPU_DIR)
548 release_md libs:: $(ABI64_FPU_DIR)
549 $(MAKE) FREEBL_CHILD_BUILD=1 USE_ABI64_FPU=1 \
550 OBJDIR=$(ABI64_FPU_DIR) $@
551 endif
553 ######################## ABI64_INT stuff #########################
554 ifdef HAVE_ABI64_INT
555 ABI64_INT_DIR = $(OBJDIR)/$(OS_TARGET)_ABI64_INT
556 ALL_TRASH += $(ABI64_INT_DIR)
558 $(ABI64_INT_DIR):
559 -mkdir $(ABI64_INT_DIR)
561 release_md libs:: $(ABI64_INT_DIR)
562 $(MAKE) FREEBL_CHILD_BUILD=1 USE_ABI64_INT=1 \
563 OBJDIR=$(ABI64_INT_DIR) $@
564 endif
566 endif # FREEBL_CHILD_BUILD
569 # Bugzilla Bug 209827: disable optimization to work around what appears
570 # to be a VACPP optimizer bug.
571 ifdef XP_OS2_VACPP
572 $(OBJDIR)/alg2268.obj: alg2268.c
573 @$(MAKE_OBJDIR)
574 $(CC) -Fo$@ -c $(filter-out /O+, $(CFLAGS)) $(call core_abspath,$<)
575 endif
577 # Bugzilla Bug 333917: the non-x86 code in desblapi.c seems to violate
578 # ANSI C's strict aliasing rules.
579 ifeq ($(OS_TARGET),Linux)
580 ifneq ($(CPU_ARCH),x86)
581 $(OBJDIR)/$(PROG_PREFIX)desblapi$(OBJ_SUFFIX): desblapi.c
582 @$(MAKE_OBJDIR)
583 ifdef NEED_ABSOLUTE_PATH
584 $(CC) -o $@ -c $(CFLAGS) -fno-strict-aliasing $(call core_abspath,$<)
585 else
586 $(CC) -o $@ -c $(CFLAGS) -fno-strict-aliasing $<
587 endif
588 endif
589 endif