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


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 CP=cp                                          !! 003 LDFLAGS = --warn-common
021 STRIP=strip                                    << 
022 CFLAGS  = -Wall -nostdinc -ffreestanding -DKER << 
023 LIBGCC  = $(shell $(CC) -print-libgcc-file-nam << 
024 LDFLAGS = --warn-common -nostdlib              << 
025 OBJECTS = bootstrap/multiboot.o                   004 OBJECTS = bootstrap/multiboot.o                                 \
026           hwcore/idt.o hwcore/gdt.o               005           hwcore/idt.o hwcore/gdt.o                             \
027           hwcore/swintr.o hwcore/swintr_wrappe << 
028           hwcore/exception.o hwcore/exception_    006           hwcore/exception.o hwcore/exception_wrappers.o        \
029           hwcore/irq.o hwcore/irq_wrappers.o h    007           hwcore/irq.o hwcore/irq_wrappers.o hwcore/i8259.o     \
030           hwcore/paging.o hwcore/i8254.o       !! 008           hwcore/i8254.o drivers/x86_videomem.o drivers/bochs.o \
031           hwcore/cpu_context.o hwcore/cpu_cont !! 009           sos/physmem.o sos/klibc.o sos/main.o
032           hwcore/mm_context.o                  << 
033           sos/kmem_vmm.o sos/kmem_slab.o sos/k << 
034           sos/physmem.o sos/klibc.o            << 
035           sos/thread.o sos/kwaitq.o            << 
036           sos/time.o sos/sched.o sos/ksynch.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/kbd.o drivers/kbdmapfr.o     << 
044           drivers/tty.o drivers/serial.o drive << 
045           sos/hash.o sos/fs.o sos/fs_nscache.o << 
046           drivers/fs_virtfs.o sos/chardev.o    << 
047           userland/userprogs.kimg              << 
048                                                   010 
049 KERNEL_OBJ   = sos.elf                            011 KERNEL_OBJ   = sos.elf
050 KERNEL_LOAD  = sos.gz                          << 
051 MULTIBOOT_IMAGE = fd.img                          012 MULTIBOOT_IMAGE = fd.img
052 PWD := $(shell pwd | sed 's/"/\\\"/g;s/\$$/\\\ !! 013 PWD := $(shell pwd)
053                                                   014 
054 # Main target                                     015 # Main target
055 all: $(MULTIBOOT_IMAGE)                           016 all: $(MULTIBOOT_IMAGE)
056                                                   017 
057 $(MULTIBOOT_IMAGE): $(KERNEL_LOAD)             !! 018 $(MULTIBOOT_IMAGE): $(KERNEL_OBJ)
058         ./support/build_image.sh $@ $<            019         ./support/build_image.sh $@ $<
059                                                   020 
060 $(KERNEL_LOAD): $(KERNEL_OBJ)                  << 
061         $(CP) $< $<.strip && $(STRIP) -sx -R . << 
062         gzip < $<.strip > $@                   << 
063                                                << 
064 $(KERNEL_OBJ): $(OBJECTS) ./support/sos.lds       021 $(KERNEL_OBJ): $(OBJECTS) ./support/sos.lds
065         $(LD) $(LDFLAGS) -T ./support/sos.lds  !! 022         $(LD) $(LDFLAGS) -T ./support/sos.lds -o $@ $(OBJECTS)
066         -nm -C $@ | cut -d ' ' -f 1,3 > sos.ma    023         -nm -C $@ | cut -d ' ' -f 1,3 > sos.map
067         size $@                                << 
068                                                   024 
069 -include .mkvars                                  025 -include .mkvars
070                                                   026 
071 # Create the userland programs to include in t << 
072 userland/userprogs.kimg: FORCE                 << 
073         $(MAKE) -C userland                    << 
074                                                << 
075 # Create objects from C source code               027 # Create objects from C source code
076 %.o: %.c                                          028 %.o: %.c
077         $(CC) "-I$(PWD)" -c "$<" $(CFLAGS) -o  !! 029         $(CC) -I$(PWD) -c $< $(CFLAGS) -o $@
078                                                   030 
079 # Create objects from assembler (.S) source co    031 # Create objects from assembler (.S) source code
080 %.o: %.S                                          032 %.o: %.S
081         $(CC) "-I$(PWD)" -c "$<" $(CFLAGS) -DA !! 033         $(CC) -I$(PWD) -c $< $(CFLAGS) -DASM_SOURCE=1 -o $@
082                                                << 
083 FORCE:                                         << 
084         @                                      << 
085                                                   034 
086 # Clean directory                                 035 # Clean directory
087 clean:                                            036 clean:
088         $(RM) *.img *.o mtoolsrc *~ menu.txt * !! 037         $(RM) *.img *.o mtoolsrc *~ menu.txt *.img *.elf *.bin *.map
089         $(RM) *.log *.out bochs* sos.gz        !! 038         $(RM) *.log *.out bochs*
090         $(RM) bootstrap/*.o bootstrap/*~          039         $(RM) bootstrap/*.o bootstrap/*~
091         $(RM) drivers/*.o drivers/*~              040         $(RM) drivers/*.o drivers/*~
092         $(RM) hwcore/*.o hwcore/*~                041         $(RM) hwcore/*.o hwcore/*~
093         $(RM) sos/*.o sos/*~                      042         $(RM) sos/*.o sos/*~
094         $(RM) support/*~                          043         $(RM) support/*~
095         $(RM) extra/*~                            044         $(RM) extra/*~
096         $(MAKE) -C extra clean                 << 
097         $(MAKE) -C userland clean              << 
                                                      

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