## $Id: Makefile.tmpl,v 3.10 1998/01/09 19:32:07 dean Exp $
##
##     Copyright 1989-1996 by National Instruments
##    All Rights Reserved.
## 
## This file is used as a template for building CIN Makefiles.
## Lines beginning with #? where ? is a single letter code cause conditional
## inclusion in the created Makefile by lvmkmf.
## Lines beginning with ## are not included in the Makefile.
##
## Codes:
##   B=Solaris 1 V=Solaris 2 H=HP-UX L=Linux P=PowerMax D=Digital Unix
##   G=external subroutine glue C=regular CIN  N=not external subr. (no glue)
##   O=no specific CIN specified when building makefile
##   Q=End of Makefile when no specific CIN specified
#
# This Makefile was generated automatically by lvmkmf.
#

CC=gcc
LD=gcc -rdynamic
LDFLAGS=-shared
XFLAGS=-fPIC
LVDIR=/usr/local/lv50
CINDIR=$(LVDIR)/cintools
CFLAGS=-I$(CINDIR) -I../driver $(XFLAGS)

FILETYPE=cin
TYPENAME=CIN

CINLIB=$(CINDIR)/libcin.a
#V MAKEGLUE=$(CINDIR)/makeglueSVR4.awk

MAKEGLUE=$(CINDIR)/makeglueLinux.awk
AS=gcc -fPIC -c

.SUFFIXES: .lsb .lsb~ $(SUFFIXES)

# Default rule to create an lsb from a C source file
.c.lsb:	; make $*.o
	$(LD) $(LDFLAGS) -o $*.tmp \
		$(CINDIR)/$(FILETYPE).o $(XLDFLAGS) $*.o $(CINLIB)
	$(CINDIR)/lvsbutil -c $* -t $(TYPENAME) -d `pwd`
	@rm -f $*.tmp

#0 all:
#0 	@echo "You must specify a target to make, for example, 'make mycin.lsb'"

#Q 
#G LVSBNAME.lsb:	LVSBNAME.o GLUEFILE.o
#N LVSBNAME.lsb:	LVSBNAME.o
#	$(LD) $(LDFLAGS) -o LVSBNAME.tmp \
#G 		GLUEFILE.o \
#		$(CINDIR)/FILETYPE.o $(XLDFLAGS) LVSBNAME.o  $(CINLIB)
#	$(CINDIR)/lvsbutil -c LVSBNAME -t TYPENAME -d `pwd`
#	@rm -f LVSBNAME.tmp

#G GLUEFILE.o:	GLUEFILE
#G 	awk -f $(MAKEGLUE) GLUEFILE > GLUEFILE.s
#G 	$(AS) $(AFLAGS) -o GLUEFILE.o GLUEFILE.s

#clean:
#	$(RM) -f LVSBNAME.o LVSBNAME.tmp
#G 	$(RM) -f GLUEFILE.o GLUEFILE.s

#spotless: clean
#	$(RM) -f LVSBNAME.lsb


