Blame Makefile

William Pitcock dfe832
all: update-ca-certificates c_rehash certdata.stamp
William Pitcock dfe832
William Pitcock dfe832
update-ca-certificates: update-ca.c
William Pitcock dfe832
	${CC} ${CFLAGS} -o $@ update-ca.c ${LDFLAGS}
William Pitcock dfe832
William Pitcock dfe832
c_rehash: c_rehash.c
William Pitcock dfe832
	${CC} ${CFLAGS} -o $@ c_rehash.c -lcrypto ${LDFLAGS}
William Pitcock dfe832
Ørjan Malde a78577
certdata2pem: certdata2pem.c
Ørjan Malde a78577
	${CC} ${CFLAGS} -o $@ certdata2pem.c ${LDFLAGS}
Ørjan Malde a78577
William Pitcock dfe832
certdata.stamp:
Ørjan Malde a78577
	./certdata2pem
William Pitcock dfe832
	touch $@
William Pitcock dfe832
William Pitcock dfe832
install: all
William Pitcock dfe832
	install -d -m755 ${DESTDIR}/etc/ca-certificates/update.d \
William Pitcock dfe832
		${DESTDIR}/usr/bin \
William Pitcock dfe832
		${DESTDIR}/usr/sbin \
William Pitcock dfe832
		${DESTDIR}/usr/share/ca-certificates \
William Pitcock dfe832
		${DESTDIR}/usr/local/share/ca-certificates \
William Pitcock dfe832
		${DESTDIR}/etc/ssl/certs
William Pitcock dfe832
William Pitcock dfe832
	for cert in *.crt; do \
William Pitcock dfe832
		install -D -m644 $$cert ${DESTDIR}/usr/share/ca-certificates/mozilla/$$cert; \
William Pitcock dfe832
	done
William Pitcock dfe832
William Pitcock dfe832
	install -D -m644 update-ca-certificates.8 ${DESTDIR}/usr/share/man/man8/update-ca-certificates.8
William Pitcock dfe832
	install -m755 update-ca-certificates ${DESTDIR}/usr/sbin
William Pitcock dfe832
	install -m755 c_rehash ${DESTDIR}/usr/bin
William Pitcock dfe832
William Pitcock dfe832
clean:
William Pitcock dfe832
	rm -rf update-ca-certificates c_rehash certdata.stamp *.crt
William Pitcock dfe832
William Pitcock dfe832
.PHONY: install clean