New function locate_file(), that returns the resolved path to a file
[ahxm.git] / makefile.in
blob25be2ab15d3eada52233a44cde656d40ea056a42
1 # -*- Mode: sh
3 PROJ=annhell
4 LIB=lib$(PROJ).a
5 DOCS=
6 BIN=annhell midiin
8 OBJS=support.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 all: $(BIN)
14 ##################################################################
16 version:
17 @echo $(VERSION)
19 ChangeLog:
20 cvs2cl --fsf --stdout > Changelog
22 .c.o:
23 $(CC) $(CFLAGS) `cat config.cflags` -c $<
25 y.tab.h: compiler.y
26 $(YACC) -d compiler.y
28 y.tab.c: compiler.y
29 $(YACC) -d compiler.y
31 lex.yy.c: compiler.l
32 flex compiler.l
34 compiler_l.o: lex.yy.c y.tab.h
35 $(CC) $(CFLAGS) -c lex.yy.c -o compiler_l.o
37 compiler_y.o: y.tab.c
38 $(CC) $(CFLAGS) -c y.tab.c -o compiler_y.o
40 # library
41 $(LIB): $(OBJS)
42 ar rv $(LIB) $(OBJS)
44 # binaries
45 annhell: $(LIB)
46 $(CC) $(LIB) -lm `cat config.ldflags` -o $@
48 wav: wav.c $(LIB)
49 $(CC) $(CFLAGS) wav.c $(LIB) -lm `cat config.ldflags` -o $@
51 midiin: midiin.c $(LIB)
52 $(CC) $(CFLAGS) midiin.c $(LIB) -lm `cat config.ldflags` -o $@
54 clean:
55 rm -f $(BIN) $(LIB) $(OBJS) *.o tags *.tar.gz
57 realclean: clean
58 rm -f y.tab.c y.tab.h lex.yy.c
60 distclean: realclean
61 rm -f config.h config.cflags config.ldflags makefile.opts .config.log Makefile
63 dist: distclean ChangeLog y.tab.c y.tab.h lex.yy.c
64 cd .. ; ln -s $(PROJ) $(PROJ)-$(VERSION); \
65 tar czvf $(PROJ)-$(VERSION)/$(PROJ)-$(VERSION).tar.gz --exclude=CVS $(PROJ)-$(VERSION)/* ; \
66 rm $(PROJ)-$(VERSION)
68 dep:
69 gcc -MM *.c > makefile.depend
71 install:
72 install annhell $(PREFIX)/bin
73 # mkdir -p $(PREFIX)/share/doc/$(PROJ)
74 # cp $(DOCS) $(PREFIX)/share/doc/$(PROJ)