aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-03-24 12:22:28 -0700
committerPatrick Walton <[email protected]>2011-03-24 12:24:22 -0700
commitf284c5c1ebc46f38928fee1fd4b8a8858ddab98c (patch)
tree94ae25c3bc49312a3bb031a70a3933b773d2a278 /Makefile.in
parentMake symbol resolution failures log under rust_log::ERR flag as well. (diff)
downloadrust-f284c5c1ebc46f38928fee1fd4b8a8858ddab98c.tar.xz
rust-f284c5c1ebc46f38928fee1fd4b8a8858ddab98c.zip
Generate the platform-specific .def files at build time
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in22
1 files changed, 20 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index 950c67fe..866a6b7a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -344,7 +344,7 @@ RUNTIME_HDR := rt/globals.h \
rt/test/rust_test_runtime.h \
rt/test/rust_test_util.h
-RUNTIME_DEF := $(S)src/rt/rustrt$(CFG_DEF_SUFFIX)
+RUNTIME_DEF := rt/rustrt$(CFG_DEF_SUFFIX)
RUNTIME_INCS := -I $(S)src/rt/isaac -I $(S)src/rt/uthash
RUNTIME_OBJS := $(RUNTIME_CS:.cpp=.o)
@@ -356,7 +356,7 @@ RUSTLLVM_CS := $(addprefix rustllvm/, \
MachOObjectFile.cpp Object.cpp RustWrapper.cpp)
RUSTLLVM_HDR := rustllvm/include/llvm-c/Object.h
-RUSTLLVM_DEF := $(S)src/rustllvm/rustllvm$(CFG_DEF_SUFFIX)
+RUSTLLVM_DEF := rustllvm/rustllvm$(CFG_DEF_SUFFIX)
RUSTLLVM_INCS := -iquote $(CFG_LLVM_INCDIR) \
-iquote $(S)src/rustllvm/include
@@ -514,6 +514,24 @@ rustllvm/%.o: rustllvm/%.cpp $(MKFILES)
$(Q)ocamllex$(OPT) -q -o $@ $<
+%.linux.def: %.def.in $(MKFILES)
+ @$(call E, def: $@)
+ $(Q)echo "{" > $@
+ $(Q)sed 's/.$$/&;/' $< >> $@
+ $(Q)echo "};" >> $@
+
+%.darwin.def: %.def.in $(MKFILES)
+ @$(call E, def: $@)
+ $(Q)sed 's/^./_&/' $< > $@
+
+ifdef CFG_WINDOWSY
+%.def: %.def.in $(MKFILES)
+ @$(call E, def: $@)
+ $(Q)echo LIBRARY $* > $@
+ $(Q)echo EXPORTS >> $@
+ $(Q)sed 's/^./ &/' $< >> $@
+endif
+
######################################################################
# Doc rules
######################################################################