Changeset 83b64a59 in mainline
- Timestamp:
- 2019-06-05T16:03:03Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b401b33
- Parents:
- 58168e0
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/Makefile
r58168e0 r83b64a59 223 223 # 224 224 225 BASE_LIBS = \ 226 lib/c \ 227 lib/cpp 228 229 LIBS = \ 225 DIRS += \ 230 226 lib/fs \ 231 227 lib/block \ 228 lib/c \ 229 lib/cpp \ 232 230 lib/crypto \ 233 231 lib/clui \ … … 266 264 lib/virtio 267 265 268 BASE_BUILDS := $(addsuffix .build,$(BASE_LIBS)) 269 BUILDS := $(addsuffix .build,$(DIRS) $(LIBS)) 270 BUILDS_TESTS := $(addsuffix .build-test,$(DIRS) $(LIBS) $(BASE_LIBS)) 271 DEPS = $(addsuffix /deps.mk,$(DIRS) $(LIBS)) 272 CLEANS := $(addsuffix .clean,$(DIRS) $(LIBS) $(BASE_LIBS)) 273 274 .PHONY: all $(BASE_BUILDS) $(BUILDS) $(BUILDS_TESTS) $(CLEANS) clean export 266 BUILDS := $(addsuffix .build,$(DIRS)) 267 BUILDS_TESTS := $(addsuffix .build-test,$(DIRS)) 268 DEPS = $(addsuffix /deps.mk,$(DIRS)) 269 CLEANS := $(addsuffix .clean,$(DIRS)) 270 271 .PHONY: all $(BUILDS) $(BUILDS_TESTS) $(CLEANS) clean export 275 272 276 273 all: $(BUILDS) $(BUILDS_TESTS) 277 274 278 $(BUILDS_TESTS): $(B ASE_BUILDS) $(BUILDS)275 $(BUILDS_TESTS): $(BUILDS) 279 276 $(MAKE) -r -C $(basename $@) all-test PRECHECK=$(PRECHECK) 280 277 … … 292 289 -$(MAKE) -r -C $(basename $@) fasterclean 293 290 294 $(B ASE_BUILDS) $(BUILDS):291 $(BUILDS): 295 292 $(MAKE) -r -C $(basename $@) all PRECHECK=$(PRECHECK) 296 293 … … 298 295 $(MAKE) -r -C $(@D) deps.mk SELF_TARGET="$(@D).build" 299 296 300 $(BUILDS): $(BASE_BUILDS)301 302 297 -include $(DEPS) -
uspace/Makefile.common
r58168e0 r83b64a59 46 46 # STATIC_NEEDED set to 'y' for init binaries, will build statically 47 47 # linked version 48 # STATIC_ONLY set to 'y' if binary cannot be linked dynamically49 # (e.g. uses thread-local variables)50 48 # 51 49 # Optionally, for a library: … … 114 112 LDFLAGS = -Wl,--fatal-warnings,--warn-common 115 113 114 STATIC_BUILD = n 115 116 116 ifeq ($(STATIC_NEEDED),y) 117 117 STATIC_BUILD = y 118 else 119 ifeq ($(STATIC_ONLY),y) 118 endif 119 120 ifneq ($(CONFIG_BUILD_SHARED_LIBS),y) 121 STATIC_BUILD = y 122 endif 123 124 ifneq ($(CONFIG_USE_SHARED_LIBS),y) 125 ifeq ($(LIBRARY),) 120 126 STATIC_BUILD = y 121 else122 ifeq ($(CONFIG_BUILD_SHARED_LIBS),y)123 ifeq ($(CONFIG_USE_SHARED_LIBS),y)124 STATIC_BUILD = n125 else126 ifeq ($(LIBRARY),)127 STATIC_BUILD = y128 else129 STATIC_BUILD = n130 endif131 endif132 else133 STATIC_BUILD = y134 endif135 127 endif 136 128 endif 137 129 138 if neq ($(STATIC_BUILD),y)139 L INK_DYNAMIC = y130 ifeq ($(STATIC_BUILD),y) 131 LDFLAGS += -static 140 132 endif 141 133 … … 152 144 BASE_LIBS += -lgcc 153 145 154 ifneq ($(LINK_DYNAMIC),y)155 LDFLAGS += -static156 endif157 158 146 INCLUDES_FLAGS = $(LIBC_INCLUDES_FLAGS) 159 147 … … 164 152 INCLUDES_FLAGS += $(foreach lib,$(LIBS), -I$(LIB_PREFIX)/$(lib) -I$(LIB_PREFIX)/$(lib)/include) 165 153 166 # TODO: get rid of this special case 167 ifneq ($(filter math, $(LIBS)),) 168 INCLUDES_FLAGS += $(LIBMATH_INCLUDES_FLAGS) 154 DEPLIBS := $(LIBS) 155 156 ifneq ($(filter %.cpp %.cc %.cxx, $(SOURCES)),) 157 ifneq ($(LIBRARY),libcpp) 158 DEPLIBS += cpp 159 endif 160 endif 161 162 ifneq ($(LIBRARY),libc) 163 DEPLIBS += c 169 164 endif 170 165 … … 305 300 DEPENDS := $(addsuffix .d,$(basename $(SOURCES))) $(addsuffix .test.d,$(basename $(TEST_SOURCES))) 306 301 307 LIBTAGS := $(foreach lib,$( LIBS), $(USPACE_PREFIX)/lib/$(lib)/tag)302 LIBTAGS := $(foreach lib,$(DEPLIBS), $(USPACE_PREFIX)/lib/$(lib)/tag) 308 303 LIBARGS := $(addprefix -L$(USPACE_PREFIX)/lib/, $(LIBS)) $(addprefix -l, $(LIBS)) 309 310 ifneq ($(LIBRARY),libc)311 LIBTAGS := $(LIBC_PREFIX)/tag $(LIBTAGS)312 endif313 304 314 305 .PHONY: all all-test clean fasterclean depend … … 339 330 deps.mk: Makefile 340 331 echo > $@.new 341 for lib in $( LIBS); do \332 for lib in $(DEPLIBS); do \ 342 333 echo "$(SELF_TARGET): lib/$$lib.build" >> $@.new; \ 343 334 done -
uspace/srv/loader/Makefile
r58168e0 r83b64a59 46 46 47 47 BINARY = loader 48 STATIC_ ONLY= y48 STATIC_NEEDED = y 49 49 50 50 GENERIC_SOURCES = \
Note:
See TracChangeset
for help on using the changeset viewer.