Makefile (986B)
1 include config.mk 2 3 # SRC = usynth.c fm.c machine.c midi.c operator.c wavetable.c 4 SRC = midi.c machine.c wavetable.c build.c util.c 5 6 OBJ = ${SRC:.c=.o} 7 8 9 BIN = progsynth 10 MAN = $(BIN).1 11 # OBJ = $(BIN:=.o) fm.o midi.o\ 12 # machine.o operator.o wavetable.o 13 14 all: usynth 15 16 .c.o: 17 ${CC} -c ${CFLAGS} $< 18 19 ${OBJ}: 20 21 usynth: $@.o ${OBJ} 22 ${CC} -o $@ $@.o ${OBJ} ${LDFLAGS} 23 24 miditest: miditest.c 25 ${CC} miditest.c -o $@ -lsndio 26 27 buildtest: buildtest.c ${OBJ} 28 ${CC} -o $@ buildtest.c ${OBJ} ${LDFLAGS} 29 30 wavetable.o: wavetable.h 31 32 machine.o: machine.h 33 34 install: all 35 mkdir -p ${DESTDIR}${PREFIX}/bin/ 36 cp -f usynth $(DESTDIR)${PREFIX}/bin/ 37 chmod 755 ${DESTDIR}${PREFIX}/bin/pcmprint 38 mkdir -p ${DESTDIR}${MANPREFIX}/man1 39 cp -f usynth.1 ${DESTDIR}${MANPREFIX}/man1/pcmprint.1 40 chmod 644 ${DESTDIR}${MANPREFIX}/man1/pcmprint.1 41 42 uninstall: 43 rm -f ${DESTDIR}${PREFIX}/bin/usynth\ 44 ${DESTDIR}${MANDIR}/usynth.1 45 46 clean: 47 rm -f usynth buildtest miditest usynth.o ${OBJ} 48 49 .PHONY: all clean instal uninstall