-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (21 loc) · 788 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
MIX = mix
CFLAGS += -g -O3 -ansi -pedantic -Wall -Wextra -Wno-unused-parameter
ERLANG_PATH = $(shell erl -eval 'io:format("~s", [lists:concat([code:root_dir(), "/erts-", erlang:system_info(version), "/include"])])' -s init stop -noshell)
CFLAGS += -I$(ERLANG_PATH)
CFLAGS += -I/usr/local/include -I/usr/include -L/usr/local/lib -L/usr/lib
CFLAGS += -DWEBVIEW_GTK=1
CFLAGS += -std=gnu99 -Wno-unused-function `pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0`
ifneq ($(OS),Windows_NT)
CFLAGS += -fPIC
ifeq ($(shell uname),Darwin)
LDFLAGS += -dynamiclib -undefined dynamic_lookup
endif
endif
.PHONY: all webview clean
all: priv/webview.so
priv/webview.so: src/webview.c
mkdir -p priv
$(CC) $(CFLAGS) -shared $(LDFLAGS) -o $@ src/webview.c
clean:
$(MIX) clean
$(RM) priv/*