diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ghdldrv/default_paths.ads.in | 8 | ||||
-rw-r--r-- | src/ghdldrv/ghdldrv.adb | 2 | ||||
-rw-r--r-- | src/ghdldrv/ghdllocal.adb | 8 | ||||
-rw-r--r-- | src/ghdldrv/ghdlsynth.adb | 8 | ||||
-rw-r--r-- | src/ghdldrv/ghdlvpi.adb | 7 | ||||
-rw-r--r-- | src/grt/Makefile.inc | 26 |
6 files changed, 31 insertions, 28 deletions
diff --git a/src/ghdldrv/default_paths.ads.in b/src/ghdldrv/default_paths.ads.in index ec6b68d94..03addd784 100644 --- a/src/ghdldrv/default_paths.ads.in +++ b/src/ghdldrv/default_paths.ads.in @@ -21,8 +21,12 @@ package Default_Paths is Install_Prefix : constant String := "@INSTALL_PREFIX@"; - Lib_Prefix : constant String := - "@LIB_PREFIX@"; + LibDir_Suffix : constant String := + "@LIBDIR_SUFFIX@"; + LibGhdlDir_Suffix : constant String := + "@LIBGHDLDIR_SUFFIX@"; + IncDir_Suffix : constant String := + "@INCDIR_SUFFIX@"; Compiler_Gcc : constant String := "@COMPILER_GCC@"; diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb index aec20e686..e7990ed4d 100644 --- a/src/ghdldrv/ghdldrv.adb +++ b/src/ghdldrv/ghdldrv.adb @@ -826,7 +826,7 @@ package body Ghdldrv is end case; Put ("linker command (--LINKER=, CC, or cc): "); Put_Line (Cmd.Linker_Cmd.all); - Put_Line ("default lib prefix: " & Default_Paths.Lib_Prefix); + Put_Line ("default lib prefix: " & Default_Paths.LibDir_Suffix); New_Line; diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb index c6cebc398..7b6da35db 100644 --- a/src/ghdldrv/ghdllocal.adb +++ b/src/ghdldrv/ghdllocal.adb @@ -417,13 +417,13 @@ package body Ghdllocal is end if; -- Else try default path. if Lib_Prefix_Path = null then - if Is_Absolute_Path (Default_Paths.Lib_Prefix) then - Lib_Prefix_Path := new String'(Default_Paths.Lib_Prefix); + if Is_Absolute_Path (Default_Paths.LibGhdlDir_Suffix) then + Lib_Prefix_Path := new String'(Default_Paths.LibGhdlDir_Suffix); else if Exec_Prefix /= null then Lib_Prefix_Path := new String'(Exec_Prefix.all & Directory_Separator - & Default_Paths.Lib_Prefix); + & Default_Paths.LibGhdlDir_Suffix); end if; if Lib_Prefix_Path = null or else not Is_Directory (Lib_Prefix_Path.all) @@ -432,7 +432,7 @@ package body Ghdllocal is Lib_Prefix_Path := new String'(Default_Paths.Install_Prefix & Directory_Separator - & Default_Paths.Lib_Prefix); + & Default_Paths.LibGhdlDir_Suffix); end if; end if; else diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb index effc04dc7..cafecbb57 100644 --- a/src/ghdldrv/ghdlsynth.adb +++ b/src/ghdldrv/ghdlsynth.adb @@ -581,7 +581,8 @@ package body Ghdlsynth is Ghdllocal.Set_Exec_Prefix_From_Program_Name; end if; - return Ghdllocal.Exec_Prefix.all & Directory_Separator & "lib" + return Ghdllocal.Exec_Prefix.all & Directory_Separator + & Default_Paths.LibDir_Suffix & Directory_Separator & Get_Libghdl_Name; end Get_Libghdl_Path; @@ -590,9 +591,8 @@ package body Ghdlsynth is -- Compute install path Ghdllocal.Set_Exec_Prefix_From_Program_Name; - return Ghdllocal.Exec_Prefix.all - & Directory_Separator & "include" - & Directory_Separator & "ghdl"; + return Ghdllocal.Exec_Prefix.all & Directory_Separator + & Default_Paths.IncDir_Suffix; end Get_Libghdl_Include_Dir; procedure Register_Commands is diff --git a/src/ghdldrv/ghdlvpi.adb b/src/ghdldrv/ghdlvpi.adb index 8bf4dae4d..ef79ee305 100644 --- a/src/ghdldrv/ghdlvpi.adb +++ b/src/ghdldrv/ghdlvpi.adb @@ -37,9 +37,8 @@ package body Ghdlvpi is -- Compute install path Ghdllocal.Set_Exec_Prefix_From_Program_Name; - return Ghdllocal.Exec_Prefix.all - & Directory_Separator & "include" - & Directory_Separator & "ghdl"; + return Ghdllocal.Exec_Prefix.all & Directory_Separator + & Default_Paths.IncDir_Suffix; end Get_Vpi_Include_Dir; -- Return the lib directory. @@ -50,7 +49,7 @@ package body Ghdlvpi is Ghdllocal.Set_Exec_Prefix_From_Program_Name; end if; - return Ghdllocal.Exec_Prefix.all & Directory_Separator & "lib"; + return Ghdllocal.Exec_Prefix.all & Directory_Separator & LibDir_Suffix; end Get_Vpi_Lib_Dir; -- Return the lib directory, but unixify the path (for a unix shell in diff --git a/src/grt/Makefile.inc b/src/grt/Makefile.inc index acc4f3d80..2df32ec08 100644 --- a/src/grt/Makefile.inc +++ b/src/grt/Makefile.inc @@ -123,14 +123,14 @@ GRT_PRAGMA_FLAG=-gnatec$(GRTSRCDIR)/grt.adc -gnatdY # Rule to compile an Ada file. GRT_ADACOMPILE=$(GNATMAKE) -u -c $(GRT_FLAGS) $(GRT_PRAGMA_FLAG) -grt-all: $(libdirsuffix)/libgrt.a \ - $(libdirsuffix)/$(GRT_LIBBACKTRACE) \ - $(libdirsuffix)/grt.lst \ - $(libdirsuffix)/grt-exec.lst \ - $(libdirsuffix)/grt-shared.lst \ - $(libdirsuffix)/grt.ver - -$(libdirsuffix)/libgrt.a: $(GRT_ADD_OBJS) grt/run-bind.o grt/main.o grt/grt-files +grt-all: $(libghdldirsuffix)/libgrt.a \ + $(libghdldirsuffix)/$(GRT_LIBBACKTRACE) \ + $(libghdldirsuffix)/grt.lst \ + $(libghdldirsuffix)/grt-exec.lst \ + $(libghdldirsuffix)/grt-shared.lst \ + $(libghdldirsuffix)/grt.ver + +$(libghdldirsuffix)/libgrt.a: $(GRT_ADD_OBJS) grt/run-bind.o grt/main.o grt/grt-files $(RM) -f $@ $(AR) rcv $@ `sed -e "/^-/d" -e "s!^!grt/!" < grt/grt-files` \ $(GRT_ADD_OBJS) grt/run-bind.o grt/main.o @@ -260,7 +260,7 @@ grt/grt-files.in: grt/grt-files sed -e "\!^.[/\\]!d" -e "/-shared/d" -e "/-static/d" -e "/-lgnat/d" \ -e "\X-L/Xd" < $< > $@ -$(libdirsuffix)/grt.lst: grt/grt-files.in +$(libghdldirsuffix)/grt.lst: grt/grt-files.in echo "@/libgrt.a" > $@ for i in $(GRT_EXTRA_LIB); do echo $$i >> $@; done ifneq ($(LIBBACKTRACE),) @@ -268,19 +268,19 @@ ifneq ($(LIBBACKTRACE),) endif cat $< >> $@ -$(libdirsuffix)/grt-exec.lst: +$(libghdldirsuffix)/grt-exec.lst: echo "# link options for executables" > $@ for i in $(GRT_EXEC_OPTS); do echo $$i >> $@; done -$(libdirsuffix)/grt-shared.lst: +$(libghdldirsuffix)/grt-shared.lst: echo "# link options for shared libraries" > $@ for i in $(GRT_SHARED_OPTS); do echo $$i >> $@; done -$(libdirsuffix)/grt.ver: $(GRTSRCDIR)/grt.ver +$(libghdldirsuffix)/grt.ver: $(GRTSRCDIR)/grt.ver cp $< $@ ifneq ($(GRT_LIBBACKTRACE),) -$(libdirsuffix)/$(GRT_LIBBACKTRACE): $(LIBBACKTRACE) +$(libghdldirsuffix)/$(GRT_LIBBACKTRACE): $(LIBBACKTRACE) cp $< $@ endif |