use install instead of cp and mkdir for install
[xxxterm.git] / Makefile
blob1891ea83fcf013f43f57115f69a44d1078ae9585
1 PREFIX?=/usr/local
2 BINDIR=${PREFIX}/bin
4 PROG=xxxterm
5 MAN=xxxterm.1
7 SRCS= cookie.c inspector.c marco.c about.c whitelist.c settings.c xxxterm.c
8 CFLAGS+= -O2
9 DEBUG= -ggdb3
10 LDADD= -lutil -lgcrypt
11 LIBS+= gtk+-2.0
12 LIBS+= webkit-1.0
13 LIBS+= libsoup-2.4
14 LIBS+= gnutls
15 LIBS+= gthread-2.0
16 GTK_CFLAGS!= pkg-config --cflags $(LIBS)
17 GTK_LDFLAGS!= pkg-config --libs $(LIBS)
18 CFLAGS+= $(GTK_CFLAGS) -Wall
19 LDFLAGS+= $(GTK_LDFLAGS)
20 BUILDVERSION != sh "${.CURDIR}/buildver.sh"
21 .if !${BUILDVERSION} == ""
22 CPPFLAGS+= -DXXXTERM_BUILDSTR=\"$(BUILDVERSION)\"
23 .endif
25 MANDIR= ${PREFIX}/man/man
27 CLEANFILES += ${.CURDIR}/javascript.h xxxterm.cat1 xxxterm.core
29 ${.CURDIR}/javascript.h: hinting.js input-focus.js
30 perl ${.CURDIR}/js-merge-helper.pl ${.CURDIR}/hinting.js \
31 ${.CURDIR}/input-focus.js > ${.CURDIR}/javascript.h
33 beforeinstall:
34 install -m 755 -d ${PREFIX}/share/xxxterm
35 install -m 644 ${.CURDIR}/xxxtermicon.png ${PREFIX}/share/xxxterm
36 install -m 644 ${.CURDIR}/xxxtermicon16.png ${PREFIX}/share/xxxterm
37 install -m 644 ${.CURDIR}/xxxtermicon32.png ${PREFIX}/share/xxxterm
38 install -m 644 ${.CURDIR}/xxxtermicon48.png ${PREFIX}/share/xxxterm
39 install -m 644 ${.CURDIR}/xxxtermicon64.png ${PREFIX}/share/xxxterm
40 install -m 644 ${.CURDIR}/xxxtermicon128.png ${PREFIX}/share/xxxterm
41 install -m 644 ${.CURDIR}/style.css ${PREFIX}/share/xxxterm
43 ${PROG} ${OBJS} beforedepend: ${.CURDIR}/javascript.h
45 # clang targets
46 .if ${.TARGETS:M*analyze*}
47 CC=clang
48 CXX=clang++
49 CPP=clang -E
50 CFLAGS+=--analyze
51 .elif ${.TARGETS:M*clang*}
52 CC=clang
53 CXX=clang++
54 CPP=clang -E
55 .endif
57 analyze: all
58 clang: all
60 .include <bsd.prog.mk>