-
Notifications
You must be signed in to change notification settings - Fork 36
/
GNUmakefile.in
110 lines (90 loc) · 3.38 KB
/
GNUmakefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#
# Makefile rules for the semigroups package
#
KEXT_NAME = semigroups
KEXT_CXXFLAGS = @LIBSEMIGROUPS_CFLAGS@ -std=gnu++14 -O3
KEXT_LDFLAGS = @LIBSEMIGROUPS_RPATH@ @LIBSEMIGROUPS_LIBS@
# configure settings
GAPPATH = @GAPROOT@
HPCOMBI_CONSTEXPR_FUN_ARGS = @HPCOMBI_CONSTEXPR_FUN_ARGS@
LIBSEMIGROUPS_HPCOMBI_ENABLED = @LIBSEMIGROUPS_HPCOMBI_ENABLED@
WITH_INCLUDED_LIBSEMIGROUPS = @WITH_INCLUDED_LIBSEMIGROUPS@
SYS_IS_CYGWIN = @SYS_IS_CYGWIN@
abs_top_builddir = @abs_top_builddir@
# sources
KEXT_SOURCES = src/bipart.cpp
KEXT_SOURCES += src/cong.cpp
KEXT_SOURCES += src/conglatt.cpp
KEXT_SOURCES += src/froidure-pin-base.cpp
KEXT_SOURCES += src/froidure-pin-bipart.cpp
KEXT_SOURCES += src/froidure-pin-bmat.cpp
KEXT_SOURCES += src/froidure-pin-fallback.cpp
KEXT_SOURCES += src/froidure-pin-matrix.cpp
KEXT_SOURCES += src/froidure-pin-max-plus-mat.cpp
KEXT_SOURCES += src/froidure-pin-min-plus-mat.cpp
KEXT_SOURCES += src/froidure-pin-pbr.cpp
KEXT_SOURCES += src/froidure-pin-pperm.cpp
KEXT_SOURCES += src/froidure-pin-transf.cpp
KEXT_SOURCES += src/pkg.cpp
KEXT_SOURCES += src/to_gap.cpp
KEXT_SOURCES += gapbind14/src/gapbind14.cpp
KEXT_CPPFLAGS = -Igapbind14/include/
ifdef HPCOMBI_CONSTEXPR_FUN_ARGS
KEXT_CPPFLAGS += -DHPCOMBI_CONSTEXPR_FUN_ARGS
endif
ifdef LIBSEMIGROUPS_HPCOMBI_ENABLED
KEXT_CXXFLAGS += @HPCOMBI_CXXFLAGS@
endif
ifdef WITH_INCLUDED_LIBSEMIGROUPS
# FIXME(later) all the include paths should point into bin/include/ and not to
# the sources, or otherwise we should stop make installing into bin
ifdef LIBSEMIGROUPS_HPCOMBI_ENABLED
KEXT_CPPFLAGS += -Ilibsemigroups/extern/HPCombi/include
KEXT_CPPFLAGS += -Ilibsemigroups/extern/HPCombi/include/fallback
endif
KEXT_CPPFLAGS += -Ilibsemigroups/extern/fmt-8.0.1/include
KEXT_CPPFLAGS += -Ilibsemigroups/include
endif
KEXT_CPPFLAGS += -DFMT_HEADER_ONLY
ifdef KERNEL_DEBUG
KEXT_CPPFLAGS += -DDEBUG
else
KEXT_CPPFLAGS += -DNDEBUG
endif
KEXT_CXXFLAGS += $(KEXT_CPPFLAGS) # HACK: there is no KEXT_CPPFLAGS
# HACK: On cygwin, add this flag to work around issues where fork() sometimes
# fails on Cygwin when semigroups.so is loaded into GAP. This will hopefully
# become unnecessary with GAP 4.13, which will automatically add this to the
# flags.
ifdef SYS_IS_CYGWIN
KEXT_LDFLAGS += -Wl,--enable-auto-image-base
endif
# include shared GAP package build system
KEXT_USE_AUTOCONF = 1
include Makefile.gappkg
# ensure pkgconfig.h is built
$(KEXT_OBJS): gen/pkgconfig.h
ifdef WITH_INCLUDED_LIBSEMIGROUPS
# ensure libsemigroups is installed into bin before compiling
$(KEXT_OBJS): bin/include/libsemigroups/libsemigroups.hpp
# the following is only run if BUILT_SOURCES is wound up
bin/include/libsemigroups/libsemigroups.hpp:
$(MAKE) -C libsemigroups install
# Cygwin only looks for DLLs in the same directory as the executable
# resides in. The following achieves that assuming that the GAP
# being used was self-compiled by the user. This supports
# both older GAPs with libtool (first) and GAP without libtool (second)
if test -f bin/bin/cygsemigroups*.dll ; then if test -d $(GAPPATH)/.libs; then cp bin/bin/cygsemigroups*.dll $(GAPPATH)/.libs/ ; fi ; fi
if test -f bin/bin/cygsemigroups*.dll ; then cp bin/bin/cygsemigroups*.dll $(GAPPATH)/ ; fi
endif
clean:
find . -name '*.gcda' -delete
lint:
etc/gaplint.sh
etc/cpplint.sh
format:
clang-format -i src/*.*pp
.PHONY: lint format
superclean: distclean
git clean -xdf --exclude *.swp --exclude *.swo
.PHONY: superclean