aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authornirav <nirav@teisuu.com>2018-10-14 18:30:40 +0530
committerDandelion <nirav@teisuu.com>2018-10-14 18:30:40 +0530
commita7488f38fef1960086af860063f1958fb75d58f3 (patch)
treef2308d105bdbd5de1a178429c7e2d2b002a8339a /Makefile
parentfde5cb29f95f51ed075c34f5eebdccb81fa2f0e4 (diff)
downloadim-a7488f38fef1960086af860063f1958fb75d58f3.tar.gz
im-a7488f38fef1960086af860063f1958fb75d58f3.zip
Added info panel to show current file name, resolution and list index
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 16 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 12c939f..09b3341 100644
--- a/Makefile
+++ b/Makefile
@@ -1,35 +1,42 @@
CC?=cc
INSTALL?=install
+PKGCONFIG?=$(shell which pkg-config)
+GLIB_COMPILE_RESOURCES?=$(shell $(PKGCONFIG) --variable=glib_compile_resources gio-2.0)
CFLAGS?=-o2 -pipe
CFLAGS+=-Wall -Wextra -Wno-unused-parameter
-CFLAGS+=$(shell pkg-config --cflags gtk+-3.0)
-LDFLAGS+=$(shell pkg-config --libs gtk+-3.0)
-PREFIX?=/usr
+CFLAGS+=$(shell $(PKGCONFIG) --cflags gtk+-3.0)
+LDFLAGS+=$(shell $(PKGCONFIG) --libs gtk+-3.0)
+PREFIX?=/usr/local
BINDIR?=$(PREFIX)/bin
APPDIR?=$(PREFIX)/share/applications
MANDIR?=$(PREFIX)/share/man/man1
SRCDIR=src
+DATADIR=data
OUTDIR=build
-OBJECTS=\
- $(OUTDIR)/main.o \
- $(OUTDIR)/file.o \
- $(OUTDIR)/image.o \
- $(OUTDIR)/input.o \
- $(OUTDIR)/window.o \
+OBJECTS= $(OUTDIR)/main.o \
+ $(OUTDIR)/file.o \
+ $(OUTDIR)/image.o \
+ $(OUTDIR)/input.o \
+ $(OUTDIR)/window.o \
+ $(OUTDIR)/resources.o
all: qwe
qwe: $(OBJECTS)
$(CC) -o qwe $(OBJECTS) $(LDFLAGS)
+$(SRCDIR)/resources.c: $(DATADIR)/qwe.gresources.xml $(DATADIR)/qwe.css
+ $(GLIB_COMPILE_RESOURCES) $(DATADIR)/qwe.gresources.xml --target=$(SRCDIR)/resources.c --generate-source
+
$(OUTDIR)/%.o: $(SRCDIR)/%.c
@mkdir -p $(OUTDIR)
$(CC) -c $(CFLAGS) -o $@ $<
clean:
rm -rf $(OUTDIR) qwe
+ rm -rf $(SRCDIR)/resources.c
install: qwe qwe.desktop
$(INSTALL) -m0755 qwe $(BINDIR)