-
Notifications
You must be signed in to change notification settings - Fork 6
/
makefile
54 lines (44 loc) · 1.39 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
PREFIX ?= /usr
WEBKITVER ?= 4.0
WEBKIT ?= webkit2gtk-$(WEBKITVER)
EXTENSION_DIR ?= $(PREFIX)/lib/wyebrowser
DISTROURI ?= https://archlinux.org/
DISTRONAME ?= "Arch Linux"
ifneq ($(WEBKITVER), 4.0)
VERDIR=/$(WEBKITVER)
endif
ifeq ($(DEBUG), 1)
CFLAGS += -Wall -Wno-deprecated-declarations
else
CFLAGS += -Wno-deprecated-declarations
endif
all: wyeb ext.so
wyeb: main.c general.c makefile
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< \
`pkg-config --cflags --libs gtk+-3.0 glib-2.0 $(WEBKIT)` \
-DEXTENSION_DIR=\"$(EXTENSION_DIR)$(VERDIR)\" \
-DDISTROURI=\"$(DISTROURI)\" \
-DDISTRONAME=\"$(DISTRONAME)\" \
-DDEBUG=${DEBUG} -lm
ext.so: ext.c general.c makefile
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -shared -fPIC \
`pkg-config --cflags --libs gtk+-3.0 glib-2.0 $(WEBKIT)` \
-DDEBUG=${DEBUG} -DJSC=${JSC}
clean:
rm -f wyeb ext.so
install: all
install -Dm755 wyeb $(DESTDIR)$(PREFIX)/bin/wyeb
install -Dm755 ext.so $(DESTDIR)$(EXTENSION_DIR)$(VERDIR)/ext.so
install -Dm644 wyeb.png $(DESTDIR)$(PREFIX)/share/pixmaps/wyeb.png
install -Dm644 wyeb.desktop $(DESTDIR)$(PREFIX)/share/applications/wyeb.desktop
uninstall:
rm -f $(PREFIX)/bin/wyeb
rm -f $(EXTENSION_DIR)$(VERDIR)/ext.so
-rmdir $(EXTENSION_DIR)$(VERDIR)
-rmdir $(EXTENSION_DIR)
rm -f $(PREFIX)/share/pixmaps/wyeb.png
rm -f $(PREFIX)/share/applications/wyeb.desktop
re: clean all
# $(MAKE) clean
# $(MAKE) all
full: re install