freebsd-dev/sys/boot/i386/Makefile.inc
Ruslan Ermilov bcd106e18b - Factor out -nostdlib to an upper level Makefile.inc.
- Now that bsd.prog.mk deals with programs linked with -nostdlib
  better, and has a notion of an "internal" program, use PROG
  where possible.  This has a good impact on the contents of
  .depend files and causes programs to be linked with cc(1).

XXX: boot2 couldn't be converted as it's actually two programs.

Tested on:	i386, amd64
2004-02-09 14:11:58 +00:00

26 lines
472 B
Makefile

# Common defines for all of /sys/boot/i386/
#
# $FreeBSD$
BINDIR?= /boot
LOADER_ADDRESS?=0x200000
CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2
LDFLAGS+= -nostdlib
.if ${MACHINE_ARCH} == "amd64"
CFLAGS+= -m32
LDFLAGS+= -m elf_i386_fbsd
AFLAGS+= --32
.endif
# BTX components
.if exists(${.OBJDIR}/../btx)
BTXDIR= ${.OBJDIR}/../btx
.else
BTXDIR= ${.CURDIR}/../btx
.endif
BTXLDR= ${BTXDIR}/btxldr/btxldr
BTXKERN= ${BTXDIR}/btx/btx
BTXCRT= ${BTXDIR}/lib/crt0.o