# @(#)makefile	19.1 (ESO-IPG) 02/25/03 14:36:16
# .COPYRIGHT:	Copyright (c) 1988 European Southern Observatory,
#						all rights reserved
# .TYPE		make file
# .NAME		$MIDASHOME/$MIDVERS/tapeserv/makefile 
# .LANGUAGE	makefile syntax
# .ENVIRONMENT	Unix Systems. 
# .COMMENT	Compiles source files and generates the "inmtaped.exe" daemon
#
# .REMARKS	
# .AUTHOR	Carlos Guirao
# .VERSION 1.1	900202:		Implementation
# .VERSION 3.0  930308:		Using default.mk file

include ../../local/default.mk

M = ../exec

LIB =	$(LIBDIR)/libmidas.a
RLIB =	libmidas.a

OUT = $(M)/inmtaped.exe

OSHEADER = $(INC)/osparms.h 


# DEPENDENCIES:
all: $(OUT)

$(RLIB): $(LIB)
	cp $(LIB) $(RLIB)
	$(AR) $(AR_DOPT) $(RLIB) osu.o
	$(RANLIB) $(RLIB)

$(M)/inmtaped.exe: inmtaped.o $(RLIB)
	$(LDCC) inmtaped.o $(RLIB) $(SLIB) -o $@
	$(STRIP) $@

inmtaped.o: $(INC)/rtape.h


clean_exec:
	rm -f $(OUT) 

clean:
	rm -f *.o $(RLIB)
