# Generated automatically from Makefile.in by configure.
# Makefile for
# lrzip. This is processed by configure to produce the final
# Makefile

prefix=/usr
exec_prefix=${prefix}
INSTALL_BIN=$(exec_prefix)/bin
INSTALL_MAN=$(prefix)/man

LIBS=-llzo2 -lbz2  lzma/7zip/Compress/LZMA_Lib/liblzma.a
CC=gcc
CXX=c++
CFLAGS=-O2 -march=pentium4 -fomit-frame-pointer
CXXFLAGS=-O2 -march=pentium4 -fomit-frame-pointer

INSTALLCMD=/usr/bin/install -c

srcdir=.
SHELL=/bin/sh


.SUFFIXES:
.SUFFIXES: .c .o

OBJS= rzip.o runzip.o main.o stream.o util.o crc32.o

# note that the -I. is needed to handle config.h when using VPATH
.c.o:
	$(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@

all: liblzma lrzip

man: rzip.1

install: all
	-mkdir -p ${INSTALL_BIN}
	${INSTALLCMD} -m 755 lrzip ${INSTALL_BIN}
	-mkdir -p ${INSTALL_MAN}/man1
	${INSTALLCMD} -m 644 $(srcdir)/lrzip.1 ${INSTALL_MAN}/man1/

liblzma: 
	cd lzma/7zip/Compress/LZMA_Lib/ && make && cd ../../../../

lrzip: $(OBJS)
	$(CXX) $(CFLAGS) -o lrzip $(OBJS) $(LIBS)

lrzip.1: lrzip.yo
	yodl2man -o lrzip.1 lrzip.yo

web/lrzip-man.html: lrzip.yo
	mkdir -p man
	yodl2html -o web/lrzip-man.html lrzip.yo

docs: lrzip.1 web/lrzip-man.html

clean:
	cd lzma/7zip/Compress/LZMA_Lib/ && make clean && cd ../../../../
	rm -f *~ $(OBJS) lrzip config.cache config.log config.status
