LIST and HASH descriptions updated in the internals document (Closes: #1102).
[mpsl.git] / makefile.in
blob1576c2409acd59d1ff4baac6ada209f80d208dd3
1 # -*- Mode: sh
3 LIB=libmpsl.a
5 all: $(TARGET) docs
7 PROJ=mpsl
8 DOCS=doc/index.html doc/mpsl_overview.html doc/mpsl_internals.html \
9 doc/mpsl_quickref.ps doc/mpsl_api.html
11 OBJS=mpsl_c.o mpsl_l.o mpsl_m.o mpsl_y.o mpsl_f.o
13 DIST_TARGET=/tmp/$(PROJ)-$(VERSION)
15 ##################################################################
17 version:
18 @echo $(VERSION)
20 .c.o:
21 $(CC) $(CFLAGS) `cat config.cflags` -c $<
23 y.tab.h: mpsl.y
24 $(YACC) -d mpsl.y
26 y.tab.c: mpsl.y
27 $(YACC) -d mpsl.y
29 lex.yy.c: mpsl.l
30 flex mpsl.l
32 mpsl_l.o: lex.yy.c y.tab.h
33 $(CC) $(CFLAGS) `cat config.cflags` -c lex.yy.c -o mpsl_l.o
35 mpsl_y.o: y.tab.c
36 $(CC) $(CFLAGS) `cat config.cflags` -c y.tab.c -o mpsl_y.o
38 $(MPDM)/libmpdm.a:
39 ( cd $(MPDM); $(MAKE) )
41 dep:
42 gcc `cat config.cflags` -MM *.c | \
43 sed -e 's;$(MPDM)/;$$(MPDM)/;g' > makefile.depend
45 $(LIB): $(OBJS)
46 $(AR) rv $(LIB) $(OBJS)
48 $(TARGET): $(LIB) $(MPDM)/libmpdm.a
49 $(CC) $(CFLAGS) -L. -lmpsl `cat config.ldflags` -o $@
51 stress: stress.c $(LIB) $(MPDM)/libmpdm.a
52 $(CC) $(CFLAGS) `cat config.cflags` stress.c \
53 -L. -lmpsl `cat config.ldflags` -o $@
55 clean:
56 rm -f $(TARGET) $(LIB) $(OBJS) *.o tags *.tar.gz stress
58 realclean: clean
59 rm -f y.tab.c y.tab.h lex.yy.c
61 distclean: clean y.tab.c y.tab.h lex.yy.c
62 rm -f config.h config.cflags config.ldflags makefile.opts .config.log Makefile
64 doc/index.html: doc/index.txt
65 -grutatxt -i $< -o $@
67 doc/mpsl_overview.html: doc/mpsl_overview.txt
68 -grutatxt -i $< -o $@
70 doc/mpsl_internals.html: doc/mpsl_internals.txt
71 -grutatxt -i $< -o $@
73 doc/mpsl_quickref.ps: doc/mpsl_quickref.txt
74 -./mpsl scripts/mkquickref.mpsl < $< > $@
76 doc/mpsl_api.html: mpsl_*.c mpsl.y
77 mkdir -p doc
78 -mp_doccer mpsl_*.c mpsl.y -o doc/mpsl_api -f html1 \
79 -t "MPSL C API ($(VERSION))" \
80 -a 'Angel Ortega - angel@triptico.com'
82 docs: $(DOCS)
84 docsclean:
85 rm -f doc/*.html
87 distcopy: distclean
88 mkdir -p $(DIST_TARGET) ; \
89 tar cf - * | (cd $(DIST_TARGET) ; tar xf -)
91 dist: distcopy
92 (cd /tmp ; tar czf - $(PROJ)-$(VERSION)/* ) > $(PROJ)-$(VERSION).tar.gz ; \
93 rm -rf $(DIST_TARGET)
95 install: installdoc
96 install $(TARGET) $(PREFIX)/bin
98 installdoc:
99 -install -m 644 $(DOCS) $(DOCDIR)