Changeset e160bfe8 in mainline for kernel/Makefile


Ignore:
Timestamp:
2017-10-23T18:51:34Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
327f147
Parents:
31cca4f3 (diff), 367db39a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline (again) to fix build

Perhaps it wasn't so good idea to start merging mainline in these unstable times :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    r31cca4f3 re160bfe8  
    4949
    5050AGDEPEND = Makefile.ag.depend
    51 DEPEND = Makefile.depend
    52 DEPEND_PREV = $(DEPEND).prev
    5351RAW = kernel.raw
    5452BIN = kernel.bin
     
    6765SIZEOK_MAP = generic/src/debug/sizeok_map.o
    6866
    69 .PHONY: all clean autogen_clean
     67.PHONY: all clean autogen_clean depend
    7068
    7169all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(BIN) $(DISASM)
    72         -[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV)
    7370
    7471clean: autogen_clean
    75         rm -f $(DEPEND) $(DEPEND_PREV) $(RAW) $(BIN) $(MAP) $(JOB) $(MAP_PREV) $(DISASM) $(DUMP) $(REAL_MAP).* arch/*/_link.ld arch/*/include/arch/common.h
     72        rm -f $(RAW) $(BIN) $(MAP) $(JOB) $(MAP_PREV) $(DISASM) $(DUMP) $(REAL_MAP).* arch/*/_link.ld arch/*/include/arch/common.h
    7673        find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.o' -follow -exec rm '{}' \;
     74        find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.d' -follow -exec rm '{}' \;
    7775
    7876## Common compiler flags
     
    129127-include arch/$(KARCH)/Makefile.inc
    130128-include genarch/Makefile.inc
    131 -include $(DEPEND)
    132129-include $(AGDEPEND)
    133130
     
    152149#
    153150
    154 ifeq ($(COMPILER),gcc_native)
    155         CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS)
    156         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    157         INSTRUMENTATION = -finstrument-functions
    158 endif
    159 
    160 ifeq ($(COMPILER),gcc_cross)
    161         CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS)
    162         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    163         INSTRUMENTATION = -finstrument-functions
    164 endif
    165 
    166 ifeq ($(COMPILER),gcc_helenos)
    167         CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS)
    168         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    169         INSTRUMENTATION = -finstrument-functions
    170 endif
    171 
    172151ifeq ($(COMPILER),clang)
    173152        CFLAGS = $(COMMON_CFLAGS) $(CLANG_CFLAGS)
    174         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    175         INSTRUMENTATION = -finstrument-functions
    176 endif
    177 
     153else
     154        CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS)
     155endif
     156
     157INSTRUMENTATION = -finstrument-functions
    178158
    179159## Generic kernel sources
     
    364344GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES)))
    365345
     346GENERIC_DEPENDS := $(addsuffix .d,$(basename $(GENERIC_SOURCES)))
     347ARCH_DEPENDS := $(addsuffix .d,$(basename $(ARCH_SOURCES)))
     348GENARCH_DEPENDS := $(addsuffix .d,$(basename $(GENARCH_SOURCES)))
     349
    366350GENARCH_AUTOGENS_H := $(addsuffix .h,$(basename $(GENARCH_AUTOGENS_AG)))
    367351GENARCH_AUTOGENS_PROBE_C := $(addsuffix .ag.probe.c,$(basename $(GENARCH_AUTOGENS_AG)))
     
    378362LD_CFLAGS := $(addprefix -Xlinker ,$(LFLAGS))
    379363
     364-include $(GENERIC_DEPENDS)
     365-include $(ARCH_DEPENDS)
     366-include $(GENARCH_DEPENDS)
     367
    380368ifeq ($(COMPILER),clang)
    381369        AS_CFLAGS += -mllvm -asm-macro-max-nesting-depth=1000
     
    408396endif
    409397
    410 $(LINK): $(LINK).in $(DEPEND)
     398$(LINK): $(LINK).in | depend
    411399        $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@
    412400
     
    416404        $(AUTOGEN) generate $< <$<.probe.s >$@   
    417405
    418 %.o: %.S $(DEPEND)
    419         $(CC) $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $<
     406%.o: %.S | depend
     407        $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $<
    420408ifeq ($(PRECHECK),y)
    421409        $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__
    422410endif
    423411
    424 %.o: %.s $(DEPEND)
    425         $(CC) $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $<
     412%.o: %.s | depend
     413        $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $<
    426414ifeq ($(PRECHECK),y)
    427415        $(JOBFILE) $(JOB) $< $@ as asm $(DEFS) $(CFLAGS) $(EXTRA_FLAGS)
    428416endif
    429417
    430 %.o: %.c $(DEPEND)
    431         $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) $(if $(findstring $<,$(INSTRUMENTED_SOURCES)),$(INSTRUMENTATION)) -c -o $@ $<
     418%.o: %.c | depend
     419        $(CC) -MD $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) $(if $(findstring $<,$(INSTRUMENTED_SOURCES)),$(INSTRUMENTATION)) -c -o $@ $<
    432420ifeq ($(PRECHECK),y)
    433421        $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS)
     
    470458        done
    471459
    472 $(DEPEND): $(COMMON_HEADER_ARCH) $(AUTOGENS_H)
    473         makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > $@ 2> /dev/null
    474         -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
     460depend: $(COMMON_HEADER_ARCH) $(AUTOGENS_H)
    475461
    476462$(COMMON_HEADER_ARCH): $(COMMON_HEADER)
Note: See TracChangeset for help on using the changeset viewer.