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


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

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