Updated TODO.
[ahxm.git] / makefile.in
blobd15f85f3e2c64f3f4c1959042924d6ac217ff780
1 # -*- Mode: sh
3 PROJ=ahxm
4 APPNAME=ahxm
5 LIB=lib$(PROJ).a
6 BIN=ahxm midiin
8 OBJS=support.o sha1.o song.o compiler_l.o compiler_y.o \
9 ss_core.o ss_input.o ss_gen.o ss_eff.o ss_ins.o ss_song.o \
10 ss_output.o ss_outdev.o midi_song.o main.o
12 DOCS=doc/ahs_overview_i.html doc/ahs_overview_ii.html \
13 doc/ahs_appendix_1.html doc/ahxm_index.html doc/ahxm_api.html
15 all: $(BIN) $(DOCS)
17 DIST_TARGET=/tmp/$(PROJ)-$(VERSION)
19 ##################################################################
21 version:
22 @echo $(VERSION)
24 .c.o:
25 $(CC) $(CFLAGS) `cat config.cflags` -c $<
27 y.tab.h: compiler.y
28 $(YACC) -d compiler.y
30 y.tab.c: compiler.y
31 $(YACC) -d compiler.y
33 lex.yy.c: compiler.l
34 flex compiler.l
36 compiler_l.o: lex.yy.c y.tab.h
37 $(CC) $(CFLAGS) -c lex.yy.c -o compiler_l.o
39 compiler_y.o: y.tab.c
40 $(CC) $(CFLAGS) -c y.tab.c -o compiler_y.o
42 # library
43 $(LIB): $(OBJS)
44 ar rv $(LIB) $(OBJS)
46 # binaries
47 ahxm: $(LIB)
48 $(CC) $(CFLAGS) $(LIB) -lm `cat config.ldflags` -o $@
50 wav: wav.c $(LIB)
51 $(CC) $(CFLAGS) wav.c $(LIB) -lm `cat config.ldflags` -o $@
53 midiin: midiin.c $(LIB)
54 $(CC) $(CFLAGS) midiin.c $(LIB) -lm `cat config.ldflags` -o $@
56 clean:
57 rm -f $(BIN) $(LIB) $(OBJS) *.o tags *.tar.gz
59 realclean: clean
60 rm -f y.tab.c y.tab.h lex.yy.c
62 distclean: realclean
63 rm -f config.h config.cflags config.ldflags makefile.opts .config.log Makefile
65 .SUFFIXES: .txt .html
67 .txt.html:
68 grutatxt -i $< -o $@
70 doc/ahxm_api.html: *.c
71 -mp_doccer *.c -o doc/ahxm_api -f html1 \
72 -t "Ann Hell Ex Machina API ($(VERSION))" \
73 -a 'Angel Ortega - angel@triptico.com'
75 docsclean:
76 rm -f doc/*.html
78 distcopy: distclean docs y.tab.c y.tab.h lex.yy.c
79 mkdir -p $(DIST_TARGET) ; \
80 tar cf - * | (cd $(DIST_TARGET) ; tar xf -)
82 dist: distcopy
83 (cd /tmp ; tar czf - $(PROJ)-$(VERSION)/* ) > $(PROJ)-$(VERSION).tar.gz ; \
84 rm -rf $(DIST_TARGET)
86 dep:
87 gcc -MM *.c > makefile.depend
89 install:
90 install $(APPNAME) $(PREFIX)/bin
91 ./mkinstalldirs $(PREFIX)/share/doc/$(PROJ)
92 install -m 644 $(DOCS) $(PREFIX)/share/doc/$(PROJ)
93 install -m 644 README RELEASE_NOTES TODO $(PREFIX)/share/doc/$(PROJ)
95 test:
96 ./test.sh