summaryrefslogtreecommitdiff
path: root/dist/gcc/Makefile.in
diff options
context:
space:
mode:
authorTristan Gingold2014-12-18 06:48:45 +0100
committerTristan Gingold2014-12-18 06:48:45 +0100
commit17d4852b72d3b488cb3aaacf5fe3767f56a8c089 (patch)
tree64ce7d9bde63bdb4ebc4fc156e0f9b6c3953b894 /dist/gcc/Makefile.in
parent7536206f05e52657f972cfbb35bed45615048b69 (diff)
downloadghdl-17d4852b72d3b488cb3aaacf5fe3767f56a8c089.tar.gz
ghdl-17d4852b72d3b488cb3aaacf5fe3767f56a8c089.tar.bz2
ghdl-17d4852b72d3b488cb3aaacf5fe3767f56a8c089.zip
Adjust makefiles to accept absolute srcdir path.
Diffstat (limited to 'dist/gcc/Makefile.in')
-rw-r--r--dist/gcc/Makefile.in93
1 files changed, 24 insertions, 69 deletions
diff --git a/dist/gcc/Makefile.in b/dist/gcc/Makefile.in
index ad8a3bf..2d1cdc7 100644
--- a/dist/gcc/Makefile.in
+++ b/dist/gcc/Makefile.in
@@ -161,34 +161,29 @@ clean: grt-clean ghdllibs-clean force
# Additionnal rules
-LIB87_DIR:=./lib/v87
-LIB93_DIR:=./lib/v93
-LIB08_DIR:=./lib/v08
LIBSRC_DIR:=$(srcdir)/libraries
-ANALYZE=../ghdl -a --GHDL1=../ghdl1 --ieee=none
-ANALYZE_DEP:=../ghdl
-
-$(LIB93_DIR) $(LIB87_DIR):
- $(srcdir)/../../mkinstalldirs $@
+LIBDST_DIR:=lib
+ANALYZE=../../../../ghdl -a --GHDL1=./ghdl1 --ieee=none $(LIB_CFLAGS)
+ANALYZE_DEP:=
####libraries Makefile.inc
std87_standard.o: $(GHDL1)
- $(GHDL1) --std=87 -quiet -o std_standard.s --compile-standard
- ../xgcc -c -o std_standard.o std_standard.s
- $(MV) std_standard.o $@
+ $(GHDL1) --std=87 -quiet -o std87_standard.s --compile-standard
+ ../xgcc -c -o $@ std87_standard.s
+ $(RM) -f std87_standard.s
std93_standard.o: $(GHDL1)
- $(GHDL1) --std=93 -quiet -o std_standard.s --compile-standard
- ../xgcc -c -o std_standard.o std_standard.s
- $(MV) std_standard.o $@
+ $(GHDL1) --std=93 -quiet -o std93_standard.s --compile-standard
+ ../xgcc -c -o $@ std93_standard.s
+ $(RM) -f std93_standard.s
std08_standard.o: $(GHDL1)
- $(GHDL1) --std=08 -quiet -o std_standard.s --compile-standard
- ../xgcc -c -o std_standard.o std_standard.s
- $(MV) std_standard.o $@
+ $(GHDL1) --std=08 -quiet -o std08_standard.s --compile-standard
+ ../xgcc -c -o $@ std08_standard.s
+ $(RM) -f std08_standard.s
-ghdllib: std87_standard.o std93_standard.o std08_standard.o libgrt.a
+ghdllib: libgrt.a std87_standard.o std93_standard.o std08_standard.o vhdl.libs.all
ghdllibs-clean: force
$(RM) -rf $(LIB87_DIR) $(LIB93_DIR) $(LIB08_DIR)
@@ -201,63 +196,23 @@ GRT_RANLIB=$(RANLIB)
####grt Makefile.inc
-install-ghdllib: ghdllib grt.lst $(STD93_SRCS) $(STD87_SRCS) \
- $(IEEE93_SRCS) $(IEEE87_SRCS) $(SYNOPSYS_SRCS) \
- $(STD08_SRCS) $(IEEE08_SRCS)
+install-ghdllib: ghdllib grt.lst
$(RM) -rf $(DESTDIR)$(VHDL_LIB_DIR)
$(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)
# Install libgrt
- $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/lib
- $(INSTALL_DATA) libgrt.a $(DESTDIR)$(VHDL_LIB_DIR)/lib/libgrt.a
- $(INSTALL_DATA) grt.lst $(DESTDIR)$(VHDL_LIB_DIR)/lib/grt.lst
- $(INSTALL_DATA) $(GRTSRCDIR)/grt.ver $(DESTDIR)$(VHDL_LIB_DIR)/lib/grt.ver
+ $(INSTALL_DATA) libgrt.a $(DESTDIR)$(VHDL_LIB_DIR)/libgrt.a
+ $(INSTALL_DATA) grt.lst $(DESTDIR)$(VHDL_LIB_DIR)/grt.lst
+ $(INSTALL_DATA) $(GRTSRCDIR)/grt.ver $(DESTDIR)$(VHDL_LIB_DIR)/grt.ver
# Install VHDL sources.
- $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/src
- $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/src/std
- for i in $(STD93_SRCS) $(STD87_SRCS) $(STD08_SRCS); do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(VHDL_LIB_DIR)/src/std; \
- done
- $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/src/ieee
- for i in $(IEEE93_SRCS) $(IEEE87_SRCS); do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(VHDL_LIB_DIR)/src/ieee; \
- done
- $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/src/vital95
- for i in $(VITAL95_SRCS); do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(VHDL_LIB_DIR)/src/vital95; \
- done
- $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/src/vital2000
- for i in $(VITAL2000_SRCS); do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(VHDL_LIB_DIR)/src/vital2000; \
- done
- $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/src/synopsys
- for i in $(SYNOPSYS_SRCS); do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(VHDL_LIB_DIR)/src/synopsys; \
- done
- $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/src/mentor
- for i in $(MENTOR93_SRCS); do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(VHDL_LIB_DIR)/src/mentor; \
- done
- $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/src/ieee2008
- for i in $(IEEE08_SRCS); do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(VHDL_LIB_DIR)/src/ieee2008; \
+ for d in $(VHDLLIB_SUBDIRS); do \
+ $(MKDIR) -p $(DESTDIR)$(VHDL_LIB_DIR)/$$d; \
+ $(INSTALL_DATA) -p \
+ $(LIBDST_DIR)/$$d/* $(DESTDIR)$(VHDL_LIB_DIR)/$$d; \
done
-# Create library dirs
- $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/lib/v93
- $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/lib/v87
- $(MKDIR) $(DESTDIR)$(VHDL_LIB_DIR)/lib/v08
-# Compile in place.
- PDIR=`pwd` && cd $(DESTDIR)$(VHDL_LIB_DIR) && \
- $(MAKE) -f $$PDIR/Makefile REL_DIR=../../.. LIBSRC_DIR="src" \
- LIB93_DIR=lib/v93 LIB87_DIR=lib/v87 LIB08_DIR=lib/v08 \
- ANALYZE="$$PDIR/../ghdl -a --GHDL1=$$PDIR/../ghdl1 --ieee=none" \
- ANALYZE_DEP="$$PDIR/../ghdl1" \
- std.v87 ieee.v87 synopsys.v87 \
- std.v93 ieee.v93 synopsys.v93 mentor.v93 \
- std.v08 ieee.v08
# Copy std_standard (this is done after libraries, since they remove dirs).
$(INSTALL_DATA) std87_standard.o \
- $(DESTDIR)$(VHDL_LIB_DIR)/lib/v87/std/std_standard.o
+ $(DESTDIR)$(VHDL_LIB_DIR)/v87/std/std_standard.o
$(INSTALL_DATA) std93_standard.o \
- $(DESTDIR)$(VHDL_LIB_DIR)/lib/v93/std/std_standard.o
+ $(DESTDIR)$(VHDL_LIB_DIR)/v93/std/std_standard.o
$(INSTALL_DATA) std08_standard.o \
- $(DESTDIR)$(VHDL_LIB_DIR)/lib/v08/std/std_standard.o
+ $(DESTDIR)$(VHDL_LIB_DIR)/v08/std/std_standard.o