# This file is part of Vamps.
#
# Vamps is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Vamps is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Vamps; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA


PREFIX    ?= /usr/local

CC         = gcc
CFLAGS    ?= -O2  -g -D_LARGEFILE_SOURCE -DLARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
	       -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_REENTRANT
CFLAGS    += -Wall
LDFLAGS   += -s
LOADLIBES += -lm -pthread -ldvdread

INSTALL   ?= install


all:			vamps_lxdvdrip play_cell_lxdvdrip

vamps_lxdvdrip:		vamps_lxdvdrip.o requant.o

vamps_lxdvdrip.o:	requant.h

requant.o:		requant.h

play_cell_lxdvdrip:	play_cell_lxdvdrip.o

install:	all
		$(INSTALL) -d $(PREFIX)/bin
		$(INSTALL) -m 755 vamps_lxdvdrip $(PREFIX)/bin
		$(INSTALL) -m 755 play_cell_lxdvdrip $(PREFIX)/bin

uninstall:
		rm -f $(PREFIX)/bin/vamps_lxdvdrip
		rm -f $(PREFIX)/bin/play_cell_lxdvdrip

clean:
		rm -f *_lxdvdrip  *.o *~ core
