diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-04-04 04:30:58 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-04-04 04:30:58 +0200 |
commit | e2769e8168d33fec695f0ce149852284134899a1 (patch) | |
tree | f2a4273313857447774ea2d7f5ac2faa655b76c5 /src/ortho/llvm4-nodebug/Makefile | |
parent | 26d4381d0f167dbe14863b3261f9465a8c90412f (diff) | |
download | ghdl-e2769e8168d33fec695f0ce149852284134899a1.tar.gz ghdl-e2769e8168d33fec695f0ce149852284134899a1.tar.bz2 ghdl-e2769e8168d33fec695f0ce149852284134899a1.zip |
Preliminary support of LLVM 4
Close #323
Diffstat (limited to 'src/ortho/llvm4-nodebug/Makefile')
-rw-r--r-- | src/ortho/llvm4-nodebug/Makefile | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/ortho/llvm4-nodebug/Makefile b/src/ortho/llvm4-nodebug/Makefile new file mode 100644 index 000000000..3868566f4 --- /dev/null +++ b/src/ortho/llvm4-nodebug/Makefile @@ -0,0 +1,40 @@ +ortho_srcdir=.. +GNAT_FLAGS=-gnaty3befhkmr -gnata -gnatf -gnatwael -gnat05 +CXX=clang++ +LLVM_CONFIG=llvm-config +GNATMAKE=gnatmake +SED=sed +BE=llvm4-nodebug + +all: $(ortho_exec) + +$(ortho_exec): $(ortho_srcdir)/llvm4-nodebug/ortho_llvm.ads force llvm-cbindings.o ortho_code_main.adb + $(GNATMAKE) -o $@ -aI$(ortho_srcdir)/llvm4-nodebug -aI$(ortho_srcdir) \ + $(GNAT_FLAGS) ortho_code_main -bargs -E \ + -largs llvm-cbindings.o --LINK=$(CXX) \ + $(LDFLAGS) `$(LLVM_CONFIG) --ldflags --libs --system-libs` + +llvm-cbindings.o: $(ortho_srcdir)/llvm4-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? *~ + +distclean: clean + + +force: + +.PHONY: force all clean + +ORTHO_BASENAME=ortho_llvm +include $(ortho_srcdir)/Makefile.inc |