2 ifeq ("${GTK_VERSION}", "gtk2")
3 JS_CF
=$(shell pkg-config
--silence-errors
--cflags javascriptcoregtk-1.0
)
4 JS_LD
=$(shell pkg-config
--silence-errors
--libs javascriptcoregtk-1.0
)
6 JS_CF
=$(shell pkg-config
--silence-errors
--cflags javascriptcoregtk-3.0
)
7 JS_LD
=$(shell pkg-config
--silence-errors
--libs javascriptcoregtk-3.0
)
11 ifeq ("${GTK_VERSION}", "gtk2")
12 LIBS
+= gtk
+-2.0 webkit-1.0
13 CFLAGS
+=-I
/usr
/include/gtk-2.0
15 LIBS
+= gtk
+-3.0 webkitgtk-3.0
16 CFLAGS
+=-I
/usr
/include/gtk-3.0
18 LIBS
+= libsoup-2.4 gnutls libbsd
20 CFLAGS
+= -O2
-Wall
-ggdb3
-D_GNU_SOURCE
-I.
-I..
$(shell pkg-config
--cflags $(LIBS
)) $(JS_CF
)
21 LDADD
+= $(shell pkg-config
--libs
$(LIBS
)) $(JS_LD
) -ldl
-lX11
24 BINDIR?
= $(PREFIX
)/bin
25 APPDIR?
= $(PREFIX
)/share
/applications
26 MANDIR?
= $(PREFIX
)/share
/man
27 RESDIR?
= $(PREFIX
)/share
/xombrero
28 CFLAGS
+= -DXT_DS_RESOURCE_DIR
=\"$(RESDIR
)\"
30 SRCS
= $(shell ls ..
/*.c
)
33 DEPS
= $(addsuffix .depend
, $(OBJS
))
37 BUILDVERSION
= $(shell sh
$(CURDIR
)/..
/buildver.sh
)
38 ifneq ("${BUILDVERSION}", "")
39 CFLAGS
+= -DXOMBRERO_BUILDSTR
=\"$(BUILDVERSION
)\"
42 all: javascript.h tooltip.h xombrero
44 javascript.h
: ..
/js-merge-helper.pl ..
/hinting.js ..
/autoscroll.js
45 perl ..
/js-merge-helper.pl ..
/hinting.js ..
/input-focus.js \
46 ..
/autoscroll.js
> javascript.h
48 tooltip.h
: ..
/ascii2txt.pl ..
/txt2tooltip.pl ..
/xombrero
.1
49 nroff
-c
-Tascii
-mandoc ..
/xombrero
.1 | \
50 perl ..
/ascii2txt.pl | \
51 perl ..
/txt2tooltip.pl
> tooltip.h
54 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o
$@
$+ $(LDADD
)
57 @echo
"Generating $@.depend"
58 @
$(CC
) -MM
$(CPPFLAGS
) $(CFLAGS
) $< | \
59 sed
's,^.*\.o[ :]*,$@ $@.depend : ,g' > $@.depend
60 $(CC
) $(CPPFLAGS
) $(CFLAGS
) -o
$@
-c
$<
63 install -m
755 -d
$(DESTDIR
)$(BINDIR
)
64 install -m
755 -d
$(DESTDIR
)$(MANDIR
)/man1
65 install -m
755 -d
$(DESTDIR
)$(RESDIR
)
66 install -m
755 -d
$(DESTDIR
)$(APPDIR
)
67 install -m
755 xombrero
$(DESTDIR
)$(BINDIR
)
68 install -m
644 ..
/xombrero
.1 $(DESTDIR
)$(MANDIR
)/man1
/xombrero
.1
69 install -m
644 ..
/xombrero.css
$(DESTDIR
)$(RESDIR
)
70 install -m
644 ..
/xombrero.desktop
$(DESTDIR
)$(APPDIR
)
71 install -m
644 ..
/xombreroicon16.png
$(DESTDIR
)$(RESDIR
)
72 install -m
644 ..
/xombreroicon32.png
$(DESTDIR
)$(RESDIR
)
73 install -m
644 ..
/xombreroicon48.png
$(DESTDIR
)$(RESDIR
)
74 install -m
644 ..
/xombreroicon64.png
$(DESTDIR
)$(RESDIR
)
75 install -m
644 ..
/xombreroicon128.png
$(DESTDIR
)$(RESDIR
)
76 install -m
644 ..
/xombreroicon256.png
$(DESTDIR
)$(RESDIR
)
77 install -m
644 ..
/favicon.ico
$(DESTDIR
)$(RESDIR
)
78 install -m
644 ..
/tld-rules
$(DESTDIR
)$(RESDIR
)
79 install -m
644 ..
/style.css
$(DESTDIR
)$(RESDIR
)
80 install -m
644 ..
/hsts-preload
$(DESTDIR
)$(RESDIR
)
81 install -m
644 ..
/user-agent-headers
${DESTDIR}$(RESDIR
)
82 install -m
644 ..
/http-accept-headers
${DESTDIR}$(RESDIR
)
83 install -m
644 ..
/torenabled.ico
$(DESTDIR
)$(RESDIR
)
84 install -m
644 ..
/tordisabled.ico
$(DESTDIR
)$(RESDIR
)
87 rm -f
$(DESTDIR
)$(BINDIR
)/xombrero
88 rm -f
$(DESTDIR
)$(MANDIR
)/man1
/xombrero
.1
89 rm -f
$(DESTDIR
)$(APPDIR
)/xombrero.desktop
90 rm -f
$(DESTDIR
)$(RESDIR
)/xombreroicon16.png
91 rm -f
$(DESTDIR
)$(RESDIR
)/xombreroicon32.png
92 rm -f
$(DESTDIR
)$(RESDIR
)/xombreroicon48.png
93 rm -f
$(DESTDIR
)$(RESDIR
)/xombreroicon64.png
94 rm -f
$(DESTDIR
)$(RESDIR
)/xombreroicon128.png
95 rm -f
$(DESTDIR
)$(RESDIR
)/xombreroicon256.png
96 rm -f
$(DESTDIR
)$(RESDIR
)/xombrero.css
97 rm -f
$(DESTDIR
)$(RESDIR
)/favicon.ico
98 rm -f
$(DESTDIR
)$(RESDIR
)/tordisabled.ico
99 rm -f
$(DESTDIR
)$(RESDIR
)/torenabled.ico
100 rm -f
$(DESTDIR
)$(RESDIR
)/tld-rules
101 rm -f
$(DESTDIR
)$(RESDIR
)/style.css
102 rm -f
$(DESTDIR
)$(RESDIR
)/hsts-preload
103 rm -f
${DESTDIR}$(RESDIR
)/user-agent-headers
104 rm -f
${DESTDIR}$(RESDIR
)/http-accept-headers
105 if
[ -d
$(DESTDIR
)$(RESDIR
) ]; then rmdir
$(DESTDIR
)$(RESDIR
); fi
107 rm -f xombrero
$(OBJS
) $(DEPS
)
114 .PHONY
: all install clean