43 lines
1.2 KiB
Makefile
43 lines
1.2 KiB
Makefile
#
|
|
# @(#)Makefile.arch 1.1 94/10/31 SMI
|
|
#
|
|
# This file is included by ../boot/Makefile.com
|
|
# It defines the targets and rules needed to build the machine-dependent
|
|
# sources for the boot os library.
|
|
#
|
|
# The target library is built in ../$(ARCH)
|
|
#
|
|
# The relocation symbols $LOAD, $BRELOC, and $BBRELOC must be
|
|
# defined in ../$(ARCH)/Makefile
|
|
|
|
# Machine-dependent boot os object files
|
|
MACHDIR= ../sparc
|
|
MACHOBJ= stubs1.o stret.o
|
|
|
|
# Standalone start-off.
|
|
srt0.o := SRTOPT= -DLOAD=0x$(LOAD)
|
|
srt0xx.o:= SRTOPT= -DLOAD=0x$(LOAD) -DBOOTBLOCK
|
|
|
|
#assym.s
|
|
srt0.o srt0xx.o: $(MACHDIR)/srt0.s
|
|
${RM} tmp.c tmp.i $@
|
|
cp $(MACHDIR)/srt0.s tmp.c
|
|
${CC} -E -DBOOTBLOCK -DLOCORE ${CFLAGS} ${BOOTOPT} -DLOAD=0x${LOAD} tmp.c > tmp.i
|
|
${AS} tmp.i -o $@
|
|
${RM} tmp.c tmp.i
|
|
|
|
# srt0.s needs to have some symbols defined from kernel header files
|
|
#assym.s: $(MACHDIR)/genassym.c
|
|
# @$(CC) $(CPPOPTS) -o genassym $(MACHDIR)/genassym.c
|
|
# ./genassym >$@
|
|
# @$(RM) genassym
|
|
|
|
# Rules for machine-dependent .s files
|
|
$$(BOOT_LIB)(%.o): $(MACHDIR)/%.s
|
|
${RM} tmp.c tmp.i $%
|
|
cp $(MACHDIR)/$< tmp.c
|
|
/lib/cpp -P -DBOOTBLOCK -DLOCORE ${CFLAGS} ${BOOTOPT} -DLOAD=0x${LOAD} tmp.c > tmp.s
|
|
${AS} -P -Q tmp.s -o $%
|
|
${RM} tmp.c tmp.i
|
|
${AR} rv $(BOOT_LIB) $%
|