forked from semigroups/Semigroups
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
70 lines (53 loc) · 1.73 KB
/
Makefile.am
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
#
# Semigroups
#
# This file is part of the build system of a GAP kernel extension.
# Requires automake.
#
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src/libsemigroups
AM_CPPFLAGS = -I$(srcdir)/src/libsemigroups
BINARCHDIR = bin/$(GAPARCH)
GAPINSTALLLIB = $(abs_top_srcdir)/$(BINARCHDIR)/semigroups.so
lib_LTLIBRARIES = semigroups.la
semigroups_la_SOURCES = src/pkg.cc src/converter.cc src/bipart.cc
semigroups_la_SOURCES += src/uf.cc src/fropin.cc src/congpairs.cc
semigroups_la_SOURCES += src/semigrp.cc
semigroups_la_CXXFLAGS = $(GAP_CFLAGS) -std=gnu++11 -O3 -g -march=native
semigroups_la_CPPFLAGS = $(GAP_CPPFLAGS)
semigroups_la_CFLAGS = $(GAP_CFLAGS)
semigroups_la_LDFLAGS = $(GAP_LDFLAGS) -module -avoid-version
semigroups_la_LIBADD = src/libsemigroups/libsemigroups.la
if SYS_IS_CYGWIN
semigroups_la_LDFLAGS += -no-undefined -version-info 0:0:0 -Wl,$(GAPROOT)/bin/$(GAPARCH)/gap.dll
endif
all-local: semigroups.la
$(mkdir_p) $(top_srcdir)/$(BINARCHDIR) $(top_srcdir)/bin/lib
cp -RL src/libsemigroups/.libs/* $(top_srcdir)/bin/lib/
if SYS_IS_CYGWIN
cp .libs/semigroups.dll $(GAPINSTALLLIB)
# Cygwin will only look in this directory for dlls
cp src/libsemigroups/.libs/cygsemigroups-0.dll $(GAPROOT)/.libs
else
cp .libs/semigroups.so $(GAPINSTALLLIB)
endif
if KERNEL_DEBUG
@echo "SUCCESS (debug mode enabled)!"
else
@echo "SUCCESS!"
endif
distclean-local:
rm -rf bin/*
doc: doc/manual.six
doc/manual.six: doc/*.xml PackageInfo.g
($(GAPROOT)/bin/gap.sh -A makedoc.g)
gaplint:
gaplint *.g gap/options.g gap/*.gi gap/*.gd gap/*/* doc/*.xml tst/*.tst tst/*/*.tst
cpplint:
cpplint src/*.h src/*.cc
lint: gaplint cpplint
format:
clang-format -i src/*.h src/*.cc
superclean: distclean
git clean -xdf --exclude *.swp --exclude *.swo
.PHONY: superclean