Merge branch 'openssh'
[dragonfly.git] / sys / boot / dloader / Makefile
1 # The DragonFly Loader
2 #
3 #
4 .if exists(../${MACHINE_PLATFORM}/Makefile.inc)
5 .include "../${MACHINE_PLATFORM}/Makefile.inc"
6 .endif
7
8 .PATH: ${.CURDIR}/${MACHINE_ARCH}
9 SRCS=   subs.c config.c cmds.c
10
11 .if HAVE_PNP
12 CFLAGS+=        -DHAVE_PNP
13 .endif
14 .ifmake testmain
15 CFLAGS+=        -DTESTMAIN -D_TESTMAIN
16 SRCS+=          testmain.c
17 PROG=           testmain
18 OBJS+=          rel_open.o
19
20 rel_open.o: ../common/rel_open.c
21
22 .include <bsd.prog.mk>
23 .else
24 OBJS+=          stack_protector.o
25 LIB=            dloader
26 INTERNALLIB=    yes
27
28 stack_protector.o: ../../libkern/stack_protector.c
29
30 .include <bsd.lib.mk>
31 .endif
32
33 .if defined(REALLY_X86_64)
34 CFLAGS+=        -I.
35 .endif
36
37 CFLAGS+=        -I${.CURDIR}
38 CFLAGS+=        -I${.CURDIR}/../common
39
40 .if defined(REALLY_X86_64)
41 ${SRCS:M*.c:R:S/$/.o/g}: machine
42
43 beforedepend ${OBJS}: machine
44
45 machine:
46         ${LN} -sf ${.CURDIR}/../../i386/include machine
47
48 CLEANFILES+=    machine
49 .endif