ramdisk Makefile: CLEANFILES fix
[minix.git] / share / mk / bsd.gcc.mk
bloba491ab8b48c2ada54065a40a70ecb3699d17daa0
1 # $NetBSD: bsd.gcc.mk,v 1.4 2012/07/19 19:42:45 christos Exp $
3 .if !defined(_BSD_GCC_MK_)
4 _BSD_GCC_MK_=1
6 .if defined(EXTERNAL_TOOLCHAIN) && !defined(__MINIX)
7 _GCC_CRTBEGIN!= ${CC} --print-file-name=crtbegin.o
8 _GCC_CRTBEGINS!= ${CC} --print-file-name=crtbeginS.o
9 _GCC_CRTEND!= ${CC} --print-file-name=crtend.o
10 _GCC_CRTENDS!= ${CC} --print-file-name=crtendS.o
11 _GCC_CRTI!= ${CC} --print-file-name=crti.o
12 _GCC_CRTN!= ${CC} --print-file-name=crtn.o
13 _GCC_CRTDIR!= dirname ${_GCC_CRTBEGIN}
14 _GCC_LIBGCCDIR!= dirname `${CC} --print-libgcc-file-name`
15 .else
16 _GCC_CRTBEGIN?= ${DESTDIR}/usr/lib/crtbegin.o
17 _GCC_CRTBEGINS?= ${DESTDIR}/usr/lib/crtbeginS.o
18 _GCC_CRTEND?= ${DESTDIR}/usr/lib/crtend.o
19 _GCC_CRTENDS?= ${DESTDIR}/usr/lib/crtendS.o
20 _GCC_CRTI?= ${DESTDIR}/usr/lib/crti.o
21 _GCC_CRTN?= ${DESTDIR}/usr/lib/crtn.o
22 _GCC_CRTDIR?= ${DESTDIR}/usr/lib
23 _GCC_LIBGCCDIR?= ${DESTDIR}/usr/lib
24 .endif
26 .if defined(__MINIX)
27 AFLAGS+=-D__ASSEMBLY__
28 CPPFLAGS+= -fno-builtin -Wall -Wno-sign-compare
30 #LSC FIXME: Needed by clang for now
31 .if ${MACHINE_ARCH} == "i386"
32 CPUFLAGS+= -march=i586
33 .endif
35 # LSC In the current state there is too much to be done
36 # Some package have been identified by directly adding NOGCCERROR
37 # To their Makefiles
38 NOGCCERROR:= yes
39 NOCLANGERROR:= yes
40 .endif # defined(__MINIX)
42 .endif # ! defined(_BSD_GCC_MK_)