aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/llvm-nodebug/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/ortho/llvm-nodebug/Makefile')
-rw-r--r--src/ortho/llvm-nodebug/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ortho/llvm-nodebug/Makefile b/src/ortho/llvm-nodebug/Makefile
index 68aba29cf..3f9ab2099 100644
--- a/src/ortho/llvm-nodebug/Makefile
+++ b/src/ortho/llvm-nodebug/Makefile
@@ -8,7 +8,7 @@ BE=llvm-nodebug
all: $(ortho_exec)
-$(ortho_exec): $(ortho_srcdir)/llvm-nodebug/ortho_llvm.ads force llvm-cbindings.o
+$(ortho_exec): $(ortho_srcdir)/llvm-nodebug/ortho_llvm.ads force llvm-cbindings.o ortho_code_main.adb
$(GNATMAKE) -o $@ -aI$(ortho_srcdir)/llvm-nodebug -aI$(ortho_srcdir) \
$(GNAT_FLAGS) ortho_code_main -bargs -E \
-largs llvm-cbindings.o --LINK=$(CXX) \
@@ -17,6 +17,14 @@ $(ortho_exec): $(ortho_srcdir)/llvm-nodebug/ortho_llvm.ads force llvm-cbindings.
llvm-cbindings.o: $(ortho_srcdir)/llvm-nodebug/llvm-cbindings.cpp
$(CXX) -c `$(LLVM_CONFIG) --cxxflags` -o $@ $<
+ortho_code_main.adb:
+ echo "with Ortho_Code_Main$(llvm_be_ver);" > ortho_code_main.tmp
+ echo "procedure Ortho_Code_Main is" >> ortho_code_main.tmp
+ echo "begin" >> ortho_code_main.tmp
+ echo " Ortho_Code_Main$(llvm_be_ver);" >> ortho_code_main.tmp
+ echo "end Ortho_Code_Main;" >> ortho_code_main.tmp
+ mv ortho_code_main.tmp $@
+
clean:
$(RM) -f *.o *.ali ortho_code_main
$(RM) b~*.ad? *~