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           drivers/x86_videomem.o drivers/bochs.o \
006           sos/klibc.o sos/main.o
007 
008 KERNEL_OBJ   = sos.elf
009 MULTIBOOT_IMAGE = fd.img
010 PWD := $(shell pwd)
011 
012 # Main target
013 all: $(MULTIBOOT_IMAGE)
014 
015 $(MULTIBOOT_IMAGE): $(KERNEL_OBJ)
016         ./support/build_image.sh $@ $<
017 
018 $(KERNEL_OBJ): $(OBJECTS)
019         $(LD) $(LDFLAGS) -T ./support/sos.lds -o $@ $^
020         -nm -C $@ | cut -d ' ' -f 1,3 > sos.map
021 
022 -include .mkvars
023 
024 # Create objects from C source code
025 %.o: %.c
026         $(CC) -I$(PWD) -c $< $(CFLAGS) -o $@
027 
028 # Create objects from assembler (.S) source code
029 %.o: %.S
030         $(CC) -I$(PWD) -c $< $(CFLAGS) -DASM_SOURCE=1 -o $@
031 
032 # Clean directory
033 clean:
034         $(RM) *.img *.o mtoolsrc *~ menu.txt *.img *.elf *.bin *.map
035         $(RM) *.log *.out bochs*
036         $(RM) bootstrap/*.o bootstrap/*~
037         $(RM) drivers/*.o drivers/*~
038         $(RM) hwcore/*.o hwcore/*~
039         $(RM) sos/*.o sos/*~
040         $(RM) support/*~
041         $(RM) extra/*~

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