Bläddra i källkod

Simplify config.mk

master
Bert Münnich 7 år sedan
förälder
incheckning
e46b1fa609
2 ändrade filer med 21 tillägg och 16 borttagningar
  1. +16
    -4
      Makefile
  2. +5
    -12
      config.mk

+ 16
- 4
Makefile Visa fil

@@ -1,10 +1,22 @@
VERSION := git-20170906 VERSION := git-20170908


.PHONY: clean install uninstall .PHONY: all clean install uninstall
.SUFFIXES: .SUFFIXES:


include config.mk include config.mk


CPPFLAGS += -DVERSION=\"$(VERSION)\" -DHAVE_GIFLIB=$(HAVE_GIFLIB) -DHAVE_LIBEXIF=$(HAVE_LIBEXIF)
DEPFLAGS := -MMD -MP

LDLIBS := -lImlib2 -lX11 -lXft

ifneq ($(HAVE_GIFLIB),0)
LDLIBS += -lgif
endif
ifneq ($(HAVE_LIBEXIF),0)
LDLIBS += -lexif
endif

SRC := autoreload_$(AUTORELOAD).c commands.c image.c main.c options.c thumbs.c util.c window.c SRC := autoreload_$(AUTORELOAD).c commands.c image.c main.c options.c thumbs.c util.c window.c
DEP := $(SRC:.c=.d) DEP := $(SRC:.c=.d)
OBJ := $(SRC:.c=.o) OBJ := $(SRC:.c=.o)
@@ -16,13 +28,13 @@ $(OBJ): Makefile
-include $(DEP) -include $(DEP)


%.o: %.c %.o: %.c
$(CC) $(CFLAGS) $(CPPFLAGS) -DVERSION=\"$(VERSION)\" -MMD -MP -c -o $@ $< $(CC) $(CFLAGS) $(CPPFLAGS) $(DEPFLAGS) -c -o $@ $<


config.h: config.h:
cp config.def.h $@ cp config.def.h $@


sxiv: $(OBJ) sxiv: $(OBJ)
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS)


clean: clean:
rm -f $(OBJ) $(DEP) sxiv rm -f $(OBJ) $(DEP) sxiv


+ 5
- 12
config.mk Visa fil

@@ -5,20 +5,13 @@ CC ?= gcc
CFLAGS += -std=c99 -Wall -pedantic CFLAGS += -std=c99 -Wall -pedantic
CPPFLAGS += -I/usr/include/freetype2 -D_XOPEN_SOURCE=700 CPPFLAGS += -I/usr/include/freetype2 -D_XOPEN_SOURCE=700
LDFLAGS += LDFLAGS +=
LIBS := -lImlib2 -lX11 -lXft


# autoreload backend: inotify/nop # autoreload backend: inotify/nop
AUTORELOAD := inotify AUTORELOAD := inotify


# optional dependencies: # enable features requiring giflib (-lgif)
# giflib: gif animations HAVE_GIFLIB := 1
ifndef NO_GIFLIB # enable features requiring libexif (-lexif)
CPPFLAGS += -DHAVE_GIFLIB HAVE_LIBEXIF := 1
LIBS += -lgif
endif
# libexif: jpeg auto-orientation, exif thumbnails
ifndef NO_LIBEXIF
CPPFLAGS += -DHAVE_LIBEXIF
LIBS += -lexif
endif



||||||
x
 
000:0
Laddar…
Avbryt
Spara