aboutsummaryrefslogtreecommitdiffstats
path: root/ortho/llvm/Makefile
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-03-06 21:27:19 +0100
committerTristan Gingold <tgingold@free.fr>2014-03-06 21:27:19 +0100
commit7b1e07c025bd01aad47bb78222a5e6b17682d4e4 (patch)
tree9bab215376b6cd0c0df0817d46f0bd12b880bc42 /ortho/llvm/Makefile
parent627f7b8313148cde9c372aca8b6cdc3d4d3dc78f (diff)
downloadghdl-7b1e07c025bd01aad47bb78222a5e6b17682d4e4.tar.gz
ghdl-7b1e07c025bd01aad47bb78222a5e6b17682d4e4.tar.bz2
ghdl-7b1e07c025bd01aad47bb78222a5e6b17682d4e4.zip
Add LLVM back-end for ortho.
Diffstat (limited to 'ortho/llvm/Makefile')
-rw-r--r--ortho/llvm/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/ortho/llvm/Makefile b/ortho/llvm/Makefile
new file mode 100644
index 000000000..b5c279863
--- /dev/null
+++ b/ortho/llvm/Makefile
@@ -0,0 +1,29 @@
+ortho_srcdir=..
+GNAT_FLAGS=-gnaty3befhkmr -gnata -gnatf -gnatwael
+CC=clang
+LLVM_CONFIG=llvm-config
+
+all: $(ortho_exec)
+
+$(ortho_exec): force llvm-cbindings.o
+ gnatmake -m -o $@ -g -aI$(ortho_srcdir)/llvm -aI$(ortho_srcdir) \
+ $(GNAT_FLAGS) ortho_code_main -bargs -E \
+ -largs llvm-cbindings.o `$(LLVM_CONFIG) --ldflags --libs --system-libs` -lc++ #-static
+
+llvm-bindings.o: $(ortho_srcdir)/llvm/llvm-bindings.cpp
+ $(CXX) -c -m64 -I`$(LLVM_CONFIG) --includedir --cxxflags` -g -o $@ $<
+
+llvm-cbindings.o: $(ortho_srcdir)/llvm/llvm-cbindings.cpp
+ $(CC) -c -I`$(LLVM_CONFIG) --includedir --cflags` -g -o $@ $<
+
+clean:
+ $(RM) -f *.o *.ali ortho_code_main
+ $(RM) b~*.ad? *~
+
+distclean: clean
+
+
+force:
+
+.PHONY: force all clean
+