| 1 | - don't ignore cflags/ldflags
|
| 2 | - install to usr/share not share
|
| 3 | - don't strip always
|
| 4 | - don't pre-compress manpage with minimum compression
|
| 5 | - don't rebuild for install
|
| 6 | --
|
| 7 | diff --git a/Makefile b/Makefile
|
| 8 | index 6b37510..35cb380 100644
|
| 9 | |
| 10 | |
| 11 | @@ -4,14 +4,13 @@ hx_version != git describe --tags 2>/dev/null || echo "1.0.0"
|
| 12 | CPPFLAGS = -DNDEBUG -DHX_GIT_HASH=\"$(hx_git_hash)\" -DHX_VERSION=\"$(hx_version)\"
|
| 13 | CPPFLAGS += -D_POSIX_SOURCE # sigaction
|
| 14 | CPPFLAGS += -D__BSD_VISIBLE # SIGWINCH on FreeBSD.
|
| 15 | -CFLAGS = -std=c99 -Wall -Wextra -pedantic -O3 -MMD -MP
|
| 16 | -LDFLAGS = -O3
|
| 17 | +CFLAGS += -std=c99 -Wall -Wextra -pedantic -MMD -MP
|
| 18 |
|
| 19 | objects := hx.o editor.o charbuf.o util.o undo.o
|
| 20 |
|
| 21 | PREFIX ?= /usr/local
|
| 22 | bindir = /bin
|
| 23 | -mandir = /man
|
| 24 | +mandir = /share/man
|
| 25 |
|
| 26 | %.gz: %
|
| 27 | gzip -k $<
|
| 28 | @@ -24,9 +23,9 @@ debug: CPPFLAGS += -UNDEBUG # undefine the NDEBUG flag to allow assert().
|
| 29 | debug: CFLAGS += -ggdb -Og
|
| 30 | debug: LDFLAGS += -ggdb -Og
|
| 31 |
|
| 32 | -install: all
|
| 33 | - install -Dm755 -s ./hx -t $(DESTDIR)$(PREFIX)$(bindir)
|
| 34 | - install -Dm644 ./hx.1.gz -t $(DESTDIR)$(PREFIX)$(mandir)/man1
|
| 35 | +install:
|
| 36 | + install -Dm755 ./hx -t $(DESTDIR)$(PREFIX)$(bindir)
|
| 37 | + install -Dm644 ./hx.1 -t $(DESTDIR)$(PREFIX)$(mandir)/man1
|
| 38 |
|
| 39 | static: all
|
| 40 | static: LDFLAGS += -static
|