summaryrefslogtreecommitdiff
path: root/sos-code-article1/extra/dot.mkvars
blob: 1f7dca5b0e2d58a3f2b355926e9b163719f343d5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# For cross-compilation and/or installations without grub available,
# copy this file as .mkvars to the root directory of the SOS sources,
# and customize the CC/LD/... variables. You still need the mtools
# installed and running

CC := i586-gnu-gcc
LD := i586-gnu-ld
OBJCOPY := i586-gnu-objcopy
CFLAGS += -O3

# Configuration of mtools
MTOOLSRC = extra/mtoolsrc
export MTOOLSRC

$(MULTIBOOT_IMAGE): $(KERNEL_OBJ) menu.txt
	gzip -dc < extra/grub.img.gz > $@
	mcopy menu.txt v:/boot/grub/
	mmd v:/system
	mcopy sos.elf v:/system/sos.elf

menu.txt:
	echo timeout 0 > $@
	echo default 0 >> $@
	echo title  SOS >> $@
	echo "root   (fd0)" >> $@
	echo kernel /system/sos.elf >> $@

runbochs: all
	echo c | bochs -q