# Makefile - makefile for bsp/src/drv/scsi
#
# modification history
# --------------------
# 01r,15aug05,kkz  Updating doc values
# 01q,29apr05,kkz  Updating for new doc directory
# 01p,30sep04,pmr  SPR 101252: moved aic7880Lib.c to adaptec subdir.
# 01o,27may04,dgp  change output dir and TOC structure (DOC_CHAPTER & DOC_DIR)
# 01n,17feb04,pch  remove PPC32 hack, no longer needed
# 01m,05dec03,rcs  removed unsupported files from DOC_FILES & OBJS_COMMON
# 01l,31jan03,pch  Add PPC32 support
# 01k,12mar02,dat  SPR 72518 Drivers docs in separate directory
# 01j,12oct01,tam  added repackaging support
# 01i,16aug01,hdn  added PENTIUM2/3/4 support
# 01h,21jun00,dat  added sym895Lib.[co]
# 01g,25aug98,sut  added module ncr710CommLib.c
# 01f,03jun98,dat  fixed EXTRA_INCLUDE to use TGT_DIR
# 01e,29may98,dbt  added support for pentium
# 01d,06sep97,dds  made aic7880Lib.c CPU specific.
# 01c,10jul97,dds  added module aic7880Lib.c
# 01b,04nov96,p_m  Added objects added since 01j of MakeSkel
# 01a,18jun96,yp   created from 01j of MakeSkel
#
# DESCRIPTION
# This file contains the makefile rules for building the drv library.
#
# This file also contains rules for building an NCR script .c file from the
# .n script file.  The .c file is then copied into the src/drv/scsi directory
# where it is then included with the library built in src/drv/scsi.
# The documentation includes in the .n file is extracted and added to 
# the final .c file.
#
#*/

TGT_DIR=$(WIND_BASE)/target

DOC_FILES=	ncr810Lib.c sym895Lib.c

LIB_BASE_NAME=drv

EXTRA_INCLUDE=-I$(TGT_DIR)/h/

OBJS_COMMON = ncr810Lib.o ncr810init.o sym895Lib.o

OBJS_I80386 =

OBJS_I80486 =

OBJS_PENTIUM =

OBJS_PENTIUM2 =

OBJS_PENTIUM3 =

OBJS_PENTIUM4 =

OBJS         = $(OBJS_COMMON) $(OBJS_$(CPU))

include $(TGT_DIR)/h/make/rules.library
include  $(TGT_DIR)/h/make/defs.drivers

CC_OPTIM=$(CC_OPTIM_DRIVER)

# note: in order to compile script the script compilers should be in the path

CPP         = cpp -C -P $(CCFLAGS) $(CC_DEFINES)
#NCRCPP      = n710psun4
#NCRCC       = n710csun4
#NCRH1       = $(TGT_DIR)/h/drv/scsi/ncr710Script1.h

# Build rules for ncrXXXinit.c. The .c files are created from the .n files.
# However, this process is not automated due to the availability of the
# nasm compiler on SUN hosts. The following procedure applies to pre-processing
# the .n file and making it ready for nasm compilation. The objective is
# to use the C pre-processor to create a temporary .i file from a .n file.
# The .i file can then be compiled using nasm on any host, in order to
# get the .c file. The .c file is then compiled by this Makefile.

#Example:
#          $ cpp -P < ncr810init.n > ncr810init.i
#     On the host where nasm resides
#          $ nasm -a 825 -o ncr810init.c ncr810init.i
