Makefile (1104B)
1 include Makefile.configure 2 VERSION=1.9.4 3 4 OBJS = main.o string.o utf8.o parser.o compats.o 5 6 all: scdoc scdoc.1 scdoc.5 scdoc.pc 7 8 scdoc: $(OBJS) 9 $(CC) -g -o $@ $(OBJS) 10 11 scdoc.1: scdoc.1.scd scdoc 12 ./scdoc scdoc.1.scd > $@ 13 14 scdoc.5: scdoc.5.scd scdoc 15 ./scdoc scdoc.5.scd > $@ 16 17 scdoc.pc: scdoc.pc.in 18 sed -e 's:@prefix@:$(PREFIX):g' \ 19 -e 's:@version@:$(VERSION):g' scdoc.pc.in > $@ 20 21 main.o: string.h utf8.h parser.h 22 string.o: string.h utf8.h 23 utf8.o: utf8.h 24 parser.o: utf8.h parser.h 25 26 clean: 27 rm -rf $(OBJS) scdoc scdoc.1 scdoc.5 scdoc.pc 28 29 install: all 30 mkdir -p $(DESTDIR)$(PREFIX)/bin 31 mkdir -p $(DESTDIR)$(PREFIX)/man/man1 32 mkdir -p $(DESTDIR)$(PREFIX)/man/man5 33 mkdir -p $(DESTDIR)$(PCDIR) 34 install -m 0755 scdoc $(DESTDIR)$(PREFIX)/bin/scdoc 35 install -m 0644 scdoc.1 $(DESTDIR)$(MANDIR)/man1/scdoc.1 36 install -m 0644 scdoc.5 $(DESTDIR)$(MANDIR)/man1/scdoc.5 37 install -m 0644 scdoc.pc $(DESTDIR)$(PCDIR)/scdoc.pc 38 39 dist: scdoc-$(VERSION).tgz 40 41 scdoc-$(VERSION).tgz: 42 git archive --prefix "scdoc-$(VERSION)/" $(VERSION) | 43 gzip > $@ 44 45 check: scdoc scdoc.1 scdoc.5 46 @find test -perm -111 -exec '{}' \;