Changes in uspace/Makefile [dfeb4e2:57914494] in mainline
- File:
-
- 1 edited
-
uspace/Makefile (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/Makefile
rdfeb4e2 r57914494 255 255 CLEANS := $(addsuffix .clean,$(DIRS) $(LIBS) $(BASE_LIBS)) 256 256 257 PORTS_BUILD_DIR := ../build/ports 258 PORT_CFLAGS := \ 259 -specs $(abspath lib/posix/gcc.specs) \ 260 -isystem $(abspath $(PORTS_BUILD_DIR)/include) \ 261 -isystem $(abspath $(PORTS_BUILD_DIR)/include/posix) \ 262 -isystem $(abspath $(PORTS_BUILD_DIR)/include/libc) \ 263 -L$(abspath $(PORTS_BUILD_DIR)/lib) \ 264 -Wl,-T,link.ld \ 265 -Wl,--whole-archive,-lc,-lmath,--no-whole-archive 266 267 .PHONY: all $(BASE_BUILDS) $(BUILDS) $(BUILDS_TESTS) $(CLEANS) clean ports_cache 257 .PHONY: all $(BASE_BUILDS) $(BUILDS) $(BUILDS_TESTS) $(CLEANS) clean 268 258 269 259 all: $(BUILDS) $(BUILDS_TESTS) 270 271 ports_cache: lib/posix.build lib/math.build lib/clui.build272 git submodule update --init -- ports273 274 # Copy libs275 mkdir -p $(PORTS_BUILD_DIR)/lib276 cp lib/posix/link.ld $(PORTS_BUILD_DIR)/lib/link.ld277 cp lib/posix/libc.a $(PORTS_BUILD_DIR)/lib/libc.a278 # We don't currently build a dedicated debug-enabled libc version.279 cp lib/posix/libc.a $(PORTS_BUILD_DIR)/lib/libg.a280 cp lib/math/libmath.a $(PORTS_BUILD_DIR)/lib/libmath.a281 cp lib/clui/libclui.a $(PORTS_BUILD_DIR)/lib/libclui.a282 283 # Copy headers284 mkdir -p $(PORTS_BUILD_DIR)/include285 cp -L -R lib/posix/include/posix/ $(PORTS_BUILD_DIR)/include/286 mkdir -p $(PORTS_BUILD_DIR)/include/libc287 cp -L -R lib/c/include/* $(PORTS_BUILD_DIR)/include/libc288 cp -L -R lib/c/arch/$(UARCH)/include/libarch $(PORTS_BUILD_DIR)/include/289 cp -L -R lib/math/include/* $(PORTS_BUILD_DIR)/include/libc290 cp -L -R lib/math/arch/$(UARCH)/include/libarch/ $(PORTS_BUILD_DIR)/include/291 cp -L -R ../abi/include/* $(PORTS_BUILD_DIR)/include/292 ln -s -f -n libc $(PORTS_BUILD_DIR)/include/libmath293 294 # FIXME: Just for temporary compatibility.295 touch $(PORTS_BUILD_DIR)/coastline.specs296 297 mkdir -p $(PORTS_BUILD_DIR)/include/libclui298 cp -L lib/clui/tinput.h $(PORTS_BUILD_DIR)/include/libclui/299 300 # TODO: Get rid of this.301 find $(PORTS_BUILD_DIR)/include/libc $(PORTS_BUILD_DIR)/include/libarch -name '*.h' -exec sed \302 -e 's:#include <:#include <libc/:' \303 -e 's:#include <libc/libarch/:#include <libarch/:' \304 -e 's:#include <libc/abi/:#include <abi/:' \305 -e 's:#include <libc/_bits/:#include <_bits/:' \306 -e 's:#include <libc/libc/:#include <libc/:' \307 -i {} \;308 309 mkdir -p overlay310 311 ports-all: ports_cache312 for x in ports/*; do if [ -d "$$x" ]; then $(MAKE) ports-install-`basename $$x` || exit 1; fi; done313 314 ports-%: ports_cache315 $(MAKE) $(@:ports-%=ports-install-%)316 317 # This is a separate target to avoid running ports_cache multiple times.318 ports-install-%:319 PATH="$(CROSS_PREFIX)/$(TARGET)/bin:$$PATH" \320 HSCT_HELENOS_ROOT="$(abspath ..)" \321 HSCT_HOME="$(abspath ports)" \322 HSCT_HSCT="$(abspath ../tools/hsct.sh)" \323 HSCT_SOURCES_DIR="$(abspath $(PORTS_BUILD_DIR)/sources)" \324 HSCT_BUILD_DIR="$(abspath $(PORTS_BUILD_DIR)/build)" \325 HSCT_INCLUDE_DIR="$(abspath $(PORTS_BUILD_DIR)/include)" \326 HSCT_LIB_DIR="$(abspath $(PORTS_BUILD_DIR)/lib)" \327 HSCT_CACHE_DIR="$(abspath $(PORTS_BUILD_DIR))" \328 HSCT_CACHE_LIB="$(abspath $(PORTS_BUILD_DIR)/lib)" \329 HSCT_DIST_DIR="$(abspath $(PORTS_BUILD_DIR)/dist)" \330 HSCT_ARCHIVE_DIR="$(abspath $(PORTS_BUILD_DIR)/archives)" \331 HSCT_PARALLELISM="$(JOBS)" \332 HSCT_GNU_TARGET="$(TARGET)" \333 HSCT_CC="$(CC) $(PORT_CFLAGS)" \334 HSCT_CFLAGS="" \335 HSCT_LDFLAGS_FOR_CC="" \336 HSCT_LD="$(LD)" \337 HSCT_AR="$(AR)" \338 HSCT_RANLIB="$(RANLIB)" \339 HSCT_OBJDUMP="$(OBJDUMP)" \340 HSCT_OBJCOPY="$(OBJCOPY)" \341 HSCT_AS="$(AS)" \342 HSCT_STRIP="$(STRIP)" \343 ../tools/hsct.sh install $(@:ports-install-%=%)344 260 345 261 $(BUILDS_TESTS): $(BASE_BUILDS) $(BUILDS)
Note:
See TracChangeset
for help on using the changeset viewer.
