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


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 LIBGCC := $(shell $(CC) -print-libgcc-file-nam << 
022 LDFLAGS = --warn-common -nostdlib              << 
023 OBJECTS = bootstrap/multiboot.o                   004 OBJECTS = bootstrap/multiboot.o                                 \
024           hwcore/idt.o hwcore/gdt.o               005           hwcore/idt.o hwcore/gdt.o                             \
025           hwcore/swintr.o hwcore/swintr_wrappe << 
026           hwcore/exception.o hwcore/exception_    006           hwcore/exception.o hwcore/exception_wrappers.o        \
027           hwcore/irq.o hwcore/irq_wrappers.o h    007           hwcore/irq.o hwcore/irq_wrappers.o hwcore/i8259.o     \
028           hwcore/paging.o                      !! 008           hwcore/paging.o                                       \
029           hwcore/i8254.o drivers/x86_videomem.    009           hwcore/i8254.o drivers/x86_videomem.o drivers/bochs.o \
030           hwcore/cpu_context.o hwcore/cpu_cont << 
031           hwcore/mm_context.o                  << 
032           sos/kmem_vmm.o sos/kmem_slab.o sos/k    010           sos/kmem_vmm.o sos/kmem_slab.o sos/kmalloc.o          \
033           sos/physmem.o sos/klibc.o            !! 011           sos/physmem.o sos/klibc.o sos/main.o
034           sos/thread.o sos/kwaitq.o            << 
035           sos/time.o sos/sched.o sos/ksynch.o  << 
036           sos/process.o sos/syscall.o          << 
037           sos/assert.o sos/main.o sos/mouse_si << 
038           sos/uaccess.o sos/calcload.o         << 
039           userland/userprogs.kimg sos/test-art << 
040                                                   012 
041 KERNEL_OBJ   = sos.elf                            013 KERNEL_OBJ   = sos.elf
042 MULTIBOOT_IMAGE = fd.img                          014 MULTIBOOT_IMAGE = fd.img
043 PWD := $(shell pwd)                               015 PWD := $(shell pwd)
044                                                   016 
045 # Main target                                     017 # Main target
046 all: $(MULTIBOOT_IMAGE)                           018 all: $(MULTIBOOT_IMAGE)
047                                                   019 
048 $(MULTIBOOT_IMAGE): $(KERNEL_OBJ)                 020 $(MULTIBOOT_IMAGE): $(KERNEL_OBJ)
049         ./support/build_image.sh $@ $<            021         ./support/build_image.sh $@ $<
050                                                   022 
051 $(KERNEL_OBJ): $(OBJECTS) ./support/sos.lds       023 $(KERNEL_OBJ): $(OBJECTS) ./support/sos.lds
052         $(LD) $(LDFLAGS) -T ./support/sos.lds  !! 024         $(LD) $(LDFLAGS) -T ./support/sos.lds -o $@ $(OBJECTS)
053         -nm -C $@ | cut -d ' ' -f 1,3 > sos.ma    025         -nm -C $@ | cut -d ' ' -f 1,3 > sos.map
054         size $@                                << 
055                                                   026 
056 -include .mkvars                                  027 -include .mkvars
057                                                   028 
058 # Create the userland programs to include in t << 
059 userland/userprogs.kimg: FORCE                 << 
060         $(MAKE) -C userland                    << 
061                                                << 
062 # Create objects from C source code               029 # Create objects from C source code
063 %.o: %.c                                          030 %.o: %.c
064         $(CC) -I$(PWD) -c $< $(CFLAGS) -o $@      031         $(CC) -I$(PWD) -c $< $(CFLAGS) -o $@
065                                                   032 
066 # Create objects from assembler (.S) source co    033 # Create objects from assembler (.S) source code
067 %.o: %.S                                          034 %.o: %.S
068         $(CC) -I$(PWD) -c $< $(CFLAGS) -DASM_S    035         $(CC) -I$(PWD) -c $< $(CFLAGS) -DASM_SOURCE=1 -o $@
069                                                   036 
070 FORCE:                                         << 
071         @                                      << 
072                                                << 
073 # Clean directory                                 037 # Clean directory
074 clean:                                            038 clean:
075         $(RM) *.img *.o mtoolsrc *~ menu.txt *    039         $(RM) *.img *.o mtoolsrc *~ menu.txt *.img *.elf *.bin *.map
076         $(RM) *.log *.out bochs*                  040         $(RM) *.log *.out bochs*
077         $(RM) bootstrap/*.o bootstrap/*~          041         $(RM) bootstrap/*.o bootstrap/*~
078         $(RM) drivers/*.o drivers/*~              042         $(RM) drivers/*.o drivers/*~
079         $(RM) hwcore/*.o hwcore/*~                043         $(RM) hwcore/*.o hwcore/*~
080         $(RM) sos/*.o sos/*~                      044         $(RM) sos/*.o sos/*~
081         $(RM) support/*~                          045         $(RM) support/*~
082         $(RM) extra/*~                            046         $(RM) extra/*~
083         $(MAKE) -C userland clean              << 
                                                      

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