|
|
@ -34,6 +34,7 @@ STRIP = $(shell which strip) |
|
|
|
PANDOC = $(shell which pandoc) |
|
|
|
GIT2DEBCL = ./tools/git2debcl |
|
|
|
CPPFIND = ./tools/cppfind |
|
|
|
RPMBUILD = $(shell which rpmbuild) |
|
|
|
|
|
|
|
ifeq ($(PKGCONFIG),"") |
|
|
|
$(error "pkg-config not installed") |
|
|
@ -118,7 +119,7 @@ obj/%.o: src/%.cpp |
|
|
|
$(CXX) $(CFLAGS) -c $< -o $@ |
|
|
|
|
|
|
|
clean: |
|
|
|
$(RM) -rf obj "$(TARGET)" "$(MANPAGE)" |
|
|
|
$(RM) -rf obj "$(TARGET)" "$(MANPAGE)" rpmbuild |
|
|
|
$(FIND) -name "*~" -delete |
|
|
|
|
|
|
|
distclean: clean |
|
|
@ -154,6 +155,13 @@ deb: |
|
|
|
$(GIT2DEBCL) $(TARGET) $(VERSION) > debian/changelog |
|
|
|
$(GIT) buildpackage --git-ignore-new |
|
|
|
|
|
|
|
rpm: |
|
|
|
$(eval VERSION := $(subst -,_,$(shell $(GIT) describe --always --tags --dirty))) |
|
|
|
$(RPMBUILD) -bb $(TARGET).spec \
|
|
|
|
--define "_topdir $(CURDIR)/rpmbuild" \
|
|
|
|
--define "_builddir $(CURDIR)" \
|
|
|
|
--define "pkg_version $(VERSION)" |
|
|
|
|
|
|
|
.PHONY: all clean install help |
|
|
|
|
|
|
|
include $(wildcard obj/*.d) |