001 # For cross-compilation and/or installations without grub available,
002 # copy this file as .mkvars to the root directory of the SOS sources,
003 # and customize the CC/LD/... variables. You still need the mtools
004 # installed and running
005
006 CC := i586-pc-elf-gcc
007 LD := i586-pc-elf-ld
008 OBJCOPY := i586-pc-elf-objcopy
009 STRIP := i586-pc-elf-strip
010 CFLAGS += -g -O
011 LIBGCC := $(shell $(CC) -print-libgcc-file-name) # To benefit from FP/64bits artihm.
012
013 # Configuration of mtools
014 MTOOLSRC = extra/mtoolsrc
015 export MTOOLSRC
016
017 $(MULTIBOOT_IMAGE): $(KERNEL_OBJ) menu.txt
018 gzip -dc < extra/grub.img.gz > $@
019 mcopy menu.txt v:/boot/grub/
020 mmd v:/system
021 mcopy sos.elf v:/system/sos.elf
022
023 menu.txt:
024 echo timeout 0 > $@
025 echo default 0 >> $@
026 echo title SOS >> $@
027 echo "root (fd0)" >> $@
028 echo kernel /system/sos.elf >> $@
029
030 runbochs: all
031 echo c | bochs -q