Changeset 839470f in mainline for Makefile


Ignore:
Timestamp:
2005-12-07T14:29:42Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
45ab770
Parents:
05e2a7ad
Message:

Clean up of build system. Use:
make config
make
make clean

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r05e2a7ad r839470f  
    4040#
    4141
    42 include Makefile.config
     42-include Makefile.config
    4343
    4444## Common compiler flags
     
    5757#
    5858
    59 include arch/$(ARCH)/Makefile.inc
    60 include genarch/Makefile.inc
     59-include arch/$(ARCH)/Makefile.inc
     60-include genarch/Makefile.inc
    6161
    6262ifeq ($(CONFIG_DEBUG),y)
     
    139139GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES)))
    140140
    141 .PHONY: all clean config depend boot
    142 
    143 all: kernel.bin boot disasm
     141.PHONY: all clean config links depend boot
     142
     143all:
     144        tools/config.py default
     145        $(MAKE) -C . real_all
     146
     147real_all: kernel.bin boot disasm
     148
     149config:
     150        tools/config.py
    144151
    145152-include Makefile.depend
     153
     154distclean: clean
     155        -rm Makefile.config
    146156
    147157clean:
    148158        -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
    149         find generic/src/ arch/$(ARCH)/src/ genarch/src/ test/ -name '*.o' -follow -exec rm \{\} \;
    150         $(MAKE) -C arch/$(ARCH)/boot clean
    151 
    152 config:
     159        find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.o' -follow -exec rm \{\} \;
     160        for arch in arch/*; do \
     161            [ -e $$arch/_link.ld ] && rm $$arch/_link.ld 2>/dev/null;\
     162            $(MAKE) -C $$arch/boot clean; \
     163        done;exit 0
     164
     165archlinks:
    153166        ln -sfn ../../arch/$(ARCH)/include/ generic/include/arch
    154167        ln -sfn ../../genarch/include/ generic/include/genarch
    155168
    156 depend: config
     169depend: archlinks
    157170        $(CC) $(DEFS) $(CFLAGS) -M $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend
    158171
Note: See TracChangeset for help on using the changeset viewer.