# .COPYRIGHT:	Copyright (c) 1988,2004 European Southern Observatory,
#						all rights reserved
# .TYPE		make file
# .NAME		$MIDASHOME/$MIDVERS/prim/src/display/makefile 
# .LANGUAGE	makefile syntax
# .ENVIRONMENT	Unix Systems. 
# .COMMENT	Compiles source files and generates "prim/display" commands
#
# .REMARKS	
# .AUTHOR	Carlos Guirao
# .VERSION 2.1	901102:		new directory structure CG.
# .VERSION 3.0  930308:		Using default.mk file
# 040108	last modif
# 

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

M = ../../exec

LLIB =  -L$(LIBDIR) -lmidas
LIBS =  $(LIBDIR)/libmidas.a

OUT =   $(M)/intape.exe  $(M)/outtape.exe \
	$(M)/infile.exe \
	$(M)/outfits.exe $(M)/indisk.exe  $(M)/fheadcopy.exe

HDR = $(INC)/osparms.h  $(INC)/midas_def.h \
	$(INC)/fitsdef.h $(INC)/fitsfmt.h

# DEPENDENCIES:
all: $(MAKEFILE_VMS) $(OUT)

$(MAKEFILE_VMS): makefile
	$(MAKE_VMS)

$(M)/intape.exe: intape.o $(LIBS)
	$(LDCC) intape.o $(LLIB) $(MLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/infile.exe: infile.o $(LIBS)
	$(LDCC) infile.o $(LLIB) $(MLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/outtape.exe: outtape.o $(LIBS)
	$(LDCC) outtape.o $(LLIB) $(MLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/outfits.exe: outfits.o $(LIBS)
	$(LDCC) outfits.o $(LLIB) $(MLIB) $(SLIB) -o $@
	$(STRIP) $@
$(M)/indisk.exe: indisk.o $(LIBS)
	$(LDCC) indisk.o $(LLIB) $(MLIB) $(SLIB) -o $@
$(M)/fheadcopy.exe: fheadcopy.o $(LIBS)
	$(LDCC) fheadcopy.o $(LLIB) $(MLIB) $(SLIB) -o $@

intape.o: $(HDR)
outtape.o: $(HDR)
outfits.o: $(HDR)
indisk.o: $(HDR)
fheadcopy.o: $(HDR)

clean_exec:
	rm -f $(OUT)

clean:
	rm -f *.o
