home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cdrom.zip
/
DDK
/
BASE
/
SRC
/
DEV
/
DASD
/
CDROM
/
OS2CDROM
/
makefile
< prev
Wrap
Makefile
|
1996-09-03
|
10KB
|
284 lines
# SCCSID = @(#)makefile 6.6 92/05/04
#/***********************************************************************/
#/* */
#/* Driver Name: OS2CDROM.DMD - OS/2 CD-ROM Device Manager */
#/* ----------------------------------------- */
#/* */
#/* Source File Name: MAKEFILE */
#/* */
#/* Descriptive Name: MAKEFILE for the OS/2 CD-ROM Device Manager */
#/* */
#/* Function: */
#/* */
#/* */
#/*---------------------------------------------------------------------*/
#/* */
#/* Copyright (C) 1992 IBM Corporation */
#/* */
#/* DISCLAIMER OF WARRANTIES. The following [enclosed] code is */
#/* provided to you solely for the purpose of assisting you in */
#/* the development of your applications. The code is provided */
#/* "AS IS", without warranty of any kind. IBM shall not be liable */
#/* for any damages arising out of your use of this code, even if */
#/* they have been advised of the possibility of such damages. */
#/* */
#/*---------------------------------------------------------------------*/
#/* */
#/* Change Log */
#/* */
#/* Mark Date Programmer Comment */
#/* ---- ---- ---------- ------- */
#/* @133532 08/18/95 VBR Added versioning */
#/* */
#/* */
#/***********************************************************************/
#
# makefile for OS/2 2.0 Device Independent CD-ROM Device Manager
#
# You can optionally generate the listing files for the device driver.
#
# make [option]
#
# option: list -> create listings
# os2cdrom.dmd -> create PS/2 386 RETAIL driver
#
# default: create os2cdrom.dmd
#
# ****** NOTE ******
#
# If you are using a SED command with TAB characters, many editors
# will expand tabs causing unpredictable results in other programs.
#
# Documentation:
#
# Using SED command with TABS. Besure to invoke set tab save option
# on your editor. If you don't, the program 'xyz' will not work
# correctly.
#
#****************************************************************************
# Dot directive definition area (usually just suffixes)
#****************************************************************************
.SUFFIXES:
.SUFFIXES: .com .sys .exe .obj .mbj .asm .inc .def .lnk .lrf .crf .ref
.SUFFIXES: .lst .sym .map .c .h .lib
#****************************************************************************
# Environment Setup for the component(s).
#****************************************************************************
#
# Conditional Setup Area and User Defined Macros
#
#
# Compiler Location w/ includes, libs and tools
#
DOSINC = ..\..\..\..\dos\dosinc
INIT = ..\..\..\..\dos\init
TASK = ..\..\..\..\dos\task
INC = ..\..\..\..\..\inc
H = ..\..\..\..\..\h
LIB = ..\..\..\..\..\lib
TOOLSPATH = ..\..\..\..\..\tools
DISKH = ..\..\diskh
TOSHFLT = ..\toshiba
NECFLT = ..\nec
DASDH = ..\..\os2dasd
DHLIB = ..\..\devhelp
#
# Since the compiler/linker and other tools use environment
# variables ( INCLUDE, LIB, etc ) in order to get the location of files,
# the following line will check the environment for the LIFE of the
# makefile and will be specific to this set of instructions. All MAKEFILES
# are requested to use this format to insure that they are using the correct
# level of files and tools.
#
!if [set INCLUDE=.;$(DASDH);$(H);$(DISKH);$(DOSINC);$(TOSHFLT);$(NECFLT);$(DOSINC);$(INIT);$(INC)] || \
[set LIB=$(LIB);$(DHLIB)] || [set PATH=$(TOOLSPATH);$(DK_TOOLS)]
!endif
#
# Compiler/tools Macros
#
AS=masm
CC=cl
IMPLIB=implib
IPF=ipfc
LIBUTIL=lib
LINK=link
MAPSYM=mapsym
RC=rc
#
# Compiler and Linker Options
#
AFLAGS = -MX -T -Z $(ENV)
AINC = -I. -I$(DOSINC) -I$(INIT) -I$(INC)
#CINC = -I$(DASDH) -I$(H) -I$(DISKH) -I$(TOSHFLT) -I$(NECFLT) -I$(MAKEDIR)
#CFLAGS = /c /Fc /Zp /G2s /Answ /NT StaticCode $(ENV)
CFLAGS = /c /Zp /G2s /Answ /nologo $(ENV)
LFLAGS = /map /nod /exepack /packd /a:16 /far
RFLAGS = -r
#LIBS = $(DHLIB)\dhcalls.lib libh.lib
LIBS = $(DHLIB)\dhcalls.lib
#****************************************************************************
# Set up Macros that will contain all the different dependencies for the
# executables and dlls etc. that are generated.
#****************************************************************************
#
#
#
OBJ1 = cdsegs.obj
OBJ2 = cdheader.obj cdstrat1.obj cdiorb.obj cdasubr.obj \
cdioctl.obj cdioc80.obj cdioc81.obj cdqueue.obj \
cdsony.obj cdtosh.obj cdchinon.obj cdnec.obj \
cdhp.obj cddata.obj
OBJ3 = ..\..\libobj\afuldiv.obj ..\..\libobj\afulrem.obj \
..\..\libobj\anlmul.obj ..\..\libobj\anuldiv.obj \
..\..\libobj\anulrem.obj
OBJ4 = cdinit.obj
#
# LIST Files
#
LIST= cdsegs.lst \
cdheader.lst cdstrat1.lst cdiorb.lst cdasubr.lst \
cdioctl.lst cdioc80.lst cdioc81.lst cdqueue.lst \
cdsony.lst cdtosh.lst cdchinon.lst cdnec.lst \
cddata.lst \
cdinit.lst
OBJS = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4)
#****************************************************************************
# Setup the inference rules for compiling and assembling source code to
# object code.
#****************************************************************************
.asm.obj:
$(AS) $(AFLAGS) $(AINC) $*.asm;
.asm.mbj:
$(AS) $(AFLAGS) -DMMIOPH $(AINC) $*.asm $*.mbj;
.asm.lst:
$(AS) -l -n $(AFLAGS) $(AINC) $*.asm;
.c.obj:
$(CC) $(CFLAGS) $(CINC) $*.c
.c.lst:
$(CC) $(CFLAGS) /Fc $(CINC) $*.c
copy $*.cod $*.lst
del $*.cod
#****************************************************************************
# Target Information
#****************************************************************************
#
# This is a very important step. The following small amount of code MUST
# NOT be removed from the program. The following directive will do
# dependency checking every time this component is built UNLESS the
# following is performed:
# A specific tag is used -- ie. all
#
# This allows the developer as well as the B & I group to perform incremental
# build with a degree of accuracy that has not been used before.
# There are some instances where certain types of INCLUDE files must be
# created first. This type of format will allow the developer to require
# that file to be created first. In order to achive that, all that has to
# be done is to make the DEPEND.MAK tag have your required target. Below is
# an example:
#
# depend.mak: { your file(s) } dephold
#
# Please DON'T remove the following line
#
!include "$(H)\version.mak"
#
# Should be the default tag for all general processing
#
all: os2cdrom.dmd
list: $(LIST)
clean:
if exist *.lnk del *.lnk
if exist *.obj del *.obj
if exist *.mbj del *.mbj
if exist *.map del *.map
if exist *.old del *.old
if exist *.lst del *.lst
if exist *.lsd del *.lsd
if exist *.sym del *.sym
if exist *.sys del *.sys
if exist *.add del *.dmd
if exist *.tff del *.tff
if exist *.def del *.def
if exist *.mak del *.mak
#*****************************************************************************
# Specific Description Block Information
#*****************************************************************************
# This section would only be for specific direction as to how to create
# unique elements that are necessary to the build process. This could
# be compiling or assembling, creation of DEF files and other unique
# files.
# If all compiler and assembly rules are the same, use an inference rule to
# perform the compilation.
#
os2cdrom.dmd: $(OBJS) $(LIBS) makefile
Rem Create DEF file <<$*.def
LIBRARY OS2CDROM
DESCRIPTION "$(FILEVER) Device Manager Driver for CDROM"
PROTMODE
SEGMENTS
_DATA CLASS 'DATA'
CONST CLASS 'CONST'
_BSS CLASS 'BSS'
'Code' CLASS 'CODE' IOPL
_TEXT CLASS 'CODE' IOPL
SwapCode CLASS 'CODE' IOPL
<<keep
$(LINK) $(LFLAGS) @<<$*.lnk
$(OBJ1) +
$(OBJ2) +
$(OBJ3) +
$(OBJ4)
$*.dmd
$*.map
$(LIBS)
$*.def
<<keep
$(MAPSYM) $*.map
# trcust $*.tsf
#****************************************************************************