#*******************************************************************************
# E.S.O. - VLT project
#
# "@(#) $Id: Makefile,v 1.4 2004/09/22 12:46:24 mpasquat Exp $" 
#
# Makefile of sla - astronomical coordinate converter (runs on LCUs) 
#
# who       when      what
# --------  --------  ----------------------------------------------
# rkarban  16/04/97   change slalib to sla
# gchiozzi  25/07/96  Added slalib.boot
# gchiozzi  13/12/95  Created lcu version
# mnastvog  18/01/95  created
# bgilli    18/10/95  added dsmat

#*******************************************************************************
# This Makefile follows VLT Standards (see Makefile(5) for more).
#*******************************************************************************
# REMARKS
#    None
#------------------------------------------------------------------------

#
# user definable C-compilation flags
USER_CFLAGS = -DMAKE_LCU -DUSE_ONLY_FAST_REFRACTION

#
# additional include and library search paths
USER_INC = -I$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/powerpc-wrs-vxworks/gcc-2.96/include
#USER_LIB = 

#
# MODULE CODE DESCRIPTION:
# ------------------------
# As a general rule:  public file are "cleaned" and "installed"  
#                     local (_L) are not "installed".

#
# C programs (public and local)
# -----------------------------
EXECUTABLES      = sla
#EXECUTABLES_L   = 

#
# astronomical coordinate converter
sla_OBJECTS   = \
addet \
afin \
airmas \
altaz \
amp \
ampqk \
aop \
aoppa \
aoppat \
aopqk \
atmdsp \
av2m \
bear \
caf2r \
caldj \
calyd \
cc2s \
cc62s \
cd2tf \
cldj \
clyd \
combn \
cr2af \
cr2tf \
cs2c \
cs2c6 \
ctf2d \
ctf2r \
daf2r \
dafin \
dat \
dav2m \
dbear \
dbjin \
dc62s \
dcc2s \
dcmpf \
dcs2c \
dd2tf \
de2h \
deuler \
dfltin \
dh2e \
dimxv \
djcal \
djcl \
dm2av \
dmat \
dmoon \
dmxm \
dmxv \
dpav \
dr2af \
dr2tf \
drange \
dranrm \
ds2c6 \
ds2tp \
dsep \
dsepv \
dt \
dtf2d \
dtf2r \
dtp2s \
dtp2v \
dtps2c \
dtpv2c \
dtt \
dv2tp \
dvdv \
dvn \
dvxv \
e2h \
earth \
ecleq \
ecmat \
ecor \
eg50 \
el2ue \
epb \
epb2d \
epco \
epj \
epj2d \
eqecl \
eqeqx \
eqgal \
etrms \
euler \
evp \
fitxy \
fk425 \
fk45z \
fk524 \
fk52h \
fk54z \
fk5hz \
flotin \
galeq \
galsup \
ge50 \
geoc \
gmst \
gmsta \
h2e \
h2fk5 \
hfk5z \
imxv \
intin \
invf \
kbj \
m2av \
map \
mappa \
mapqk \
mapqkz \
moon \
mxm \
mxv \
nut \
nutc \
oap \
oapqk \
obs \
pa \
pav \
pcd \
pda2h \
pdq2h \
permut \
pertel \
pertue \
planel \
planet \
plante \
pm \
polmo \
prebn \
prec \
preces \
precl \
prenut \
pv2el \
pv2ue \
pvobs \
pxy \
range \
ranorm \
rcc \
rdplan \
refco \
refcoq \
refro \
refv \
refz \
rverot \
rvgalc \
rvlg \
rvlsrd \
rvlsrk \
s2tp \
sep \
sepv \
smat \
subet \
supgal \
svd \
svdcov \
svdsol \
tp2s \
tp2v \
tps2c \
tpv2c \
ue2el \
ue2pv \
unpcd \
v2tp \
vdv \
vn \
vxv \
xy2xy \
zd

#xxxxx_LDFLAGS   =
#xxxxx_LIBS      =

# special compilation flags for single c sources
#yyyyy_CFLAGS   = 

#
# Includes (.h) files (public only)
# ---------------------------------
# NO ONE: Take workstation version
INCLUDES        =

#
# Libraries (public and local)
# ----------------------------
#LIBRARIES       = 
LIBRARIES_L      =

#
# special compilation flags for single c sources
#wiastro_CFLAGS  = -DVXWORKS 

#
# <brief description of lllll library>
lllll_OBJECTS   =

#
# Scripts (public and local)
# ----------------------------
SCRIPTS         = sla.boot
SCRIPTS_L       =

#
# TCL scripts (public and local)
# ------------------------------
TCL_SCRIPTS     =
TCL_SCRIPTS_L   =

#
# <brief description of tttttt tcl-script>
tttttt_OBJECTS  =
tttttt_TCLSH    = 
tttttt_LIBS     = 

#
# TCL libraries (public and local)
# ------------------------------
TCL_LIBRARIES   =
TCL_LIBRARIES_L =

#
# <brief description of tttlll library>
tttlll_OBJECTS  = 


#
# man pages to be done
# --------------------
MANSECTIONS =
MAN1 =
MAN3 =
MAN5 =
MAN7 =
MAN8 =

#
# local man pages
# ---------------
MANl =

#
# ASCII file to be converted into Framemaker-MIF
# --------------------
ASCII_TO_MIF = 


#
# list of all possible C-sources (used to create automatic dependencies)
# ------------------------------
CSOURCENAMES = \
	$(foreach exe, $(EXECUTABLES) $(EXECUTABLES_L), $($(exe)_OBJECTS)) \
	$(foreach lib, $(LIBRARIES) $(LIBRARIES_L), $($(lib)_OBJECTS))


#
#>>>>> END OF standard rules

#
# CHOSE PLATFORM
# --------------
# Default is UNIX, for VxVorks application next line MUST BE UNCOMMENTED
MAKE_VXWORKS = on   
OPTIMIZE=on

#
# INCLUDE STANDARDS
# -----------------

ifdef ACSROOT
   MAKEDIRTMP := $(shell searchFile include/acsMakefile)
   ifneq ($(MAKEDIRTMP),\#error\#)
      MAKEDIR := $(MAKEDIRTMP)/include
      include $(MAKEDIR)/acsMakefile
   endif
else
   MAKEDIRTMP := $(shell searchFile include/vltMakefile)
   ifneq ($(MAKEDIRTMP),\#error\#)
      MAKEDIR := $(MAKEDIRTMP)/include
      include $(MAKEDIR)/vltMakefile
   endif
endif


#
# TARGETS
# -------
all:	do_links do_all
	@echo " . . . 'all' done" 

clean : clean_links clean_all 
	$(RM) *~ ../doc/*.pcode ../include/*~ ../*~ core ../CDT/*~
	@echo " . . . clean done"

man   : do_man 
	@echo " . . . man page(s) done"

install : install_all
	@echo " . . . installation done"

#
# handle links to common source files (in slx/ws/src)
#
COMMON_SOURCES = \
	$(foreach exe, $(sla_OBJECTS), $(exe).c)
COMMON_SOURCES_ORIG = \
	$(foreach exe, $(sla_OBJECTS), ../../ws/src/$(exe).c)

$(COMMON_SOURCES) : $(COMMON_SOURCES_ORIG)
	- @echo "== Linking source: $@"
	- $(AT) $(RM) $@ ; ln -s ../../ws/src/$@ $@

do_links: $(COMMON_SOURCES)

clean_links:
	$(AT) $(RM) $(COMMON_SOURCES)
                 
#___oOo___
