aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2017-10-19 13:29:25 +0200
committerBert Münnich <ber.t@posteo.de>2017-10-19 13:29:25 +0200
commit4d2fc0b8891974f69063f0fb4e88422a1dc78933 (patch)
tree1ce833db5fe954c4bfde5063b6342ef7c00de296
parentd2b3a18d60ac7ad3c40b57979347325f0df5bafc (diff)
Back to VPATH for out-of-source builds
OpenBSD make supports VPATH but not pattern rules. Everything in the new Makefile should work no matter what make program is used.
-rw-r--r--Makefile10
1 files changed, 4 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index fee7119..196b8ff 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
-VERSION = git-20171016
+VERSION = git-20171019
srcdir = .
+VPATH = $(srcdir)
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
@@ -45,16 +46,13 @@ sxiv: $(OBJS)
@echo "LINK $@"
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LDLIBS)
-$(OBJS): $(srcdir)/Makefile $(srcdir)/sxiv.h config.h
+$(OBJS): Makefile sxiv.h commands.lst config.h
+window.o: icon/data.h
.c.o:
@echo "CC $@"
$(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c -o $@ $<
-%.o: $(srcdir)/%.c
- @echo "CC $@"
- $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c -o $@ $(srcdir)/$(@:.o=.c)
-
config.h:
@echo "GEN $@"
cp $(srcdir)/config.def.h $@