summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile22
1 files changed, 17 insertions, 5 deletions
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