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


001 ## Copyright (C) 2004,2005  The SOS Team       << 
002 ##                                             << 
003 ## This program is free software; you can redi << 
004 ## modify it under the terms of the GNU Genera << 
005 ## as published by the Free Software Foundatio << 
006 ## of the License, or (at your option) any lat << 
007 ##                                             << 
008 ## This program is distributed in the hope tha << 
009 ## but WITHOUT ANY WARRANTY; without even the  << 
010 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR << 
011 ## GNU General Public License for more details << 
012 ##                                             << 
013 ## You should have received a copy of the GNU  << 
014 ## along with this program; if not, write to t << 
015 ## Foundation, Inc., 59 Temple Place - Suite 3 << 
016 ## USA.                                        << 
017                                                << 
018 CC=gcc                                            001 CC=gcc
019 LD=ld                                          !! 002 CFLAGS  = -Wall -nostdlib -nostdinc -ffreestanding -DKERNEL_SOS
020 CFLAGS  = -Wall -nostdinc -ffreestanding -DKER !! 003 LDFLAGS = --warn-common
021 LDFLAGS = --warn-common -nostdlib              !! 004 OBJECTS = bootstrap/multiboot.o \
022 OBJECTS = bootstrap/multiboot.o                !! 005           drivers/x86_videomem.o drivers/bochs.o \
023           hwcore/idt.o hwcore/gdt.o            !! 006           sos/klibc.o sos/main.o
024           hwcore/exception.o hwcore/exception_ << 
025           hwcore/irq.o hwcore/irq_wrappers.o h << 
026           hwcore/paging.o                      << 
027           hwcore/i8254.o drivers/x86_videomem. << 
028           hwcore/cpu_context.o hwcore/cpu_cont << 
029           sos/kmem_vmm.o sos/kmem_slab.o sos/k << 
030           sos/physmem.o sos/klibc.o            << 
031           sos/thread.o sos/kwaitq.o            << 
032           sos/time.o sos/sched.o sos/ksynch.o  << 
033           sos/assert.o sos/main.o sos/mouse_si << 
034                                                   007 
035 KERNEL_OBJ   = sos.elf                            008 KERNEL_OBJ   = sos.elf
036 MULTIBOOT_IMAGE = fd.img                          009 MULTIBOOT_IMAGE = fd.img
037 PWD := $(shell pwd)                               010 PWD := $(shell pwd)
038                                                   011 
039 # Main target                                     012 # Main target
040 all: $(MULTIBOOT_IMAGE)                           013 all: $(MULTIBOOT_IMAGE)
041                                                   014 
042 $(MULTIBOOT_IMAGE): $(KERNEL_OBJ)                 015 $(MULTIBOOT_IMAGE): $(KERNEL_OBJ)
043         ./support/build_image.sh $@ $<            016         ./support/build_image.sh $@ $<
044                                                   017 
045 $(KERNEL_OBJ): $(OBJECTS) ./support/sos.lds    !! 018 $(KERNEL_OBJ): $(OBJECTS)
046         $(LD) $(LDFLAGS) -T ./support/sos.lds  !! 019         $(LD) $(LDFLAGS) -T ./support/sos.lds -o $@ $^
047         -nm -C $@ | cut -d ' ' -f 1,3 > sos.ma    020         -nm -C $@ | cut -d ' ' -f 1,3 > sos.map
048         size $@                                << 
049                                                   021 
050 -include .mkvars                                  022 -include .mkvars
051                                                   023 
052 # Create objects from C source code               024 # Create objects from C source code
053 %.o: %.c                                          025 %.o: %.c
054         $(CC) -I$(PWD) -c $< $(CFLAGS) -o $@      026         $(CC) -I$(PWD) -c $< $(CFLAGS) -o $@
055                                                   027 
056 # Create objects from assembler (.S) source co    028 # Create objects from assembler (.S) source code
057 %.o: %.S                                          029 %.o: %.S
058         $(CC) -I$(PWD) -c $< $(CFLAGS) -DASM_S    030         $(CC) -I$(PWD) -c $< $(CFLAGS) -DASM_SOURCE=1 -o $@
059                                                << 
060 FORCE:                                         << 
061         @                                      << 
062                                                   031 
063 # Clean directory                                 032 # Clean directory
064 clean:                                            033 clean:
065         $(RM) *.img *.o mtoolsrc *~ menu.txt *    034         $(RM) *.img *.o mtoolsrc *~ menu.txt *.img *.elf *.bin *.map
066         $(RM) *.log *.out bochs*                  035         $(RM) *.log *.out bochs*
067         $(RM) bootstrap/*.o bootstrap/*~          036         $(RM) bootstrap/*.o bootstrap/*~
068         $(RM) drivers/*.o drivers/*~              037         $(RM) drivers/*.o drivers/*~
069         $(RM) hwcore/*.o hwcore/*~                038         $(RM) hwcore/*.o hwcore/*~
070         $(RM) sos/*.o sos/*~                      039         $(RM) sos/*.o sos/*~
071         $(RM) support/*~                          040         $(RM) support/*~
072         $(RM) extra/*~                            041         $(RM) extra/*~
                                                      

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