rust/mk/stage1.mk

37 lines
1.3 KiB
Makefile
Raw Normal View History

stage1/lib/$(CFG_STDLIB): $(STDLIB_CRATE) $(STDLIB_INPUTS) \
stage1/rustc$(X) stage0/lib/$(CFG_STDLIB) stage1/intrinsics.bc \
stage1/glue.o $(LREQ) $(MKFILES)
@$(call E, compile_and_link: $@)
$(STAGE1) --lib -o $@ $<
2011-05-01 15:18:52 -05:00
2011-06-28 14:20:43 -05:00
stage1/lib/glue.o: stage1/rustc$(X) stage0/lib/$(CFG_STDLIB) \
stage1/intrinsics.bc $(LREQ) $(MKFILES)
2011-05-01 15:18:52 -05:00
@$(call E, generate: $@)
$(STAGE1) -c -o $@ --glue
2011-05-01 15:18:52 -05:00
2011-06-28 14:20:43 -05:00
stage1/glue.o: stage1/lib/glue.o
cp stage1/lib/glue.o stage1/glue.o
2011-05-04 20:28:30 -05:00
stage1/intrinsics.bc: $(INTRINSICS_BC)
@$(call E, cp: $@)
$(Q)cp $< $@
2011-05-01 15:18:52 -05:00
# Due to make not wanting to run the same implicit rules twice on the same
# rule tree (implicit-rule recursion prevention, see "Chains of Implicit
# Rules" in GNU Make manual) we have to re-state the %.o and %.s patterns here
# for different directories, to handle cases where (say) a test relies on a
# compiler that relies on a .o file.
stage1/%.o: stage1/%.s
@$(call E, assemble [gcc]: $@)
$(Q)gcc $(CFG_GCCISH_CFLAGS) -o $@ -c $<
2011-05-01 15:18:52 -05:00
stage1/%$(X): $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ0) stage0/intrinsics.bc
@$(call E, compile_and_link: $@)
$(STAGE0) -o $@ $<
stage1/lib/$(CFG_LIBRUSTC): $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ1) \
stage1/intrinsics.bc
@$(call E, compile_and_link: $@)
2011-07-07 14:28:01 -05:00
$(STAGE1) --lib -o $@ $<