Fix build on FreeBSD, thanks to Guy Yur.
[dhcpcd-ui] / mk / icon.mk
1 include ${MKDIR}/sys.mk
2
3 SIZEDIR?=       ${SIZE}x${SIZE}
4 ICONDIR?=       ${PREFIX}/share/dhcpcd/icons
5 IDIR=           ${ICONDIR}/hicolor/${SIZEDIR}/${CATEGORY}
6
7 RSVG_CONVERT?=  rsvg-convert
8
9 ICONS+=         ${SRCS:.svg=.png}
10 CLEANFILES+=    ${SRCS:.svg=.png}
11
12 .SUFFIXES: .svg .png
13
14 all: ${ICONS}
15
16 .svg.png:
17         ${RSVG_CONVERT} -h ${SIZE} -w ${SIZE} $< >$@
18
19 _iconinstall: ${ICONS}
20         ${INSTALL} -d ${DESTDIR}${IDIR}
21         ${INSTALL} -m ${NONBINMODE} ${ICONS} ${DESTDIR}${IDIR}
22
23 proginstall:
24
25 install: _iconinstall
26
27 clean:
28         rm -f ${CLEANFILES}