man:
@$(MAKE) $(MFLAGS) -C doc man
+install: $(TARGET) man
+ install -d $(BINDIR)
+ install -m 755 $(TARGET) $(BINDIR)
+ @$(MAKE) $(MFLAGS) -C doc install
+
+uninstall:
+ $(RM) $(BINDIR)$(TARGET)
+ @$(MAKE) $(MFLAGS) -C doc uninstall
+
clean:
@$(MAKE) $(MFLAGS) -C doc clean
$(RM) $(OBJ) $(DOBJ) $(TARGET) $(DTARGET)
VERSION = 0.1.3
PROJECT = vimp
-PREFIX ?= /usr/local
-BINDIR ?= $(PREFIX)/bin/
-MANDIR ?= $(PREFIX)/share/man/
+PREFIX ?= /usr/local/
+BINDIR ?= $(PREFIX)bin/
+MANDIR ?= $(PREFIX)share/man/
#----------------compile options---------------------
LIBS = libsoup-2.4
include ../config.mk
+MANDIR1 = $(MANDIR)man1/
+MAN1 = $(PROJECT).1
+
all: man
-man: vimp.1
+man: $(MAN1)
%.1: %.1.txt
@echo "${PP} $< > $@"
@$(PP) -DVERSION=$(VERSION) -DPROJECT=$(PROJECT) $< > $@
+install: man
+ install -d $(MANDIR1)
+ install -m 644 $(MAN1) $(MANDIR1)$(MAN1)
+
+uninstall:
+ $(RM) $(MANDIR1)$(MAN1)
+
clean:
$(RM) *.1