#! /bin/sh
# Project MULTIVOL -- input/output from/to multiple volumes with support of
#                     external scripts
# Makefile
# Marc SCHAEFER <schaefer@alphanet.ch>
# Creation: 08/02/97
# Update:   27/04/99
# V2.0 PV002
# DESCRIPTION
#    This Makefile builds multivol.
# RESULT
# NOTES
# BUGS
# TODO
# COPYING-POLICY
#   GPL
# BASED-ON
#   My multivol Makefile V1.0 PV001 of 26/12/96.
# MODIFICATION-HISTORY
# $Id: Makefile,v 1.2 1999/04/27 08:25:58 schaefer Exp $

TARGET=multivol
OBJECTS=main.o multivol.o
SOURCES=main.c multivol.c

CFLAGS=-O -g -Wall -DLINUX -DDONT_SET_TO_RAW #-DDEBUG
LDFLAGS=
CC=gcc

all: $(TARGET)

$(TARGET): $(OBJECTS)
	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $(TARGET)

clean:
	rm -f $(TARGET) $(OBJECTS)

install: 
	install -g root -o root -m 555 multivol /usr/local/bin	
	install -g root -o root -m 444 multivol.1 /usr/local/man
	install -g root -o root -m 555 scripts/tape_init.sh /usr/local/bin
	install -g root -o root -m 555 scripts/tape_deinit.sh /usr/local/bin
	install -g root -o root -m 555 scripts/medium_changer.sh /usr/local/bin

work:
	co multivol.c
	co main.c
	co multivol_if.h
	co multivol.h

store:
	ci multivol.c
	ci main.c
	ci multivol_if.h
	ci multivol.h

# Dependancies
main.o: main.c multivol.h multivol_if.h

multivol.o: multivol.c multivol.h multivol_if.h
