aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-23 21:21:12 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-23 21:21:12 +0200
commitebdba3ee834f23ed59812146b50492709d6fa936 (patch)
tree19314553418ba90ce1fff93030a9114eb8b7e47e /Makefile.in
parent3e454e617c67184af75cb7e8fd6b22fa869703c1 (diff)
downloadghdl-ebdba3ee834f23ed59812146b50492709d6fa936.tar.gz
ghdl-ebdba3ee834f23ed59812146b50492709d6fa936.tar.bz2
ghdl-ebdba3ee834f23ed59812146b50492709d6fa936.zip
Makefile.in: also build and install libghdl.a. For #1336
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index d10042ae3..886b69021 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -413,6 +413,13 @@ ifeq ($(SOEXT),.dll)
-mv $(libghdl_name).exe $(libghdl_name)
endif
+libghdl.a: $(libghdl_name)
+# Also create a static library
+ sed -e '1,/-- BEGIN/d' -e '/-- END/,$$d' -e 's/^ -- //' < b~libghdl.adb > libghdl.bind
+ $(RM) -f $@
+ ar rc $@ b~libghdl.o $(LIBGHDL_GRT_OBJS) `sed -e /^-/d < libghdl.bind`
+ grep adalib libghdl.bind | sed -e 's/^-L//' -e 's@adalib/@adalib/libgnat.a@' > libghdl.link
+
$(srcdir)/src/synth/ghdlsynth_gates.h: $(srcdir)/src/synth/netlists.ads $(srcdir)/src/synth/netlists-gates.ads
echo "/* DO NOT MODIFY" > $@
echo " This file is automatically generated by Makefile. */" >> $@
@@ -424,7 +431,7 @@ $(srcdir)/src/synth/ghdlsynth_gates.h: $(srcdir)/src/synth/netlists.ads $(srcdir
grep ' Param_' $(srcdir)/src/synth/netlists.ads >> $@
echo "};" >> $@
-all.libghdl.true: $(libghdl_name)
+all.libghdl.true: $(libghdl_name) libghdl.a
all.libghdl.false:
all.libghdl: all.libghdl.$(enable_libghdl)
@@ -434,6 +441,8 @@ install.libghdl.include: install.dirs $(srcdir)/src/synth/ghdlsynth_gates.h
install.libghdl.lib:
$(INSTALL_PROGRAM) -p $(libghdl_name) $(DESTDIR)$(libdir)/
+ $(INSTALL_PROGRAM) -p libghdl.a $(DESTDIR)$(libdir)/
+ $(INSTALL_DATA) -p libghdl.link $(DESTDIR)$(libdir)/
install.libghdl.true: install.libghdl.lib install.libghdl.include