iomenu

interactive terminal dmenu-style menu
Log | Files | Refs | README | LICENSE

commit c4011c678d9f4aaa75e1bbb92a8a9e5b6180043b
parent cee77319ba6cc232295cf29688ba6eb3c58be246
Author: Josuah Demangeon <me@josuah.net>
Date:   Sat,  9 May 2020 20:58:11 +0200

pop config.mk out of Makefile

Diffstat:
MMakefile | 13+++++--------
Aconfig.mk | 4++++
2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,16 +1,15 @@ -CFLAGS = -std=c89 -pedantic -Wall -Wextra -g -D_POSIX_C_SOURCE=200809L +include config.mk SRC = iomenu.c strcasestr.c strsep.c utf8.c OBJ = ${SRC:.c=.o} -.PHONY: all all: iomenu .c.o: ${CC} -c -o $@ ${CFLAGS} $< iomenu: ${OBJ} - ${CC} -o $@ ${LDFLAGS} ${OBJ} + ${CC} -o $@ ${LFLAGS} ${OBJ} iomenu.o: iomenu.c util.h strcasestr.o: strcasestr.c util.h @@ -20,16 +19,14 @@ utf8.o: utf8.c utf8.h .PHONY: test test: test.c - ${CC} -o $@ ${LDFLAGS} test.c utf8.c + ${CC} -o $@ ${LFLAGS} test.c utf8.c ./$@ -.PHONY: clean clean: rm -f *.o *.core iomenu test -.PHONY: install install: iomenu - mkdir -p ${PREFIX}/share/man/man1 - cp *.1 ${PREFIX}/share/man/man1 + mkdir -p ${MANPREFIX}/man1 + cp *.1 ${MANPREFIX}/man1 mkdir -p ${PREFIX}/bin cp iomenu bin/* ${PREFIX}/bin diff --git a/config.mk b/config.mk @@ -0,0 +1,4 @@ +PREFIX = /usr/local +MANPREFIX = ${PREFIX}/man +CFLAGS = -std=c89 -pedantic -Wall -Wextra -g -D_POSIX_C_SOURCE=200809L +LFLAGS =