aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-03-06 21:45:20 +0100
committerTristan Gingold <tgingold@free.fr>2014-03-06 21:45:20 +0100
commitd9bb785009b005cc314f063ae05b8974fd8f4bf2 (patch)
tree0251fa6c1cc5a69d73c269df9e8d15f64989648d
parentc2ef1ac7197cf3020eb6f46719e96c0193f16029 (diff)
downloadghdl-d9bb785009b005cc314f063ae05b8974fd8f4bf2.tar.gz
ghdl-d9bb785009b005cc314f063ae05b8974fd8f4bf2.tar.bz2
ghdl-d9bb785009b005cc314f063ae05b8974fd8f4bf2.zip
Makefile: adjust for LLVM be.
-rw-r--r--translate/ghdldrv/Makefile32
1 files changed, 16 insertions, 16 deletions
diff --git a/translate/ghdldrv/Makefile b/translate/ghdldrv/Makefile
index af2e82dcd..605f0a540 100644
--- a/translate/ghdldrv/Makefile
+++ b/translate/ghdldrv/Makefile
@@ -69,8 +69,11 @@ ghdl_mcode: default_pathes.ads $(GRT_ADD_OBJS) $(ORTHO_DEPS) memsegs_c.o chkstk.
$(GNATMAKE) -aI../../ortho/mcode -aI../../ortho $(GNATFLAGS) ghdl_mcode $(GNAT_BARGS) -largs memsegs_c.o chkstk.o $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB))
ghdl_llvm_jit: GRT_FLAGS+=-DWITH_GNAT_RUN_TIME
-ghdl_llvm_jit: default_pathes.ads $(GRT_ADD_OBJS) $(ORTHO_DEPS) bindings.o force
- $(GNATMAKE) -o $@ -aI../../ortho/llvm -aI../../ortho/mcode -aI../../ortho $(GNATFLAGS) ghdl_mcode $(GNAT_BARGS) -largs -m64 bindings.o $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB)) --LINK=g++
+ghdl_llvm_jit: default_pathes.ads $(GRT_ADD_OBJS) $(ORTHO_DEPS) llvm-cbindings.o force
+ $(GNATMAKE) -o $@ -aI../../ortho/llvm -aI../../ortho $(GNATFLAGS) ghdl_mcode $(GNAT_BARGS) -largs llvm-cbindings.o $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB)) `$(LLVM_CONFIG) --ldflags --libs --system-libs` -lc++
+
+llvm-cbindings.o: ../../ortho/llvm/llvm-cbindings.cpp
+ $(CXX) -c -m64 `$(LLVM_CONFIG) --includedir --cxxflags` -g -o $@ $<
ghdl_simul: default_pathes.ads $(GRT_ADD_OBJS) force
$(GNATMAKE) -aI../../simulate $(GNATFLAGS) ghdl_simul $(GNAT_BARGS) -largs $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB))
@@ -78,9 +81,6 @@ ghdl_simul: default_pathes.ads $(GRT_ADD_OBJS) force
memsegs_c.o: ../../ortho/mcode/memsegs_c.c
$(CC) -c -g -o $@ $<
-bindings.o: ../../ortho/llvm/bindings.cpp
- $(CXX) -c -m64 `$(LLVM_CONFIG) --cxxflags` -g -o $@ $<
-
ghdl_gcc: default_pathes.ads force
$(GNATMAKE) $(GNATFLAGS) ghdl_gcc $(GNAT_BARGS) -largs $(GNAT_LARGS)
@@ -123,23 +123,24 @@ include ../../libraries/Makefile.inc
GHDL1=../ghdl1-gcc
$(LIB93_DIR)/std/std_standard.o: $(GHDL1)
+ifeq ($(GHDL),ghdl_llvm)
+ $(GHDL1) --std=93 -quiet $(LIB_CFLAGS) -c -o $@ --compile-standard
+else
$(GHDL1) --std=93 -quiet $(LIB_CFLAGS) -o std_standard.s \
--compile-standard
$(CC) -c -o $@ std_standard.s
$(RM) std_standard.s
+endif
$(LIB87_DIR)/std/std_standard.o: $(GHDL1)
+ifeq ($(GHDL),ghdl_llvm)
+ $(GHDL1) --std=87 -quiet $(LIB_CFLAGS) -c -o $@ --compile-standard
+else
$(GHDL1) --std=87 -quiet $(LIB_CFLAGS) -o std_standard.s \
--compile-standard
$(CC) -c -o $@ std_standard.s
$(RM) std_standard.s
-
-GHDL1LLVM=../ghdl1-llvm
-$(LIB93_DIR)/std/std_standard.bc: $(GHDL1LLVM)
- $(GHDL1LLVM) --std=93 -o $@ --compile-standard
-
-$(LIB87_DIR)/std/std_standard.bc: $(GHDL1LLVM)
- $(GHDL1LLVM) --std=87 -o $@ --compile-standard
+endif
install.v93: std.v93 ieee.v93 synopsys.v93 mentor.v93
install.v87: std.v87 ieee.v87 synopsys.v87
@@ -148,19 +149,18 @@ install.v08: std.v08 ieee.v08
install.standard: $(LIB93_DIR)/std/std_standard.o \
$(LIB87_DIR)/std/std_standard.o
-install.standard-llvm: $(LIB93_DIR)/std/std_standard.bc \
- $(LIB87_DIR)/std/std_standard.bc
-
grt.links:
cd ../lib; ln -sf $(GRTSRCDIR)/grt.lst .; ln -sf $(GRTSRCDIR)/libgrt.a .; ln -sf $(GRTSRCDIR)/grt.ver .
install.all: install.v87 install.v93 install.standard
install.mcode: install.v87 install.v93 install.v08
-install.llvm: install.standard-llvm
install.simul:
$(MAKE) GHDL=ghdl_simul install.v87 install.v93
+install.llvm:
+ $(MAKE) GHDL=ghdl_llvm GHDL1=../ghdl1-llvm install.all
+
clean: force
$(RM) -f *.o *.ali ghdl_gcc ghdl_mcode
$(RM) -f b~*.ad? *~ default_pathes.ads