Support out-of-source builds
Fixes issue #167. Long after closing this issue (kind of wontfix) we have switched to GNU make and can thus use its features like VPATH.
This commit is contained in:
parent
e46b1fa609
commit
a46006f527
6
Makefile
6
Makefile
@ -5,7 +5,9 @@ VERSION := git-20170908
|
|||||||
|
|
||||||
include config.mk
|
include config.mk
|
||||||
|
|
||||||
CPPFLAGS += -DVERSION=\"$(VERSION)\" -DHAVE_GIFLIB=$(HAVE_GIFLIB) -DHAVE_LIBEXIF=$(HAVE_LIBEXIF)
|
VPATH := $(SRCDIR)
|
||||||
|
|
||||||
|
CPPFLAGS += -I. -DVERSION=\"$(VERSION)\" -DHAVE_GIFLIB=$(HAVE_GIFLIB) -DHAVE_LIBEXIF=$(HAVE_LIBEXIF)
|
||||||
DEPFLAGS := -MMD -MP
|
DEPFLAGS := -MMD -MP
|
||||||
|
|
||||||
LDLIBS := -lImlib2 -lX11 -lXft
|
LDLIBS := -lImlib2 -lX11 -lXft
|
||||||
@ -31,7 +33,7 @@ $(OBJ): Makefile
|
|||||||
$(CC) $(CFLAGS) $(CPPFLAGS) $(DEPFLAGS) -c -o $@ $<
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(DEPFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
config.h:
|
config.h:
|
||||||
cp config.def.h $@
|
cp $(SRCDIR)/config.def.h $@
|
||||||
|
|
||||||
sxiv: $(OBJ)
|
sxiv: $(OBJ)
|
||||||
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS)
|
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS)
|
||||||
|
Loading…
Reference in New Issue
Block a user