summaryrefslogtreecommitdiff
path: root/ortho
diff options
context:
space:
mode:
authorTristan Gingold2014-01-20 04:49:31 +0100
committerTristan Gingold2014-01-20 04:49:31 +0100
commit4654785c16670cedf8bb009d946761548f933dbc (patch)
tree11d1237d204dea6c35bf89bb267f7ff712d1d3ee /ortho
parentef5ceab6277b6bf62d6d5121bdd0f0a253b7a602 (diff)
downloadghdl-4654785c16670cedf8bb009d946761548f933dbc.tar.gz
ghdl-4654785c16670cedf8bb009d946761548f933dbc.tar.bz2
ghdl-4654785c16670cedf8bb009d946761548f933dbc.zip
Allow local overriding of configuration via Makefile.conf
Diffstat (limited to 'ortho')
-rw-r--r--ortho/gcc/Makefile49
1 files changed, 35 insertions, 14 deletions
diff --git a/ortho/gcc/Makefile b/ortho/gcc/Makefile
index 1c6d5c2..9db53c5 100644
--- a/ortho/gcc/Makefile
+++ b/ortho/gcc/Makefile
@@ -2,13 +2,29 @@ ortho_srcdir=..
orthobe_srcdir=$(ortho_srcdir)/gcc
agcc_objdir=.
agcc_srcdir=$(ortho_srcdir)/gcc
-# Modify AGCC_GCCSRC_DIR and AGCC_GCCOBJ_DIR for your environment
-AGCC_GCCSRC_DIR:=$(HOME)/Projects/gcc4.8.2/source/gcc-4.8.2/
-AGCC_GCCOBJ_DIR:=$(HOME)/Projects/gcc4.8.2/build/
SED=sed
GNATMAKE=gnatmake
CC=gcc
-COMPILER=g++
+CXX=g++
+COMPILER=$(CXX)
+LINKER=$(CXX)
+
+# Modify AGCC_GCCSRC_DIR and AGCC_GCCOBJ_DIR for your environment
+AGCC_GCCSRC_DIR:=$(HOME)/Projects/gcc4.8.2/source/gcc-4.8.2/
+AGCC_GCCOBJ_DIR:=$(HOME)/Projects/gcc4.8.2/build/
+
+# Supplied by main GCC Makefile, copied here for compatibility with same
+GMPLIBS = -L$(AGCC_GCCOBJ_DIR)./gmp/.libs -L$(AGCC_GCCOBJ_DIR)./mpfr/.libs \
+ -L$(AGCC_GCCOBJ_DIR)./mpc/src/.libs -lmpc -lmpfr -lgmp
+GMPINC = -I$(AGCC_GCCOBJ_DIR)./gmp -I$(AGCC_GCCSRC_DIR)/gmp \
+ -I$(AGCC_GCCOBJ_DIR)./mpfr -I$(AGCC_GCCSRC_DIR)/mpfr \
+ -I$(AGCC_GCCSRC_DIR)/mpc/src
+
+HOST_LIBS =
+ZLIB=-lz
+
+# Override variables in Makefile.conf for your environment
+-include $(orthobe_srcdir)/Makefile.conf
all: $(ortho_exec)
@@ -17,22 +33,27 @@ include $(orthobe_srcdir)/Makefile.inc
ORTHO_BASENAME=$(orthobe_srcdir)/ortho_gcc
ORTHO_PACKAGE=Ortho_Gcc
-# Supplied by main GCC Makefile, copied here for compatibility with same
-GMPLIBS = -L$(AGCC_GCCOBJ_DIR)./gmp/.libs -L$(AGCC_GCCOBJ_DIR)./mpfr/.libs -L$(AGCC_GCCOBJ_DIR)./mpc/src/.libs -lmpc -lmpfr -lgmp
-GMPINC = -I$(AGCC_GCCOBJ_DIR)./gmp -I$(AGCC_GCCSRC_DIR)/gmp -I$(AGCC_GCCOBJ_DIR)./mpfr -I$(AGCC_GCCSRC_DIR)/mpfr -I$(AGCC_GCCSRC_DIR)/mpc/src
+LIBBACKTRACE = $(AGCC_GCCOBJ_DIR)/libbacktrace/.libs/libbacktrace.a
+LIBDECNUMBER = $(AGCC_GCCOBJ_DIR)/libdecnumber/libdecnumber.a
+LIBIBERTY = $(AGCC_GCCOBJ_DIR)/libiberty/libiberty.a
+CPPLIB= # Not needed for GHDL
-LIBFLAGS=$(GMPLIBS) -lz -ldl -lstdc++
+BACKEND = $(AGCC_GCCOBJ_DIR)/gcc/libbackend.a \
+ $(AGCC_GCCOBJ_DIR)/gcc/libcommon-target.a \
+ $(AGCC_GCCOBJ_DIR)/gcc/libcommon.a \
+ $(CPPLIB) $(LIBDECNUMBER)
+BACKENDLIBS = $(CLOOGLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
+ $(ZLIB)
+LIBS = $(AGCC_GCCOBJ_DIR)/gcc/libcommon.a \
+ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
+ $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
$(ortho_exec): $(AGCC_DEPS) $(ORTHO_BASENAME).ads force
$(GNATMAKE) -m -o $@ -g -aI$(ortho_srcdir) \
-aI$(ortho_srcdir)/gcc $(GNAT_FLAGS) ortho_gcc-main \
- -bargs -E -largs $(AGCC_OBJS) \
- $(AGCC_GCCOBJ_DIR)gcc/libcommon-target.a \
- $(AGCC_GCCOBJ_DIR)gcc/libcommon.a \
- $(AGCC_GCCOBJ_DIR)libbacktrace/.libs/libbacktrace.a \
- $(AGCC_GCCOBJ_DIR)libdecnumber/libdecnumber.a \
- $(LIBFLAGS) #-static
+ -bargs -E -largs --GCC=$(LINKER) $(AGCC_OBJS) \
+ $(BACKEND) $(LIBS) $(BACKENDLIBS)
clean: agcc-clean
$(RM) -f *.o *.ali ortho_nodes-main