#------------------------------------------------------------------------------
#  T m a g   Photometric Package
#  @(#) $Id: Makefile,v 1.2 2003/10/26 08:51:27 ohainaut Exp $
#
# .version 2003-10-24 ready for archive.
# .history
#       2003-10-22 updated for GUI
#       Wed Jan 10 03:27:08 2001 start uniformizing
#	Thu Aug 31 06:54:07 2000 ORH first amag			     
#	Wed Jul  2 02:21:36 1997			     
#.author	ORH@IfA/UHawaii	
#------------------------------------------------------------------------------

# Set the location of your Midas directory
MIDAS = /scisoft/midas/02FEB

# Set the location of your target directory
# - for most local installations:
PRGDIR = $(HOME)/midwork
# - for installation at telescope
## PRGDIR = /data/E2P2OPS/midas_proc

#-- no user servicable parts below this line.

all:	amag_commandtomidas landolt

install: 
	cd ../etc/ ; cp *.ctx *.tbl  $(PRGDIR)
	cd ../proc ; cp *.prg $(PRGDIR)
	cd ../src ; chmod +x amag_GUI.tcl ;  cp amag_GUI.tcl $(PRGDIR)
	cp amag_commandtomidas $(PRGDIR)
clean:
	rm -f *~ *.o amag_commandtomidas
	cd ../etc ; rm -f *.tbl *~
	cd ../proc ; rm *~


#---

amag_commandtomidas: amag_commandtomidas.c
	gcc -o amag_commandtomidas   amag_commandtomidas.c -L $(MIDAS)/lib -I $(MIDAS)/incl -lxcon -lmidas -lm

landolt: 
	cd ../etc/ ; \
	   $(MIDAS)/system/unix/inmidas -p 66 -j "indisk/fits Landolt.fits Landolt.tbl ; bye" ; \
	   $(MIDAS)/system/unix/inmidas -p 66 -j "indisk/fits landolt.fits landolt.tbl ; bye" 

# ---oOo---
