Changeset 83b64a59 in mainline for uspace/Makefile.common
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.