From add9cfa1ae859e5f728a2ec3fd1d02586008dfe0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 19 Jun 2010 19:52:47 +0200 Subject: Move fehrc / help from options.c into separate files --- src/Makefile | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index ed1ecc8..84ee7ab 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,15 +3,27 @@ include ../config.mk TARGETS = ${shell echo *.c} OBJECTS = ${TARGETS:.c=.o} -feh: deps.mk ${OBJECTS} - ${CC} ${LDFLAGS} ${CFLAGS} -o $@ ${OBJECTS} ${LDLIBS} +I_SRCS = ${shell echo *.raw} +I_DSTS = ${I_SRCS:.raw=.inc} -deps.mk: ${TARGETS} - ${CC} -MM ${TARGETS} > $@ +feh: deps.mk ${OBJECTS} ${I_DSTS} + ${CC} ${LDFLAGS} ${CFLAGS} -o $@ ${OBJECTS} ${LDLIBS} include deps.mk +.raw.inc: + sed 's/^\(.*\)$$/"\1\\n"/' < ${@:.inc=.raw} > $@ + +fehrc.inc: fehrc.raw +help.inc: help.raw + + +deps.mk: ${TARGETS} ${I_DSTS} + ${CC} -MM ${TARGETS} > $@ + clean: - rm -f feh *.o + rm -f feh *.o *.inc .PHONY: clean + +.SUFFIXES: .inc .raw -- cgit v1.2.3