xref: /dragonfly/stand/boot/dloader/Makefile (revision 479ab7f0)
1# The DragonFly Loader
2#
3#
4
5SRCS=	subs.c cmds.c
6
7WORLD_CCOPTLEVEL=	1	# Force -O1, -O2 implodes
8
9# Disable stack protector
10CFLAGS+=	-fno-stack-protector
11
12# For i386, dloader32/Makefile takes care of the extra CFLAGS
13.if ${MACHINE_ARCH} != "i386"
14CFLAGS+=	-fPIC -mno-red-zone
15CFLAGS+=	-ffreestanding
16CFLAGS+=	-D_STANDALONE
17.endif
18
19.if ${MACHINE_ARCH} == "x86_64"
20CFLAGS+=	-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
21.endif
22
23.if HAVE_PNP
24CFLAGS+=	-DHAVE_PNP
25.endif
26.ifmake testmain
27CFLAGS+=	-DTESTMAIN -D_TESTMAIN
28SRCS+=		testmain.c
29PROG=		testmain
30OBJS+=		rel_open.o
31
32rel_open.o: ../common/rel_open.c
33
34.include <bsd.prog.mk>
35.else
36OBJS+=		stack_protector.o
37LIB?=		dloader
38INTERNALLIB=	yes
39
40stack_protector.o: ../../../sys/libkern/stack_protector.c
41
42.include <bsd.lib.mk>
43.endif
44
45CFLAGS+=	-I${.CURDIR}
46CFLAGS+=	-I${.CURDIR}/../common
47CFLAGS+=	-I${.CURDIR}/../../lib
48