SimpleOS

LXR

Navigation



Site hébergé par : enix

The LXR Cross Referencer for SOS

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Article:1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 6.5 ] [ 7 ] [ 7.5 ] [ 8 ] [ 9 ] [ 9.5 ]

001 CC=gcc
002 CFLAGS  = -Wall -nostdlib -nostdinc -ffreestanding -DKERNEL_SOS
003 LDFLAGS = --warn-common
004 OBJECTS = bootstrap/multiboot.o                                 \
005           hwcore/idt.o hwcore/gdt.o                             \
006           hwcore/exception.o hwcore/exception_wrappers.o        \
007           hwcore/irq.o hwcore/irq_wrappers.o hwcore/i8259.o     \
008           hwcore/paging.o                                       \
009           hwcore/i8254.o drivers/x86_videomem.o drivers/bochs.o \
010           sos/physmem.o sos/klibc.o sos/main.o
011 
012 KERNEL_OBJ   = sos.elf
013 MULTIBOOT_IMAGE = fd.img
014 PWD := $(shell pwd)
015 
016 # Main target
017 all: $(MULTIBOOT_IMAGE)
018 
019 $(MULTIBOOT_IMAGE): $(KERNEL_OBJ)
020         ./support/build_image.sh $@ $<
021 
022 $(KERNEL_OBJ): $(OBJECTS) ./support/sos.lds
023         $(LD) $(LDFLAGS) -T ./support/sos.lds -o $@ $(OBJECTS)
024         -nm -C $@ | cut -d ' ' -f 1,3 > sos.map
025 
026 -include .mkvars
027 
028 # Create objects from C source code
029 %.o: %.c
030         $(CC) -I$(PWD) -c $< $(CFLAGS) -o $@
031 
032 # Create objects from assembler (.S) source code
033 %.o: %.S
034         $(CC) -I$(PWD) -c $< $(CFLAGS) -DASM_SOURCE=1 -o $@
035 
036 # Clean directory
037 clean:
038         $(RM) *.img *.o mtoolsrc *~ menu.txt *.img *.elf *.bin *.map
039         $(RM) *.log *.out bochs*
040         $(RM) bootstrap/*.o bootstrap/*~
041         $(RM) drivers/*.o drivers/*~
042         $(RM) hwcore/*.o hwcore/*~
043         $(RM) sos/*.o sos/*~
044         $(RM) support/*~
045         $(RM) extra/*~

source navigation ] diff markup ] identifier search ] general search ]