Changeset 41f7564 in mainline for kernel/Makefile


Ignore:
Timestamp:
2006-07-17T00:53:53Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
231fcb2
Parents:
41c4444
Message:

cleanup and unify the build system

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    r41c4444 r41f7564  
    2727#
    2828
    29 ## Kernel release
    30 #
    31 
    32 VERSION = 0
    33 PATCHLEVEL = 2
    34 SUBLEVEL = 0
    35 EXTRAVERSION = 2
    36 NAME = Daylight
    37 ifdef EXTRAVERSION
    38 RELEASE = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL).$(EXTRAVERSION)
    39 else
    40 RELEASE = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)
    41 endif
    4229
    4330## Include configuration
    4431#
    4532
     33-include ../version
    4634-include Makefile.config
    4735
     
    5038
    5139DEFS = -D$(ARCH) -DARCH=\"$(ARCH)\" -DRELEASE=\"$(RELEASE)\" "-DNAME=\"$(NAME)\"" -DKERNEL
    52 CFLAGS = -fno-builtin -fomit-frame-pointer -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -nostdlib -nostdinc -Igeneric/include/ 
     40CFLAGS = -fno-builtin -fomit-frame-pointer -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -nostdlib -nostdinc -Igeneric/include/
    5341LFLAGS = -M
    5442AFLAGS =
     
    7159        DEFS += -DCONFIG_DEBUG
    7260endif
     61
    7362ifeq ($(CONFIG_DEBUG_SPINLOCK),y)
    7463        DEFS += -DCONFIG_DEBUG_SPINLOCK
    7564endif
     65
    7666ifeq ($(CONFIG_DEBUG_AS_WATCHPOINT),y)
    7767        DEFS += -DCONFIG_DEBUG_AS_WATCHPOINT
    7868endif
     69
    7970ifeq ($(CONFIG_FPU_LAZY),y)
    8071        DEFS += -DCONFIG_FPU_LAZY
    8172endif
     73
    8274ifeq ($(CONFIG_DEBUG_ALLREGS),y)
    8375        DEFS += -DCONFIG_DEBUG_ALLREGS
    8476endif
     77
    8578ifeq ($(CONFIG_VHPT),y)
    8679        DEFS += -DCONFIG_VHPT
    8780endif
     81
    8882ifeq ($(CONFIG_POWEROFF),y)
    8983        DEFS += -DCONFIG_POWEROFF
    9084endif
     85
    9186ifeq ($(CONFIG_FB),y)
    92 ifeq ($(ARCH),ia32)
    93         DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
    94         DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
    95         DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
    96 endif
    97 ifeq ($(ARCH),amd64)
    98         DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
    99         DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
    100         DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
    101 endif
    102 ifeq ($(ARCH),xen32)
    103         DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
    104         DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
    105         DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
    106 endif
     87        ifeq ($(ARCH),ia32)
     88                DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
     89                DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
     90                DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
     91        endif
     92       
     93        ifeq ($(ARCH),amd64)
     94                DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
     95                DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
     96                DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
     97        endif
     98       
     99        ifeq ($(ARCH),xen32)
     100                DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
     101                DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
     102                DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
     103        endif
    107104endif
    108105
     
    205202
    206203all:
    207         tools/config.py default $(NARCH)
    208 ifdef NARCH
    209  ifneq ($(ARCH), $(NARCH))
    210         $(MAKE) -C . clean
    211  endif
    212 endif
     204        ../tools/config.py kernel.config default $(ARCH) $(COMPILER) $(CONFIG_DEBUG) $(MACHINE)
    213205        $(MAKE) -C . build
    214206
     
    217209config:
    218210        -rm Makefile.depend
    219         tools/config.py
     211        tools/config.py kernel.config
    220212
    221213-include Makefile.depend
     
    227219        -rm -f kernel.bin kernel.raw kernel.map kernel.map.pre kernel.objdump kernel.disasm generic/src/debug/real_map.bin Makefile.depend* generic/include/arch generic/include/genarch arch/$(ARCH)/_link.ld
    228220        find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.o' -follow -exec rm \{\} \;
    229         for arch in arch/*; do \
    230             [ -e $$arch/_link.ld ] && rm $$arch/_link.ld 2>/dev/null;\
    231         done;exit 0
     221        for arch in arch/* ; do \
     222            [ -e $$arch/_link.ld ] && rm $$arch/_link.ld 2>/dev/null ; \
     223        done ; exit 0
    232224
    233225archlinks:
Note: See TracChangeset for help on using the changeset viewer.