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

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