-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
31 lines (21 loc) · 873 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
SHELL = /bin/sh
PREFIX ?= /usr/local
LIBDIR = $(PREFIX)/lib
EXTFLAGS = -fPIC -shared
EXTLIBS = `pkg-config --cflags webkit2gtk-4.0 webkit2gtk-web-extension-4.0 glib-2.0 gio-2.0`
all: blockit.so
blockit.so: blockit.c resources/gschema.c resources/gschema.h
$(CC) blockit.c resources/gschema.c -o blockit.so $(EXTFLAGS) $(EXTLIBS) $(CFLAGS)
resources/gschema.c: resources/gschema.xml resources/gui.glade resources/scripts/*
glib-compile-resources --generate-source resources/gschema.xml
resources/gschema.h: resources/gschema.xml resources/gui.glade resources/scripts/*
glib-compile-resources --generate-header resources/gschema.xml
install: all
mkdir -p $(DESTDIR)$(LIBDIR)
cp -f blockit.so $(DESTDIR)$(LIBDIR)
chmod 755 $(DESTDIR)$(LIBDIR)/blockit.so
uninstall:
rm -f $(DESTDIR)$(LIBDIR)/blockit.so
clean:
rm -f blockit.so
.PHONY: install uninstall clean