Overhaul makefiles.
This commit is contained in:
parent
b735cc2279
commit
4ae2790aed
@ -1,9 +1,12 @@
|
||||
# $FreeBSD$
|
||||
# Options used when building app-specific libalpha components
|
||||
|
||||
BINDIR?= /boot
|
||||
|
||||
CFLAGS+= -ffreestanding -mno-fp-regs
|
||||
LDFLAGS+= -nostdlib
|
||||
PRIMARY_LOAD_ADDRESS= 0x20000000 # "Region 1 start"
|
||||
SECONDARY_LOAD_ADDRESS= 0x2000c000 # "Region 1 start" + 48k
|
||||
HEAP_LIMIT= 0x20040000 # "Region 1 start" + 256k
|
||||
DPADD+= ${DESTDIR}/${LIBDIR}/libstand.a
|
||||
LIBSTANDDIR= ${.CURDIR}/../../../../lib/libstand
|
||||
LIBSTAND= -lstand
|
||||
LIBALPHA= ${.OBJDIR}/../libalpha/libalpha.a
|
||||
|
@ -1,44 +1,29 @@
|
||||
# $NetBSD: Makefile,v 1.15 1998/03/28 00:21:35 thorpej Exp $
|
||||
# $FreeBSD$
|
||||
|
||||
.include <../Makefile.inc>
|
||||
PROG= boot1.sym
|
||||
INTERNALPROG=
|
||||
NOMAN=
|
||||
LINKS= ${BINDIR}/boot1 ${BINDIR}/boot
|
||||
|
||||
PROG = boot1
|
||||
LINKS = ${BINDIR}/${PROG} ${BINDIR}/boot
|
||||
|
||||
.PATH: ${.CURDIR}/../libalpha
|
||||
.PATH: ${.CURDIR}/../libalpha
|
||||
|
||||
SRCS= start.S boot1.c
|
||||
CFLAGS+= -ffreestanding -mno-fp-regs
|
||||
CFLAGS+= -DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS} -DMINIMAL
|
||||
CFLAGS+= -DBOOT1
|
||||
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}
|
||||
CFLAGS+= -I${LIBSTANDDIR}
|
||||
CFLAGS+= -I${.CURDIR}/..
|
||||
NOMAN=1
|
||||
STRIP=
|
||||
BINDIR?= /boot
|
||||
CFLAGS+= -I${.CURDIR}/../../common
|
||||
|
||||
BOOT_RELOC = ${PRIMARY_LOAD_ADDRESS}
|
||||
|
||||
CLEANFILES+= ${PROG}.sym ${PROG}.nosym ${PROG}.list
|
||||
CLEANFILES= boot1
|
||||
|
||||
all: ${PROG}
|
||||
FILES= boot1
|
||||
|
||||
${PROG}.nosym: ${PROG}.sym
|
||||
cp ${PROG}.sym ${PROG}.nosym
|
||||
strip ${PROG}.nosym
|
||||
boot1: boot1.sym
|
||||
objcopy -S -O binary boot1.sym ${.TARGET}
|
||||
|
||||
${PROG}: ${PROG}.nosym
|
||||
objcopy -O binary ${PROG}.nosym ${PROG}
|
||||
LDFLAGS=-Ttext ${BOOT_RELOC} -N -e start
|
||||
DPADD= ${LIBALPHA} ${LIBSTAND}
|
||||
LDADD= ${LIBALPHA} -lstand
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
start.o: ${.CURDIR}/../libalpha/start.S
|
||||
${CC} -c ${CFLAGS} $<
|
||||
|
||||
${PROG}.sym: ${OBJS} ${LIBKERN}
|
||||
${LD} -M -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym ${OBJS} \
|
||||
-L${DESTDIR}${LIBDIR} ${LIBSTAND} ${LIBALPHA} ${LIBSTAND} \
|
||||
> ${.OBJDIR}/${PROG}.list
|
||||
size ${PROG}.sym
|
||||
|
@ -1,11 +1,10 @@
|
||||
# $FreeBSD$
|
||||
|
||||
BASE= cdboot
|
||||
PROG= ${BASE}
|
||||
BOOT= cdboot
|
||||
NOMAN=
|
||||
NEWVERSWHAT= "SRM CD9660 boot" alpha
|
||||
LOAD_ADDRESS= ${PRIMARY_LOAD_ADDRESS}
|
||||
|
||||
CFLAGS+= -ffreestanding -DLOADER_CDROM_SUPPORT
|
||||
CFLAGS+= -DLOADER_CDROM_SUPPORT
|
||||
|
||||
.include <${.CURDIR}/../common/Makefile.common>
|
||||
.include "${.CURDIR}/../common/Makefile.common"
|
||||
|
@ -2,94 +2,68 @@
|
||||
#
|
||||
# Common Alpha loader build rules
|
||||
|
||||
.PATH: ${.CURDIR}/../common
|
||||
.PATH: ${.CURDIR}/../common
|
||||
|
||||
PROG= ${BOOT}.sym
|
||||
INTERNALPROG=
|
||||
|
||||
# Alpha-specific bootstrap sources
|
||||
SRCS+= main.c conf.c
|
||||
.if ${BASE} == netboot
|
||||
SRCS= start.S main.c conf.c vers.c
|
||||
.if ${BOOT} == "netboot"
|
||||
SRCS+= dev_net.c
|
||||
.endif
|
||||
|
||||
.PATH: ${.CURDIR}/../libalpha
|
||||
|
||||
.if !defined(NOFORTH)
|
||||
# Enable BootForth
|
||||
BOOT_FORTH= yes
|
||||
CFLAGS+= -DBOOT_FORTH
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/alpha
|
||||
.if exists(${.OBJDIR}/../../ficl/libficl.a)
|
||||
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
||||
.else
|
||||
LIBFICL= ${.CURDIR}/../../ficl/libficl.a
|
||||
.endif
|
||||
.endif
|
||||
|
||||
# Always add MI sources
|
||||
.PATH: ${.CURDIR}/../../common
|
||||
.include <${.CURDIR}/../../common/Makefile.inc>
|
||||
CFLAGS+= -mno-fp-regs
|
||||
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}
|
||||
CFLAGS+= -I${.CURDIR}/../../.. -I.
|
||||
.PATH: ${.CURDIR}/../../common
|
||||
.include "${.CURDIR}/../../common/Makefile.inc"
|
||||
CFLAGS+= -I${.CURDIR}/../../common
|
||||
CFLAGS+= -DPRIMARY_LOAD_ADDRESS=${PRIMARY_LOAD_ADDRESS} \
|
||||
-DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS}
|
||||
|
||||
CLEANFILES+= setdef0.c setdef0.o setdef1.c setdef1.o setdefs.h start.o \
|
||||
vers.c vers.o ${BASE} ${BASE}.sym ${BASE}.list
|
||||
CLEANFILES+= vers.c ${BOOT} ${BOOT}.sym
|
||||
|
||||
CFLAGS+= -Wall
|
||||
|
||||
CFLAGS+= -I${LIBSTANDDIR}
|
||||
CFLAGS+= -I${.CURDIR}/..
|
||||
CRT= start.o
|
||||
STRIP=
|
||||
BINDIR?= /boot
|
||||
INSTALLFLAGS?= -b
|
||||
|
||||
all: ${BASE} ${BASE}.help
|
||||
|
||||
vers.o: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
|
||||
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
|
||||
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
|
||||
${CC} -c vers.c
|
||||
|
||||
${BASE}: ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o
|
||||
${LD} -o ${BASE}.sym -M -e start -N -Ttext ${LOAD_ADDRESS} \
|
||||
${CRT} ${OBJS} vers.o \
|
||||
-L${DESTDIR}${LIBDIR} ${LIBSTAND} ${LIBALPHA} ${LIBFICL} ${LIBSTAND} \
|
||||
>${.OBJDIR}/${BASE}.list
|
||||
objcopy -O binary ${BASE}.sym ${BASE}
|
||||
LDFLAGS=-e start -N -Ttext ${LOAD_ADDRESS}
|
||||
|
||||
CLEANFILES+= ${BASE}.help
|
||||
${BASE}.help: help.common help.alpha
|
||||
FILES= ${BOOT}
|
||||
# XXX INSTALLFLAGS_${BOOT}= -b
|
||||
FILESMODE_${BOOT}= ${BINMODE} -b
|
||||
|
||||
${BOOT}: ${BOOT}.sym
|
||||
objcopy -O binary ${BOOT}.sym ${.TARGET}
|
||||
|
||||
DPADD= ${LIBALPHA} ${LIBFICL} ${LIBSTAND}
|
||||
LDADD= ${LIBALPHA} ${LIBFICL} -lstand
|
||||
|
||||
.if defined(INSTALL_HELP)
|
||||
FILES+= ${BOOT}.help
|
||||
CLEANFILES+= ${BOOT}.help
|
||||
${BOOT}.help: help.common help.alpha
|
||||
cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
||||
.endif
|
||||
|
||||
beforeinstall:
|
||||
.ifdef INSTALL_HELP
|
||||
.if exists(${.OBJDIR}/${BASE}.help)
|
||||
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
|
||||
${.OBJDIR}/${BASE}.help ${DESTDIR}/boot
|
||||
.else
|
||||
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
|
||||
${.CURDIR}/${BASE}.help ${DESTDIR}/boot
|
||||
.endif
|
||||
.endif
|
||||
.PATH: ${.CURDIR}/../../forth
|
||||
.if !exists(${DESTDIR}/boot/loader.rc)
|
||||
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
|
||||
${.CURDIR}/../../forth/loader.rc ${DESTDIR}/boot
|
||||
FILES+= loader.rc
|
||||
.endif
|
||||
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
|
||||
${.CURDIR}/../../forth/loader.4th ${DESTDIR}/boot
|
||||
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
|
||||
${.CURDIR}/../../forth/support.4th ${DESTDIR}/boot
|
||||
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
|
||||
${.CURDIR}/../../forth/loader.conf ${DESTDIR}/boot/defaults
|
||||
|
||||
|
||||
start.o: ${.CURDIR}/../libalpha/start.S
|
||||
${CC} -c ${CFLAGS} $<
|
||||
|
||||
machine:
|
||||
ln -sf ${.CURDIR}/../../../alpha/include machine
|
||||
|
||||
CLEANFILES+= machine
|
||||
FILES+= loader.4th support.4th loader.conf
|
||||
FILESDIR_loader.conf= /boot/defaults
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
beforedepend ${OBJS}: machine
|
||||
|
@ -3,27 +3,15 @@
|
||||
LIB= alpha
|
||||
INTERNALLIB= true
|
||||
|
||||
CFLAGS+= -ffreestanding
|
||||
#CFLAGS+= -DDISK_DEBUG
|
||||
#CPPFLAGS+= -DNO_DISKLABEL
|
||||
#CPPFLAGS+= -DSAVE_MEMORY
|
||||
|
||||
# XXX hack to pick up stand.h
|
||||
LIBSTANDDIR= ${.CURDIR}/../../../../lib/libstand
|
||||
CFLAGS+= -DDEBUG
|
||||
CFLAGS+= -I${LIBSTANDDIR}
|
||||
|
||||
# Pick up the bootstrap header for some interface items
|
||||
CFLAGS+= -I${.CURDIR}/../../common -mno-fp-regs \
|
||||
-I${.CURDIR}/../../.. -I.
|
||||
CFLAGS+= -I${.CURDIR}/../../common
|
||||
|
||||
SRCS= OSFpal.c elf_freebsd.c prom.c prom_disp.S prom_swpal.S \
|
||||
pal.S reboot.c delay.c time.c alpha_module.c devicename.c \
|
||||
srmdisk.c srmnet.c getsecs.c alpha_copy.c bootinfo.c
|
||||
|
||||
machine:
|
||||
ln -sf ${.CURDIR}/../../../alpha/include machine
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
||||
beforedepend ${OBJS}: machine
|
||||
|
@ -1,12 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
BASE= loader
|
||||
PROG= ${BASE}
|
||||
BOOT= loader
|
||||
NEWVERSWHAT= "SRM disk boot" alpha
|
||||
INSTALL_HELP= yes
|
||||
LOAD_ADDRESS= ${SECONDARY_LOAD_ADDRESS}
|
||||
|
||||
# Only disk support
|
||||
CFLAGS+= -ffreestanding -DLOADER_DISK_SUPPORT # -DLOADER_EXT2FS_SUPPORT
|
||||
CFLAGS+= -DLOADER_DISK_SUPPORT # -DLOADER_EXT2FS_SUPPORT
|
||||
|
||||
.include <${.CURDIR}/../common/Makefile.common>
|
||||
.include "${.CURDIR}/../common/Makefile.common"
|
||||
|
@ -1,13 +1,11 @@
|
||||
# $FreeBSD$
|
||||
# $NetBSD: Makefile,v 1.12 1998/02/19 14:18:36 drochner Exp $
|
||||
|
||||
BASE= netboot
|
||||
PROG= ${BASE}
|
||||
BOOT= netboot
|
||||
NOMAN=
|
||||
NEWVERSWHAT= "SRM net boot" alpha
|
||||
LOAD_ADDRESS= ${PRIMARY_LOAD_ADDRESS}
|
||||
|
||||
CFLAGS+= -ffreestanding -DLOADER_NET_SUPPORT
|
||||
|
||||
.include <${.CURDIR}/../common/Makefile.common>
|
||||
CFLAGS+= -DLOADER_NET_SUPPORT
|
||||
|
||||
.include "${.CURDIR}/../common/Makefile.common"
|
||||
|
Loading…
Reference in New Issue
Block a user