Makefile (835B)
1 VERSION = 0.0 2 3 PREFIX = /usr/local 4 MANPREFIX = $(PREFIX)/man 5 6 CFLAGS = -I/usr/local/include 7 LDFLAGS = -L /usr/local/lib 8 LDLIBS = -lsndfile -lmpg123 -lsndio -lasound -lvorbisfile -lsoxr 9 10 OBJ =\ 11 alsa.o\ 12 cmd.o\ 13 decoder.o\ 14 fifo.o\ 15 mp3.o\ 16 notify.o\ 17 output.o\ 18 pcm.o\ 19 playlist.o\ 20 sad.o\ 21 sndio.o\ 22 vorbis.o\ 23 wav.o 24 25 BIN = sad 26 27 # non-OpenBSD 28 OBJ += compat/reallocarray.o 29 OBJ += compat/strlcat.o 30 OBJ += compat/strlcpy.o 31 OBJ += compat/strtonum.o 32 CFLAGS += -DCOMPAT 33 34 all: $(BIN) 35 36 $(BIN): $(OBJ) 37 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS) 38 39 $(OBJ): arg.h compat.h config.h queue.h sad.h 40 41 install: all 42 mkdir -p $(DESTDIR)$(PREFIX)/bin 43 cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin 44 45 uninstall: 46 rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) 47 48 clean: 49 rm -f $(BIN) $(OBJ) 50 51 .SUFFIXES: .def.h 52 53 .def.h.h: 54 cp $< $@ 55 56 .PHONY: 57 all install uninstall clean