initial commit
[freebsd-arm:freebsd-arm.git] / boot / zfs / Makefile
1 # $FreeBSD$
2
3 LIB=            zfsboot
4 INTERNALLIB=
5
6 SRCS+=          zfs.c
7
8 CFLAGS+=        -I${.CURDIR}/../common -I${.CURDIR}/../.. -I.
9 CFLAGS+=        -I${.CURDIR}/../../../lib/libstand
10 CFLAGS+=        -I${.CURDIR}/../../cddl/boot/zfs
11
12 CFLAGS+=        -ffreestanding
13 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
14 CFLAGS+=        -mpreferred-stack-boundary=2
15 CFLAGS+=        -mno-mmx -mno-3dnow -mno-sse -mno-sse2
16 .endif
17 .if ${MACHINE_ARCH} == "i386"
18 CFLAGS+=        -mno-sse3
19 .endif
20 .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm"
21 CFLAGS+=        -msoft-float
22 .endif
23 .if ${MACHINE_ARCH} == "amd64"
24 CFLAGS+=        -m32 -march=i386
25 .endif
26
27 CFLAGS+=        -Wformat -Wall
28
29 .if ${MACHINE_ARCH} == "amd64"
30 CLEANFILES+=    machine
31 machine:
32         ln -sf ${.CURDIR}/../../i386/include machine
33 .endif
34
35 .include <bsd.lib.mk>
36
37 .if ${MACHINE_ARCH} == "amd64"
38 beforedepend ${OBJS}: machine
39 .endif