-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (27 loc) · 748 Bytes
/
Makefile
File metadata and controls
36 lines (27 loc) · 748 Bytes
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
32
33
34
35
36
UNAME := $(shell uname)
CXXFLAGS ?= -std=c++14
ifeq ($(UNAME), Darwin)
CXXFLAGS += -DWEBVIEW_COCOA=1 -DWEBVIEW_BUILD_SHARED=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=1
endif
ifeq ($(UNAME), Linux)
CXXFLAGS += -DWEBVIEW_GTK=1 -DWEBVIEW_BUILD_SHARED=1 `if pkg-config --exists webkit2gtk-4.1; then \
pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.1; \
else \
pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0; \
fi`
endif
cpp_file := ext/webview.cc
obj_file := $(cpp_file:.cc=.o)
.PHONY: all
all: $(obj_file)
ifeq ($(UNAME), Linux)
ar rcs ext/libwebview.a ext/webview.o
endif
ifeq ($(findstring MINGW,$(UNAME)),MINGW)
ar rcs ext/libwebview.a ext/webview.o
endif
%.o: %.cc
$(CXX) -c -o $@ $(CXXFLAGS) $<
.PHONY: clean
clean:
rm -f $(obj_file)