#
# This is Makefile, part of the source code for
#
# BMV version 1.1
# copyright by Jan Kybic, January 1995
#
# Jan Kybic, Prosecka 681, Praha 9, Czech Republic, <kybic@earn.cvut.cz>
#
# BMV is a very simple viewer of images in the pbm(5)-raw format
#     and front end for GhostScript		
#     based on Svgalib library for Linux
#
# BMV is distributed under GNU GPL (General Public License),
#   you can obtain a copy from many FTP sites if you are interested in details
#
#
#
#
#
# This Makefile is really a simple one, but no complexity is needed.
# You must be root and you must be in the source code directory.
# Type  'make bmv' or 'make all' if you want to build BMV.
# After you have tried it, type 'make install' and it sets the sticky bit
# on it and moves the binary to DESTDIR
# If you enter 'make clean' it removes the object files

SOURCES=bmv.c displ.c gsinterf.c
OBJECTS=bmv.o displ.o gsinterf.o
HEADERS=bmv.h

SRCDIR=bmv-1.1
DESTDIR=/usr/bin

CC=gcc
DEFS=LINUX
CFLAGS=-O3

# build the program
all:	bmv 

# install the program
install: bmv clean
	chmod +s bmv
	mv bmv /usr/bin/bmv
	 
# linking
bmv:  	$(OBJECTS)
	$(CC) -o bmv $(OBJECTS) -lvga

# Clean removes objects
clean:	
	rm *.o

tar:
	( cd .. ; tar czvf bmv-1.1.tar.gz $(SRCDIR)/* )


$(OBJECTS): 	$(HEADERS)
