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 5) and /Makefile (Article 1)


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

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