Changeset 4f674d7 in mainline


Ignore:
Timestamp:
2017-11-08T23:50:54Z (6 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
25b853c
Parents:
7b884e55
Message:

Build uspace modules in correct dependency order (including dependencies
between libraries).

Location:
uspace
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/Makefile

    r7b884e55 r4f674d7  
    202202#
    203203
    204 LIBC = lib/c
     204BASE_LIBS = \
     205        lib/c \
     206        lib/softint \
     207        lib/softfloat
     208
    205209LIBS = \
    206210        lib/fs \
     
    213217        lib/scsi \
    214218        lib/compress \
    215         lib/softint \
    216         lib/softfloat \
    217219        lib/drv \
    218220        lib/graph \
     
    241243        lib/ieee80211
    242244
    243 LIBC_BUILD = $(addsuffix .build,$(LIBC))
    244 LIBS_BUILD = $(addsuffix .build,$(LIBS))
    245 BUILDS := $(addsuffix .build,$(DIRS))
    246 BUILDS_TESTS := $(addsuffix .build-test,$(DIRS) $(LIBS) lib/c)
    247 
    248 CLEANS := $(addsuffix .clean,$(DIRS)) $(addsuffix .clean,$(LIBS)) $(addsuffix .clean,$(LIBC))
    249 
    250 .PHONY: all $(LIBC_BUILD) $(LIBS_BUILD) $(BUILDS) $(CLEANS) clean
     245BASE_BUILDS := $(addsuffix .build,$(BASE_LIBS))
     246BUILDS := $(addsuffix .build,$(DIRS) $(LIBS))
     247BUILDS_TESTS := $(addsuffix .build-test,$(DIRS) $(LIBS) $(BASE_LIBS))
     248DEPS = $(addsuffix /deps.mk,$(DIRS) $(LIBS))
     249CLEANS := $(addsuffix .clean,$(DIRS) $(LIBS) $(BASE_LIBS))
     250
     251.PHONY: all $(BASE_BUILDS) $(BUILDS) $(BUILDS_TESTS) $(CLEANS) clean
    251252
    252253all: $(BUILDS) $(BUILDS_TESTS)
    253254
    254 $(BUILDS_TESTS): $(LIBC_BUILD) $(LIBS_BUILD)
     255$(BUILDS_TESTS): $(BASE_BUILDS) $(BUILDS)
    255256        $(MAKE) -r -C $(basename $@) all-test PRECHECK=$(PRECHECK)
    256257
     
    264265        -$(MAKE) -r -C $(basename $@) clean
    265266
    266 $(BUILDS): $(LIBC_BUILD) $(LIBS_BUILD)
     267$(BASE_BUILDS) $(BUILDS):
    267268        $(MAKE) -r -C $(basename $@) all PRECHECK=$(PRECHECK)
    268269
    269 $(LIBS_BUILD): $(LIBC_BUILD)
    270         $(MAKE) -r -C $(basename $@) all PRECHECK=$(PRECHECK)
    271 
    272 $(LIBC_BUILD):
    273         $(MAKE) -r -C $(basename $@) all PRECHECK=$(PRECHECK)
     270$(DEPS): %/deps.mk: %/Makefile
     271        $(MAKE) -r -C $(@D) deps.mk SELF_TARGET="$(@D).build"
     272
     273# Special case for base libraries.
     274lib/c.build: lib/softfloat.build lib/softint.build
     275
     276$(BUILDS): $(BASE_BUILDS)
     277
     278-include $(DEPS)
     279
  • uspace/Makefile.common

    r7b884e55 r4f674d7  
    264264        touch tag
    265265
     266# Generate inter-module make dependencies.
     267# This is needed to ensure correct build order of libraries and code depending on them.
     268deps.mk: Makefile
     269        echo > $@.new
     270        for lib in $(LIBS); do \
     271                echo "$(SELF_TARGET): lib/$$lib.build" >> $@.new; \
     272        done
     273        mv -f $@.new $@
     274
    266275%.disasm: %
    267276ifeq ($(CONFIG_LINE_DEBUG),y)
Note: See TracChangeset for help on using the changeset viewer.