|
1 | 1 | # |
2 | 2 | # Makefile rules for the semigroups package |
3 | 3 | # |
| 4 | +abs_top_builddir = @abs_top_builddir@ |
| 5 | +top_builddir = @top_builddir@ |
| 6 | +abs_builddir = @abs_builddir@ |
| 7 | +builddir = @builddir@ |
| 8 | + |
4 | 9 | KEXT_NAME = semigroups |
5 | 10 |
|
6 | 11 | KEXT_CXXFLAGS = @LIBSEMIGROUPS_CFLAGS@ -std=gnu++17 -O3 |
@@ -88,17 +93,19 @@ $(KEXT_OBJS): bin/include/libsemigroups/libsemigroups.hpp |
88 | 93 |
|
89 | 94 | # the following is only run if BUILT_SOURCES is wound up |
90 | 95 | bin/include/libsemigroups/libsemigroups.hpp: |
91 | | - $(MAKE) -C libsemigroups install |
92 | | - # Cygwin only looks for DLLs in the same directory as the executable |
93 | | - # resides in. The following achieves that assuming that the GAP |
94 | | - # being used was self-compiled by the user. This supports |
95 | | - # both older GAPs with libtool (first) and GAP without libtool (second) |
96 | | - # Additionally, we rebase the dll with respect to the database to |
97 | | - # avoid fork conflicts |
| 96 | + $(MAKE) -C libsemigroups install prefix='${abs_builddir}/bin' includedir='${abs_builddir}/bin/include' libdir='${abs_builddir}/bin/lib' |
| 97 | + # |
| 98 | + # The Win32 dynamic loader only looks for DLLs in the same directory as |
| 99 | + # the executable. As a consequence, libtool puts DLLs into |
| 100 | + # "${libdir}/../bin" (for both Cygwin and MinGW), and this path |
| 101 | + # extension is not configurable. This explains why we test for bin/bin/ |
| 102 | + # rather than bin/lib. |
| 103 | + # |
| 104 | + # Additionally, we rebase the dll with respect to the database to |
| 105 | + # avoid fork conflicts |
98 | 106 | if test -f bin/bin/cygsemigroups*.dll ; then rebase -s bin/bin/cygsemigroups*.dll ; fi |
99 | 107 | if test -f bin/bin/cygsemigroups*.dll ; then if test -d $(GAPPATH)/.libs; then cp bin/bin/cygsemigroups*.dll $(GAPPATH)/.libs/ ; fi ; fi |
100 | 108 | if test -f bin/bin/cygsemigroups*.dll ; then cp bin/bin/cygsemigroups*.dll $(GAPPATH)/ ; fi |
101 | | - |
102 | 109 | endif |
103 | 110 |
|
104 | 111 | clean: |
|
0 commit comments