1# Makefile for linux 2 3# install locations 4PREFIX?=/usr/local 5BINDIR=$(PREFIX)/bin 6MANDIR=$(PREFIX)/man/man1 7 8# non-base dependency build info 9CDEPS=`taglib-config --cflags` 10LDEPS=`taglib-config --libs` -ltag_c 11 12# build info 13CC?=/usr/bin/cc 14CFLAGS+=-c -std=gnu99 -D_GNU_SOURCE -Wall -Wextra -Wno-unused-value $(CDEPS) $(CDEBUG) 15LDFLAGS+=-lm -lncurses -lutil $(LDEPS) 16 17OBJS=commands.o compat.o e_commands.o \ 18 keybindings.o medialib.o meta_info.o \ 19 paint.o player.o playlist.o \ 20 str2argv.o uinterface.o vitunes.o \ 21 mplayer.o socket.o player_utils.o 22 23VPATH = players 24 25# main targets 26 27.PHONY: debug clean install uninstall publish-repos man-debug 28 29vitunes: $(OBJS) 30 $(CC) -o $@ $(LDFLAGS) $(OBJS) 31 32.c.o: 33 $(CC) $(CFLAGS) $< 34 35debug: 36 make CDEBUG="-DDEBUG -g" 37 38clean: 39 rm -f *.o 40 rm -f vitunes vitunes.core vitunes-debug.log 41 42install: vitunes 43 /usr/bin/install -c -m 0555 vitunes $(BINDIR) 44 /usr/bin/install -c -m 0444 vitunes.1 $(MANDIR) 45 46uninstall: 47 rm -f $(BINDIR)/vitunes 48 rm -f $(MANDIR)/vitunes.1 49 50