# @(#)makefile	19.1 (ESO/DMD) 02/25/03 13:31:59
#
# .COPYRIGHT:   Copyright (c) 1992 European Southern Observatory,
#                                               all rights reserved
# .TYPE         make file
# .NAME         $MIDASHOME/$MIDVERS/contrib/wavelet/src/makefile
# .LANGUAGE     makefile syntax
# .ENVIRONMENT  Unix Systems.
# .COMMENT      Compiles source files and generates "template" commands
#
# .REMARKS
# .VERSION 1.1  930405:		Implementation

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

M = ../../exec

CFLAGS += $(C_OPT) $(DEBUG) $(SYS) -I$(LINC) -I$(INC)

#LLIB =  -L$(LLIBDIR) -ltemplate -L$(LIBDIR) -lmidas
LLIB =  -L$(LLIBDIR) -L$(LIBDIR) -lmidas

#LIBS =  $(LLIBDIR)/libtemplate.a $(LIBDIR)/libmidas.a
LIBS = $(LIBDIR)/libmidas.a

OUT =   $(M)/my_c_template.exe \
	$(M)/my_for_template.exe

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

$(MAKEFILE_VMS): makefile
	$(MAKE_VMS)

$(M)/my_c_template.exe: my_c_template.o $(LIBS)
	$(LDCC) my_c_template.o $(LLIB) $(MLIB) $(SLIB) -o $@
	$(STRIP) $@

$(M)/my_for_template.exe: my_for_template.o $(LIBS)
	$(LD77) my_for_template.o $(LLIB) $(MLIB) $(SLIB) -o $@
	$(STRIP) $@

my_test_c.exe: my_test_c.o $(LIBS)
	$(LDCC) my_test_c.o $(LLIB) $(MLIB) $(SLIB) -o $@
	$(STRIP) $@
clean:
	rm -f *.o 
	rm -f *.f
	rm -f *~ 

clean_exec:
	rm -f $(OUT)
