Updated to build mpdm_api.txt and mpdm_api.html.
[mpdm.git] / makefile.in
blob3d3ef3eec556d29a20575abe5d1512f755b677ff
1 # -*- Mode: sh
3 TARGET=libmpdm.a
4 LIB=$(TARGET)
6 all: $(TARGET) docs
8 PROJ=mpdm
10 ADD_DOCS=RELEASE_NOTES
11 GRUTATXT_DOCS=doc/mpdm_overview.html doc/mpdm_api.html
12 MP_DOCCER_DOCS=doc/mpdm_api.txt
14 OBJS=mpdm_v.o mpdm_a.o mpdm_h.o mpdm_d.o mpdm_s.o mpdm_f.o \
15 mpdm_r.o gnu_regex.o
17 DIST_TARGET=/tmp/$(PROJ)-$(VERSION)
19 ##################################################################
21 version:
22 @echo $(VERSION)
24 .c.o:
25 $(CC) $(CFLAGS) `cat config.cflags` -c $<
27 dep:
28 gcc -MM *.c > makefile.depend
30 $(LIB): $(OBJS)
31 $(AR) rv $(LIB) $(OBJS)
33 stress: stress.c $(LIB)
34 $(CC) $(CFLAGS) `cat config.ldflags` stress.c -L. -lmpdm -o $@
36 .SUFFIXES: .txt .html
38 .txt.html:
39 grutatxt < $< > $@
41 doc/mpdm_api.txt: mpdm_*.c
42 mp_doccer mpdm_*.c -o doc/mpdm_api -f grutatxt \
43 -t "MPDM C API ($(VERSION))" \
44 -a 'Angel Ortega - angel@triptico.com'
46 docs: $(DOCS)
48 docsclean:
49 rm -f doc/*.html
51 clean:
52 rm -f $(TARGET) $(LIB) $(OBJS) *.o tags *.tar.gz stress
54 distclean: clean
55 rm -f config.h config.cflags config.ldflags makefile.opts .config.log Makefile
57 realclean: distclean docsclean
59 realdistclean: realclean
61 distcopy: distclean
62 mkdir -p $(DIST_TARGET) ; \
63 tar cf - * | (cd $(DIST_TARGET) ; tar xf -)
65 dist: distcopy
66 (cd /tmp ; tar czf - $(PROJ)-$(VERSION)/* ) > $(PROJ)-$(VERSION).tar.gz ; \
67 rm -rf $(DIST_TARGET)
69 .po.mo:
70 msgfmt -o $@ $<
72 build-mo:
73 for a in po/*.po ; do \
74 B=`basename $$a .po` ; \
75 mkdir -p po/$$B/LC_MESSAGES ; \
76 msgfmt -o po/$$B/LC_MESSAGES/stress.mo $$a ; \
77 done
79 installdoc:
80 install -d $(DOCDIR)
81 install -m 644 doc/* $(DOCDIR)/
82 for f in README AUTHORS COPYING TODO RELEASE_NOTES ; do \
83 [ -f $$f ] && install -m 644 $$f $(DOCDIR)/$$f.$(PROJ) ; \
84 done