More minor IPI work.
[dragonfly/vkernel-mp.git] / sys / boot / ia64 / skiload / Makefile
blob598815cc4c2745614165314027e8ab4b927e54c8
1 # $FreeBSD: src/sys/boot/ia64/skiload/Makefile,v 1.12 2003/11/09 06:53:37 marcel Exp $
2 # $DragonFly: src/sys/boot/ia64/skiload/Makefile,v 1.3 2006/10/22 18:09:19 dillon Exp $
4 .PATH: ${.CURDIR}/../common
6 PROG= skiload
7 NOMAN=
8 NEWVERSWHAT= "ia64 SKI boot" ${MACHINE_ARCH}
9 BINDIR?= /boot
10 STRIP= # We must not strip skiload at install time.
12 SRCS+= conf.c main.c start.S
14 CFLAGS+= -ffreestanding
16 .if !defined(NOFORTH)
17 # Enable BootForth
18 BOOT_FORTH= yes
19 CFLAGS+= -DBOOT_FORTH
20 CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/${MACHINE_ARCH}
21 .if exists(${.OBJDIR}/../../ficl/libficl.a)
22 LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
23 .else
24 LIBFICL= ${.CURDIR}/../../ficl/libficl.a
25 .endif
26 .endif
28 # where to get libstand from
29 .if exists(${.OBJDIR}/../../../../lib/libstand/libstand.a)
30 LIBSTAND= ${.OBJDIR}/../../../../lib/libstand/libstand.a
31 .else
32 LIBSTAND= ${.CURDIR}/../../../../lib/libstand/libstand.a
33 .endif
35 .if exists(${.OBJDIR}/../libski/libski.a)
36 LIBSKI= ${.OBJDIR}/../libski/libski.a
37 .else
38 LIBSKI= ${.CURDIR}/../libski/libski.a
39 .endif
41 # Always add MI sources
42 .PATH: ${.CURDIR}/../../common
43 .include <${.CURDIR}/../../common/Makefile.inc>
45 CFLAGS+= -I-
46 CFLAGS+= -I${.CURDIR}/../include
47 CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH}
48 CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}
49 CFLAGS+= -I${.CURDIR}/../../.. -I.
50 CFLAGS+= -I${.CURDIR}/../libski
51 CFLAGS+= -DLOADER
53 LDFLAGS= -nostdlib -T ${.CURDIR}/ldscript.ia64
55 CLEANFILES+= vers.c vers.o ${PROG}.list
56 CLEANFILES+= loader.help
57 CLEANFILES+= machine
59 all: ${PROG}
61 vers.o: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
62 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
63 ${CC} -c vers.c
65 ${PROG}.help: help.common help.efi
66 cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk \
67 > ${.TARGET}
69 beforeinstall:
70 .if exists(${.OBJDIR}/${PROG}.help)
71 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
72 ${.OBJDIR}/${PROG}.help ${DESTDIR}/boot
73 .endif
75 machine:
76 ${LN} -sf ${.CURDIR}/../../../arch/${MACHINE_ARCH}/include machine
78 ${PROG}: ${OBJS} ${LIBFICL} ${LIBSKI} ${LIBSTAND} vers.o
79 ${LD} ${LDFLAGS} -o ${PROG} -M \
80 ${OBJS} vers.o \
81 ${LIBFICL} ${LIBSTAND} ${LIBSKI} ${LIBSTAND} \
82 > ${.OBJDIR}/${PROG}.list
84 .include <bsd.prog.mk>
86 beforedepend ${OBJS}: machine