Plan 9 from Bell Labs’s /usr/web/sources/contrib/rsc/9load/20040703/mkfile

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


objtype=386
</$objtype/mkfile
BIN=/386

TARG=\
	9load\
	9pxeload\
	9loadlite\
	9loaddebug\
	9loadlitedebug\
	ld.com\
	mbr\
	pbs\
	pbslba\

CORE=\
	alarm.$O\
	cga.$O\
	clock.$O\
	console.$O\
	dosboot.$O\
	donprint.$O\
	devfloppy.$O\
	dma.$O\
	fs.$O\
	ilock.$O\
	kbd.$O\
	kfsboot.$O\
	queue.$O\
	trap.$O\

LOAD=\
	8250.$O\
	apm.$O\
	boot.$O\
	devpccard.$O\
	conf.$O\
	devi82365.$O\
	devsd.$O\
	inflate.$O\
	load.$O\
	memory.$O\
	part.$O\
	pci.$O\
	sdata.$O\
	sdmylex.$O\
	sd53c8xx.$O\
	sdscsi.$O\

ETHER=\
	bootp.$O\
	ether.$O\
	ether2114x.$O\
	ether2000.$O\
	ether589.$O\
	ether79c970.$O\
	ether8003.$O\
	ether8139.$O\
	ether82557.$O\
	ether83815.$O\
	ether8390.$O\
	etherec2t.$O\
	etherelnk3.$O\
	ethermii.$O\
	etherrhine.$O\

BCOM=\
	bcom.$O\
	bootld.$O\
	devsd.$O\
	memory.$O\
	part.$O\
	pci.$O\
	sdata.$O\
	sdscsi.$O\

HFILES=\
	lib.h\
	mem.h\
	dat.h\
	fns.h\
	io.h\

CFLAGS=-FVw -I.

all:V:	$TARG

9load:	l.$O $CORE $LOAD $ETHER
	$LD -o $target -H3 -T0x80010000 -l $prereq -lflate -lc
	ls -l $target

9pxeload:	lpxe.$O $CORE $LOAD $ETHER
	$LD -o $target -H3 -T0x80007C00 -l $prereq -lflate -lc
	ls -l $target

9loaddebug:	l.$O $CORE $LOAD $ETHER
	$LD -o $target -T0x80010000 -l $prereq -lflate -lc
	ls -l $target
	# acid $target
	# map({"text", 0x80010000, 0x80090000, 0x00000020})

9loadlite:	l.$O $CORE $LOAD noether.$O
	$LD -o $target -H3 -T0x80010000 -l $prereq -lflate -lc
	ls -l $target

9loadlitedebug:	l.$O $CORE $LOAD noether.$O
	$LD -o $target -T0x80010000 -l $prereq -lflate -lc
	ls -l $target
	# acid $target
	# map({"text", 0x80010000, 0x80090000, 0x00000020})

ld.com:	ld.$O $CORE $BCOM
	$LD -o $target -H3 -T0x80080100 -l $prereq -lc
	ls -l $target

lddebug:	ld.$O $CORE $BCOM
	$LD -o $target -T0x80080100 -l $prereq -lc
	ls -l $target
	# acid $target
	# map({"text", 0x80080100, 0x800B0000, 0x00000020})

ld.$O:	l.s
	$AS -DDOTCOM -o $target l.s

lpxe.$O: l.s
	$AS -DPXE -o $target l.s

%.$O:	%.s
	$AS $stem.s

%.$O:	%.c
	$CC $CFLAGS $stem.c

%.$O:	$HFILES

l.$O pbs.$O pbslba.$O mbr.$O:	x16.h

clock.$O floppy.$O trap.$O:	ureg.h
bcom.$O conf.$O devfloppy.$O devsd.$O dosboot.$O fs.$O \
	kfsboot.$O load.$O part.$O:	dosfs.h fs.h kfs.h
ether.$O etherelnk3.$O:	etherif.h
devsd.$O part.$O sdata.$O sdscsi.$O: sd.h
bootp.$O:	ip.h

mbr:	mbr.$O
	$LD -o $target -H3 -T0x0600 -l $prereq
	ls -l $target

pbs&:	pbs%.$O
	$LD -o $target -H3 -T0x7C00 -l $prereq
	ls -l $target

pbs&.debug:	pbs%.$O
	$LD -o $target -T0x7C00 -l $prereq
	ls -l $target
	# acid $target
	# map({"text", 0x7C00, 0x7E00, 0x00000020})
	
clean:
	rm -f *.[$OS] [$OS].out y.tab.? y.debug y.output $TARG 9loaddebug lddebug

install:V:
	for (i in $TARG)
		mk $MKFLAGS $i.install

%.install:V:	$BIN/%
	import lookout / /n/lookout
	cp $prereq /n/lookout/$prereq

$BIN/%:	%
	cp $stem $BIN/$stem

UPDATE=\
	mkfile\
	${CORE:%.$O=%.c}\
	${LOAD:%.$O=%.c}\
	${BCOM:%.$O=%.c}\
	${ETHER:%.$O=%.c}\
	$HFILES\
	l.s\
	noether.c\
	pbs.s\
	pbslba.s\
	mbr.s\
	x16.h\
	ureg.h\
	dosfs.h\
	fs.h\
	kfs.h\
	etherif.h\
	sd.h\
	ip.h\
	devfloppy.h\
	${TARG:%=/386/%}\

update:V:
	update $UPDATEFLAGS $UPDATE


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.