aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2023-04-14 20:42:03 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2023-04-14 20:42:03 +0300
commit030e0f5859698638a33d3a34c0659871d1dc7333 (patch)
tree4be596a4c481e7fcc70a358a2ad34934ea4f7e12 /src/Makefile.am
parentba0875373d2250e3a6d63d5269ff1a4a89a280ed (diff)
downloadsciteco-030e0f5859698638a33d3a34c0659871d1dc7333.tar.gz
allow disabling Lexilla (Lexer) support by specifying --without-lexilla
* This does not make sense for most SciTECO builds, but only when you want to optimize for size as the lexers take up 50% of the compressed binary size. Without Lexilla, it should be possible get it compiled in about 500kb. * It can be useful for instance when building for embedded distributions. * When Lexilla is disabled, symbols-scilexer.c is also not generated (we assume that the Lexilla sources are not available and it also doesn't serve any purpose). * Consequently, most of the lexer configuration scripts are also not installed under --without-lexilla.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index ab6e35f..f1f073e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -68,8 +68,10 @@ sciteco_minimal_SOURCES =
symbols-scintilla.c symbols-scilexer.c : sciteco-minimal$(EXEEXT)
endif
sciteco_minimal_LDADD = libsciteco-base.la \
- @SCINTILLA_PATH@/bin/scintilla.a \
- @LEXILLA_PATH@/bin/liblexilla.a
+ @SCINTILLA_PATH@/bin/scintilla.a
+if LEXILLA
+sciteco_minimal_LDADD += @LEXILLA_PATH@/bin/liblexilla.a
+endif
# Scintilla is unfortunately still written in C++, so we must force
# Automake to use the C++ linker when linking the binaries.
# The following hack is actually advocated in the Automake manual.
@@ -77,7 +79,10 @@ nodist_EXTRA_sciteco_minimal_SOURCES = fuck-this-shit.cpp
bin_PROGRAMS = sciteco
sciteco_SOURCES =
-nodist_sciteco_SOURCES = symbols-scintilla.c symbols-scilexer.c
+nodist_sciteco_SOURCES = symbols-scintilla.c
+if LEXILLA
+nodist_sciteco_SOURCES += symbols-scilexer.c
+endif
sciteco_LDADD = $(sciteco_minimal_LDADD)
# see above
nodist_EXTRA_sciteco_SOURCES = fuck-this-shit.cpp