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 ]

Diff markup

Differences between /Makefile (Article 3) and /Makefile (Article 6)


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

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