#
# .COPYRIGHT:   Copyright (c) 1994 Special Astrophysical Observatory,
#						all rights reserved
# .TYPE		make file
# .NAME         $MIDASHOME/$MIDVERS/stdred/lss/src
# .LANGUAGE	makefile syntax
# .ENVIRONMENT	Unix Systems. 
# .COMMENT      Compiles source files
#
# .REMARKS	
# .AUTHOR	
# .VERSION 1.0  940222:         Implementation A.Yu.Kniazev

#include ../../../local/default.mk
#include /home/midas/93NOV/local/default.mk
include /u/midas/95NOV/local/default.mk
#include /u/midas/93NOV/local/default.mk

#M = ../../exec
M = $(MIDASHOME)/$(MIDVERS)/stdred/exec
#M = .

PROCDIR=$(MIDASHOME)/$(MIDVERS)/stdred/proc
LN=ln -sfv

LLIB = -L$(LIBDIR) -lmidas

LIBS =  $(LIBDIR)/libgen.a \
	$(LIBDIR)/libmidas.a

#DEBUG = -g -static

OBJ0 = bgd_sher.o mbgd.o


OUT =   $(M)/bgd_sher.exe  mbgd.exe

# DEPENDENCIES:
all: prg $(OUT)

$(M)/bgd_sher.exe: bgd_sher.o $(LIBS)
	$(LDCC) $(DEBUG) bgd_sher.o -o $@ $(LLIB) $(MLIB) $(SLIB)
	$(STRIP) $@
prg:
	$(LN) bgd.prg $(PROCDIR)/

mbgd.exe: mbgd.o $(LIBS)
	$(LDCC) $(DEBUG) mbgd.o -o $@ $(LLIB) $(MLIB) $(SLIB)
#        $(STRIP) $@
clean_exec:
	rm -f $(OUT)

clean:
	rm -f $(OBJ0)
