Suppressed some warnings.
[mpdm.git] / makefile.in
blob17ee1a00374cdda8d3583f4427b7428f1f3da136
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
12 MP_DOCCER_DOCS=doc/mpdm_api.txt
13 G_AND_MP_DOCS=doc/mpdm_api.html
15 OBJS=mpdm_v.o mpdm_a.o mpdm_h.o mpdm_d.o mpdm_s.o mpdm_f.o \
16 mpdm_r.o gnu_regex.o
18 DIST_TARGET=/tmp/$(PROJ)-$(VERSION)
20 ##################################################################
22 version:
23 @echo $(VERSION)
25 .c.o:
26 $(CC) $(CFLAGS) `cat config.cflags` -c $<
28 dep:
29 gcc -MM *.c > makefile.depend
31 $(LIB): $(OBJS)
32 $(AR) rv $(LIB) $(OBJS)
34 stress: stress.c $(LIB)
35 $(CC) $(CFLAGS) `cat config.ldflags` stress.c -L. -lmpdm -o $@
37 .SUFFIXES: .txt .html
39 .txt.html:
40 grutatxt < $< > $@
42 doc/mpdm_api.txt: mpdm_*.c
43 mp_doccer mpdm_*.c -o doc/mpdm_api -f grutatxt \
44 -t "MPDM C API" \
45 -b "This reference documents version $(VERSION) of the C API." \
46 -a 'Angel Ortega - angel@triptico.com'
48 docs: $(DOCS)
50 docsclean:
51 rm -f doc/mpdm_api.txt doc/*.html
53 clean:
54 rm -f $(TARGET) $(LIB) $(OBJS) *.o tags *.tar.gz stress
56 distclean: clean
57 rm -f config.h config.cflags config.ldflags makefile.opts .config.log Makefile
59 realclean: distclean docsclean
61 realdistclean: realclean
63 distcopy: distclean
64 mkdir -p $(DIST_TARGET) ; \
65 tar cf - * | (cd $(DIST_TARGET) ; tar xf -)
67 dist: distcopy
68 (cd /tmp ; tar czf - $(PROJ)-$(VERSION)/* ) > $(PROJ)-$(VERSION).tar.gz ; \
69 rm -rf $(DIST_TARGET)
71 .po.mo:
72 msgfmt -o $@ $<
74 build-mo:
75 for a in po/*.po ; do \
76 B=`basename $$a .po` ; \
77 mkdir -p po/$$B/LC_MESSAGES ; \
78 msgfmt -o po/$$B/LC_MESSAGES/stress.mo $$a ; \
79 done
81 installdoc:
82 install -d $(DOCDIR)
83 install -m 644 doc/* $(DOCDIR)/
84 for f in README AUTHORS COPYING TODO RELEASE_NOTES ; do \
85 [ -f $$f ] && install -m 644 $$f $(DOCDIR)/$$f.$(PROJ) ; \
86 done