rust/mk/stage0.mk
Brian Anderson 0148daa058 Reorganize structure of build directory
Each stage is organized more according to Unix standards and to
accommodate multiple target architectures.

stageN/
  bin - rustc lives here
  lib - libraries that rustc needs
  lib/rustc/$(target_triple/ - target libraries
2011-09-29 22:58:33 -07:00

32 lines
1.0 KiB
Makefile

# FIXME: temporary hack: stdlib and rustrt come in the lib/ directory,
# but we want them in the base directory, so we move them out.
stage0/bin/rustc$(X): $(S)src/snapshots.txt $(S)src/etc/get-snapshot.py $(MKFILES)
@$(call E, fetch: $@)
$(Q)$(S)src/etc/get-snapshot.py
$(Q)cp stage0/rustc$(X) stage0/bin/rustc$(X)
$(Q)cp stage0/$(CFG_RUNTIME) stage0/lib/$(CFG_RUNTIME)
$(Q)cp stage0/$(CFG_RUSTLLVM) stage0/lib/$(CFG_RUSTLLVM)
$(Q)mkdir -p stage0/bin/lib
$(Q)cp stage0/lib/intrinsics.bc stage0/bin/lib/intrinsics.bc
$(Q)cp stage0/lib/glue.o stage0/bin/lib/glue.o
$(Q)cp stage0/lib/main.o stage0/bin/lib/main.o
$(Q)touch $@
# Host libs will be made in the process of making rustc above.
stage0/lib/$(CFG_RUNTIME): stage0/bin/rustc$(X)
$(Q)touch $@
stage0/lib/$(CFG_STDLIB): stage0/bin/rustc$(X)
$(Q)touch $@
stage0/lib/$(CFG_RUSTLLVM): stage0/bin/rustc$(X)
$(Q)touch $@
# Instantiate template (in stageN.mk) for building
# target libraries.
SREQpre = stage0/lib/$(CFG_HOST_TRIPLE)/main.o $(MKFILES)
$(eval $(call TARGET_LIBS,pre,0,$(CFG_HOST_TRIPLE)))