aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-09-13 00:01:28 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-09-13 00:01:28 +0200
commita82b6c772089aa46e30c6c89ef48f514294df3cb (patch)
treee25d9b6fd1fefe8b6ac293a5c0b53293872a8f54 /Makefile
parentAdd basic documentation for lens. (diff)
parentEven more documentation. (diff)
downloadcalp-a82b6c772089aa46e30c6c89ef48f514294df3cb.tar.gz
calp-a82b6c772089aa46e30c6c89ef48f514294df3cb.tar.xz
Merge branch 'next' into datarewrite-structures
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 16 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 7c51dac5..7ab69459 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,11 @@ GUILE_C_FLAGS = -Lmodule \
-Wmacro-use-before-definition -Warity-mismatch \
-Wduplicate-case-datum -Wbad-case-datum
+CLIBS = guile-3.0
+CFLAGS = -Wall -pedantic -std=c11 $(shell pkg-config --cflags $(CLIBS))
+LDLIBS = $(shell pkg-config --libs $(CLIBS))
+LDFLAGS = -lrt
+
# All po-files inside po/, except new.po, and hidden files
PO_FILES = $(shell find po -type f -name \*.po -and -not -name new.po -and -not -name .\*)
LOCALIZATIONS = $(PO_FILES:po/%.po=localization/%/LC_MESSAGES/calp.mo)
@@ -36,9 +41,15 @@ LIMIT_FILES=$(LIMIT:%=--only %)
# Skip these files when testing
SKIP=--skip $(PWD)/tests/test/web-server.scm
-all: go_files static $(LOCALIZATIONS)
+all: calp go_files static $(LOCALIZATIONS)
$(MAKE) -C doc/ref
+calp: calp.c
+ $(CC) -ggdb $(CFLAGS) -DBUILD_ENV $(LDFLAGS) -o $@ $< $(LDLIBS)
+
+calp-release: calp.c
+ $(CC) -O2 $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
+
XGETTEXT_FLAGS = --from-code=UTF-8 --add-comments --indent -kG_
static:
@@ -65,8 +76,10 @@ localization/%/LC_MESSAGES/calp.mo: po/%.po
clean:
-$(MAKE) -C static clean
-rm -r obj-*
+ -rm calp
+ -rm calp-release
-install: all
+install: all calp-release
install -d $(DESTDIR)$(GUILE_SITE_DIR) $(DESTDIR)$(GUILE_CCACHE_DIR)
rsync -a module/ $(DESTDIR)$(GUILE_SITE_DIR)
rsync -a obj-$(GUILE_VERSION)/ $(DESTDIR)$(GUILE_CCACHE_DIR)
@@ -75,7 +88,7 @@ install: all
$(MAKE) -C doc/ref install
install -m 644 -D -t $(DESTDIR)/usr/share/doc/calp README.md
install -m 755 -D -t $(DESTDIR)/usr/lib/calp/ scripts/tzget
- install -m755 -D production-main $(DESTDIR)/usr/bin/calp
+ install -m755 -D calp-release $(DESTDIR)/usr/bin/calp
lcov.info: $(GO_FILES)
env DEBUG=0 tests/run-tests.scm --coverage=$@ $(if $(VERBOSE),--verbose) $(SKIP) $(LIMIT_FILES)