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.
This commit is contained in:
parent
d2b3a18d60
commit
4d2fc0b889
10
Makefile
10
Makefile
|
@ -1,6 +1,7 @@
|
||||||
VERSION = git-20171016
|
VERSION = git-20171019
|
||||||
|
|
||||||
srcdir = .
|
srcdir = .
|
||||||
|
VPATH = $(srcdir)
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
MANPREFIX = $(PREFIX)/share/man
|
MANPREFIX = $(PREFIX)/share/man
|
||||||
|
@ -45,16 +46,13 @@ sxiv: $(OBJS)
|
||||||
@echo "LINK $@"
|
@echo "LINK $@"
|
||||||
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LDLIBS)
|
$(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:
|
.c.o:
|
||||||
@echo "CC $@"
|
@echo "CC $@"
|
||||||
$(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
$(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
%.o: $(srcdir)/%.c
|
|
||||||
@echo "CC $@"
|
|
||||||
$(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c -o $@ $(srcdir)/$(@:.o=.c)
|
|
||||||
|
|
||||||
config.h:
|
config.h:
|
||||||
@echo "GEN $@"
|
@echo "GEN $@"
|
||||||
cp $(srcdir)/config.def.h $@
|
cp $(srcdir)/config.def.h $@
|
||||||
|
|
Loading…
Reference in New Issue