summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2024-04-09 20:45:25 +0200
committerAlbert Cervin <albert@acervin.com>2024-04-09 20:46:52 +0200
commit5ac71eee1b31d42c2e094033f342a1adea6001ef (patch)
treedd45726c06d6ffbd1c267f6852aa45df42985969 /Makefile
parent15a5d49e737965f0349504214a53b3311f73a694 (diff)
downloaddged-5ac71eee1b31d42c2e094033f342a1adea6001ef.tar.gz
dged-5ac71eee1b31d42c2e094033f342a1adea6001ef.tar.xz
dged-5ac71eee1b31d42c2e094033f342a1adea6001ef.zip
Prepare 0.1.0
Clarify a few things in the README.md and add a version macro that can be used with `-V/--version`.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 9 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 82ef47b..ecbccf4 100644
--- a/Makefile
+++ b/Makefile
@@ -29,12 +29,13 @@ TEST_SOURCES = test/assert.c test/buffer.c test/text.c test/utf8.c test/main.c \
test/minibuffer.c test/undo.c test/settings.c test/container.c
prefix ?= /usr/local
-datadir = $(prefix)/share/dged
+DESTDIR ?= $(prefix)
+datadir = share/dged
.SUFFIXES:
.SUFFIXES: .c .o .d
-CFLAGS += -Werror -g -O2 -std=c99 -I $(.CURDIR)/src -I $(.CURDIR)/src/main -DDATADIR="$(datadir)"
+CFLAGS += -Werror -g -O2 -std=c99 -I $(.CURDIR)/src -I $(.CURDIR)/src/main -DDATADIR="$(prefix)/$(datadir)"
ASAN ?= false
@@ -121,14 +122,14 @@ clean:
rm -rf $(.OBJDIR)/grammars
install: dged
- install -d $(prefix)/bin
- install -m 755 $(.OBJDIR)/dged $(prefix)/bin/dged
+ install -d $(DESTDIR)/bin
+ install -m 755 $(.OBJDIR)/dged $(DESTDIR)/bin/dged
- install -d $(prefix)/share/man/man1
- install -m 644 $(.CURDIR)/dged.1 $(prefix)/share/man/man1/dged.1
+ install -d $(DESTDIR)/share/man/man1
+ install -m 644 $(.CURDIR)/dged.1 $(DESTDIR)/share/man/man1/dged.1
- install -d $(datadir)/grammars
- cp -rL $(.OBJDIR)/grammars "$(datadir)/"
+ install -d $(DESTDIR)/$(datadir)/grammars
+ cp -rL $(.OBJDIR)/grammars "$(DESTDIR)/$(datadir)/"
docs:
doxygen $(.CURDIR)/Doxyfile