Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 4761f54 in mainline for boot/Makefile.build


Ignore:
Timestamp:
2017-10-21T04:41:07Z (4 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master
Children:
9c14309
Parents:
feab36ae
Message:

Get rid of makedepend.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile.build

    rfeab36ae r4761f54  
    2727#
    2828
    29 .PHONY: all clean
     29.PHONY: all clean depend
    3030
    3131include Makefile.common
     
    6464endif
    6565
    66 ifeq ($(COMPILER),gcc_native)
    67         CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS) $(EXTRA_CFLAGS)
    68         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    69 endif
    70 
    71 ifeq ($(COMPILER),gcc_cross)
    72         CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS) $(EXTRA_CFLAGS)
    73         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    74 endif
    75 
    76 ifeq ($(COMPILER),gcc_helenos)
    77         CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS) $(EXTRA_CFLAGS)
    78         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    79 endif
    80 
    8166ifeq ($(COMPILER),clang)
    8267        CFLAGS = $(COMMON_CFLAGS) $(CLANG_CFLAGS) $(EXTRA_CFLAGS)
    83         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
     68else
     69        CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS) $(EXTRA_CFLAGS)
    8470endif
    8571
    8672OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
     73DEPENDS := $(addsuffix .d,$(basename $(SOURCES)))
    8774
    8875all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(BOOT_OUTPUT)
    89         -[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV)
    9076
    9177clean:
    9278        rm -f $(RAW) $(MAP) $(ARCH_INCLUDE) $(GENARCH_INCLUDE)
    9379
    94 ifneq ($(MAKECMDGOALS),clean)
    95 -include $(DEPEND)
    96 endif
     80-include $(DEPENDS)
    9781
    9882AS_CFLAGS := $(addprefix -Xassembler ,$(AFLAGS))
     
    10488        $(LD) -n $(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@ $(OBJECTS)
    10589
    106 $(LINK): $(DEPEND)
     90$(LINK): | depend
    10791        $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $(LINK).in | grep -v "^\#" > $(LINK)
    10892
    109 %.o: %.S $(DEPEND)
    110         $(CC) $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
     93%.o: %.S | depend
     94        $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
    11195ifeq ($(PRECHECK),y)
    11296        $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__
    11397endif
    11498
    115 %.o: %.c $(DEPEND)
    116         $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
     99%.o: %.c | depend
     100        $(CC) -MD $(DEFS) $(CFLAGS) -c $< -o $@
    117101ifeq ($(PRECHECK),y)
    118102        $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
    119103endif
    120104
    121 %.o: %.s $(DEPEND)
    122         $(CC) $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
     105%.o: %.s | depend
     106        $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@
    123107ifeq ($(PRECHECK),y)
    124108        $(JOBFILE) $(JOB) $< $@ as asm
    125109endif
    126110
    127 $(DEPEND): $(ARCH_INCLUDE) $(GENARCH_INCLUDE) $(COMMON_HEADER_ARCH) $(PRE_DEPEND)
    128         makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
    129         -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
     111depend: $(ARCH_INCLUDE) $(GENARCH_INCLUDE) $(COMMON_HEADER_ARCH) $(PRE_DEPEND)
    130112
    131113$(COMPS).s: $(COMPS).zip
Note: See TracChangeset for help on using the changeset viewer.