etc/services - sync with NetBSD-8
[minix.git] / lib / libm / compiler_rt / Makefile.inc
blob38852d2c3b1ddf42aa638bd14818a374ef40e406
1 # $NetBSD: Makefile.inc,v 1.9 2014/10/22 10:33:27 joerg Exp $
3 COMPILER_RT_SRCDIR=     ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist
5 .if ${MACHINE_CPU} == "powerpc"
6 COMPILER_RT_CPU_DIR=    ${COMPILER_RT_SRCDIR}/lib/builtins/ppc
7 COMPILER_RT_ARCH_DIR=   ${COMPILER_RT_SRCDIR}/lib/builtins/ppc
8 .else
9 COMPILER_RT_CPU_DIR=    ${COMPILER_RT_SRCDIR}/lib/builtins/${MACHINE_CPU}
10 COMPILER_RT_ARCH_DIR=   ${COMPILER_RT_SRCDIR}/lib/builtins/${MACHINE_ARCH}
11 .endif
13 .if !defined(__MINIX)
14 .PATH: ${COMPILER_RT_CPU_DIR}
15 .PATH: ${COMPILER_RT_ARCH_DIR}
16 .endif # !defined(__MINIX)
17 .PATH: ${COMPILER_RT_SRCDIR}/lib/builtins
19 # Needs scaling support
20 GENERIC_SRCS+= \
21         muldc3.c \
22         mulsc3.c \
23         mulxc3.c \
24         divdc3.c \
25         divsc3.c \
26         divxc3.c
28 .if ${MACHINE_CPU} == "powerpc"
29 GENERIC_SRCS+= \
30         divtc3.c \
31         multc3.c
32 .endif
34 .if !defined(__MINIX)
35 .for src in ${GENERIC_SRCS}
36 .  if exists(${COMPILER_RT_CPU_DIR}/${src:R}.S) || \
37       exists(${COMPILER_RT_ARCH_DIR}/${src:R}.S)
38 SRCS+=  ${src:R}.S
39 .  else
40 SRCS+=  ${src}
41 COPTS.${src}+=  -Wno-error=missing-prototypes
42 .  endif
43 .endfor
44 .else
45 # For MINIX: do not pull in the assembly symbols, as they are not PIC ready
46 .for src in ${GENERIC_SRCS}
47 SRCS+=  ${src}
48 COPTS.${src}+=  -Wno-error=missing-prototypes
49 .endfor
50 .endif # !defined(__MINIX)