~nhoad/roland

ref: b91f46789159c99cba6d7857e8579e23e5ebebea roland/webextensions/Makefile -rw-r--r-- 642 bytes View raw
b91f4678 — Nathan Hoad This is obviously useful. 2 years ago
                                                                                
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
#
# Makefile
# Adrian Perez, 2015-08-25 11:58
#

CFLAGS ?= -Os -Wall

PYTHON        ?= python3
PKG_MODULES   := pygobject-3.0 webkit2gtk-web-extension-4.0 ${PYTHON}
WEB_EXT_FLAGS := $(shell pkg-config ${PKG_MODULES} --cflags)
WEB_EXT_LIBS  := $(shell pkg-config ${PKG_MODULES} --libs)

CPPFLAGS += ${WEB_EXT_FLAGS}
LDLIBS   += ${WEB_EXT_LIBS}

all: pythonloader.so

install: pythonloader.so
	install pythonloader.so ~/.config/roland/webextensions/pythonloader.so
pythonloader.so: pythonloader.o
	${LD} ${LDFLAGS} -fPIC -shared -o $@ $^ ${LDLIBS}
pythonloader.so: CFLAGS += -fPIC

clean:
	${RM} pythonloader.o pythonloader.so

# vim:ft=make
#