refactor configure script
Generate a makefile config instead of a makefile with predefined constants. This makes the build a bit more easier to modify. Also improve the makefile and apply some suggestions from shellcheck. :)
This commit is contained in:
parent
4bb8d391fd
commit
f1b79c2a7c
3 changed files with 60 additions and 66 deletions
29
Makefile
Normal file
29
Makefile
Normal file
|
@ -0,0 +1,29 @@
|
|||
IMPORT = import
|
||||
PREFIX = /usr/local
|
||||
MANPREFIX = ${PREFIX}/man
|
||||
|
||||
DC = ${_DC}
|
||||
CFLAGS = ${_CFLAGS}
|
||||
OBJS = ${_OBJS}
|
||||
|
||||
all: esv
|
||||
|
||||
include config.mk
|
||||
|
||||
esv: ${OBJS}
|
||||
${DC} ${_LDFLAGS} -of=$@ ${OBJS}
|
||||
|
||||
.SUFFIXES: .d .o
|
||||
|
||||
.d.o:
|
||||
${DC} ${CFLAGS} -c $<
|
||||
|
||||
clean:
|
||||
rm -f esv ${OBJS} ${INIOBJS}
|
||||
|
||||
install: esv
|
||||
install -Dm755 esv ${DESTDIR}${PREFIX}/bin/esv
|
||||
install -Dm644 esv.1 ${DESTDIR}${MANPREFIX}/man1
|
||||
install -Dm644 esv.conf.5 ${DESTDIR}${MANPREFIX}/man5
|
||||
|
||||
.PHONY: all clean install
|
Loading…
Add table
Add a link
Reference in a new issue