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


001 ## Copyright (C) 2004,2005  The SOS Team          001 ## Copyright (C) 2004,2005  The SOS Team
002 ##                                                002 ##
003 ## This program is free software; you can redi    003 ## This program is free software; you can redistribute it and/or
004 ## modify it under the terms of the GNU Genera    004 ## modify it under the terms of the GNU General Public License
005 ## as published by the Free Software Foundatio    005 ## as published by the Free Software Foundation; either version 2
006 ## of the License, or (at your option) any lat    006 ## of the License, or (at your option) any later version.
007 ##                                                007 ## 
008 ## This program is distributed in the hope tha    008 ## This program is distributed in the hope that it will be useful,
009 ## but WITHOUT ANY WARRANTY; without even the     009 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
010 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR    010 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
011 ## GNU General Public License for more details    011 ## GNU General Public License for more details.
012 ##                                                012 ## 
013 ## You should have received a copy of the GNU     013 ## You should have received a copy of the GNU General Public License
014 ## along with this program; if not, write to t    014 ## along with this program; if not, write to the Free Software
015 ## Foundation, Inc., 59 Temple Place - Suite 3    015 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
016 ## USA.                                           016 ## USA. 
017                                                   017 
018 CC=gcc                                            018 CC=gcc
019 LD=ld                                             019 LD=ld
020 CP=cp                                          !! 020 CFLAGS  = -Wall -nostdinc -ffreestanding -DKERNEL_SOS
021 STRIP=strip                                    << 
022 CFLAGS  = -Wall -nostdinc -ffreestanding -DKER << 
023 LIBGCC  = $(shell $(CC) -print-libgcc-file-nam << 
024 LDFLAGS = --warn-common -nostdlib                 021 LDFLAGS = --warn-common -nostdlib
025 OBJECTS = bootstrap/multiboot.o                !! 022 OBJECTS = bootstrap/multiboot.o                                 \
026           hwcore/idt.o hwcore/gdt.o            !! 023           hwcore/idt.o hwcore/gdt.o                             \
027           hwcore/swintr.o hwcore/swintr_wrappe !! 024           hwcore/exception.o hwcore/exception_wrappers.o        \
028           hwcore/exception.o hwcore/exception_ !! 025           hwcore/irq.o hwcore/irq_wrappers.o hwcore/i8259.o     \
029           hwcore/irq.o hwcore/irq_wrappers.o h !! 026           hwcore/paging.o                                       \
030           hwcore/paging.o hwcore/i8254.o       !! 027           hwcore/i8254.o drivers/x86_videomem.o drivers/bochs.o \
031           hwcore/cpu_context.o hwcore/cpu_cont !! 028           hwcore/cpu_context.o hwcore/cpu_context_switch.o      \
032           hwcore/mm_context.o                  !! 029           sos/kmem_vmm.o sos/kmem_slab.o sos/kmalloc.o          \
033           sos/kmem_vmm.o sos/kmem_slab.o sos/k !! 030           sos/physmem.o sos/klibc.o                             \
034           sos/physmem.o sos/klibc.o            !! 031           sos/thread.o sos/kwaitq.o                             \
035           sos/thread.o sos/kwaitq.o            !! 032           sos/time.o sos/sched.o sos/ksynch.o                   \
036           sos/time.o sos/sched.o sos/ksynch.o  !! 033           sos/assert.o sos/main.o sos/mouse_sim.o
037           sos/process.o sos/syscall.o          << 
038           sos/assert.o sos/main.o sos/mouse_si << 
039           sos/uaccess.o sos/calcload.o         << 
040           sos/umem_vmm.o sos/binfmt_elf32.o    << 
041           drivers/x86_videomem.o drivers/bochs << 
042           drivers/zero.o drivers/mem.o         << 
043           drivers/ide.o drivers/kbd.o drivers/ << 
044           drivers/serial.o drivers/tty.o drive << 
045           drivers/console.o                    << 
046           sos/hash.o sos/fs.o sos/fs_nscache.o << 
047           drivers/fs_virtfs.o sos/chardev.o so << 
048           sos/blkcache.o sos/fs_pagecache.o    << 
049           userland/userprogs.kimg              << 
050                                                   034 
051 KERNEL_OBJ   = sos.elf                            035 KERNEL_OBJ   = sos.elf
052 KERNEL_LOAD  = sos.gz                          << 
053 MULTIBOOT_IMAGE = fd.img                          036 MULTIBOOT_IMAGE = fd.img
054 PWD := $(shell pwd | sed 's/"/\\\"/g;s/\$$/\\\ !! 037 PWD := $(shell pwd)
055                                                   038 
056 # Main target                                     039 # Main target
057 all: $(MULTIBOOT_IMAGE)                           040 all: $(MULTIBOOT_IMAGE)
058                                                   041 
059 $(MULTIBOOT_IMAGE): $(KERNEL_LOAD)             !! 042 $(MULTIBOOT_IMAGE): $(KERNEL_OBJ)
060         ./support/build_image.sh $@ $<            043         ./support/build_image.sh $@ $<
061                                                   044 
062 $(KERNEL_LOAD): $(KERNEL_OBJ)                  << 
063         $(CP) $< $<.strip && $(STRIP) -sx -R . << 
064         gzip < $<.strip > $@                   << 
065                                                << 
066 $(KERNEL_OBJ): $(OBJECTS) ./support/sos.lds       045 $(KERNEL_OBJ): $(OBJECTS) ./support/sos.lds
067         $(LD) $(LDFLAGS) -T ./support/sos.lds  !! 046         $(LD) $(LDFLAGS) -T ./support/sos.lds -o $@ $(OBJECTS)
068         -nm -C $@ | cut -d ' ' -f 1,3 > sos.ma    047         -nm -C $@ | cut -d ' ' -f 1,3 > sos.map
069         size $@                                   048         size $@
070                                                   049 
071 -include .mkvars                                  050 -include .mkvars
072                                                   051 
073 # Create the userland programs to include in t << 
074 userland/userprogs.kimg: FORCE                 << 
075         $(MAKE) -C userland                    << 
076                                                << 
077 # Create objects from C source code               052 # Create objects from C source code
078 %.o: %.c                                          053 %.o: %.c
079         $(CC) "-I$(PWD)" -c "$<" $(CFLAGS) -o  !! 054         $(CC) -I$(PWD) -c $< $(CFLAGS) -o $@
080                                                   055 
081 # Create objects from assembler (.S) source co    056 # Create objects from assembler (.S) source code
082 %.o: %.S                                          057 %.o: %.S
083         $(CC) "-I$(PWD)" -c "$<" $(CFLAGS) -DA !! 058         $(CC) -I$(PWD) -c $< $(CFLAGS) -DASM_SOURCE=1 -o $@
084                                                   059 
085 FORCE:                                            060 FORCE:
086         @                                         061         @
087                                                   062 
088 # Clean directory                                 063 # Clean directory
089 clean:                                            064 clean:
090         $(RM) fd*.img *.o mtoolsrc *~ menu.txt !! 065         $(RM) *.img *.o mtoolsrc *~ menu.txt *.img *.elf *.bin *.map
091         $(RM) *.log *.out bochs* sos.gz        !! 066         $(RM) *.log *.out bochs*
092         $(RM) bootstrap/*.o bootstrap/*~          067         $(RM) bootstrap/*.o bootstrap/*~
093         $(RM) drivers/*.o drivers/*~              068         $(RM) drivers/*.o drivers/*~
094         $(RM) hwcore/*.o hwcore/*~                069         $(RM) hwcore/*.o hwcore/*~
095         $(RM) sos/*.o sos/*~                      070         $(RM) sos/*.o sos/*~
096         $(RM) support/*~                          071         $(RM) support/*~
097         $(RM) extra/*~                            072         $(RM) extra/*~
098         $(MAKE) -C extra clean                 << 
099         $(MAKE) -C userland clean              << 
                                                      

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