# See COPYING file for copyright and license details. include config.mk NAME = getxbook SRC = getgbook.c getabook.c LIB = util.o SCRIPTS = makebookpdf.sh getxbookgui DOC = README COPYING INSTALL LEGAL BIN = $(SRC:.c=) MAN = $(SRC:.c=.1) OBJ = $(SRC:.c=.o) $(LIB) all: $(BIN) $(OBJ): util.h config.mk $(BIN): util.a .o: @echo LD $@ @$(LD) -o $@ $< util.a $(LDFLAGS) .c.o: @echo CC $< @$(CC) -c $(CFLAGS) $< util.a: $(LIB) @echo AR $@ @$(AR) -r -c $@ $(LIB) @ranlib $@ install: all mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f $(BIN) $(SCRIPTS) $(DESTDIR)$(PREFIX)/bin mkdir -p $(DESTDIR)$(MANPREFIX)/man1 for f in $(MAN); do sed "s/VERSION/$(VERSION)/g" < $$f > $(DESTDIR)$(MANPREFIX)/man1/$$f; done uninstall: cd $(DESTDIR)$(PREFIX)/bin && rm -f $(BIN) $(SCRIPTS) cd $(DESTDIR)$(MANPREFIX)/man1 && rm -f $(MAN) clean: rm -f -- $(BIN) $(OBJ) util.a index.html dist: mkdir -p $(NAME)-$(VERSION) cp $(SRC) $(SCRIPTS) $(DOC) util.h util.c Makefile config.mk $(NAME)-$(VERSION) tar c $(NAME)-$(VERSION) | bzip2 -c > $(NAME)-$(VERSION).tar.bz2 gpg -b < $(NAME)-$(VERSION).tar.bz2 > $(NAME)-$(VERSION).tar.bz2.sig rm -rf $(NAME)-$(VERSION) echo $(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION).tar.bz2.sig index.html: doap.ttl README echo making webpage echo "