| [2] | 1 | #/***********************************************************************/
|
|---|
| 2 | #/* */
|
|---|
| 3 | #/* Driver Name: AHCI.ADD - Adapter Driver for SATA/AHCI DASD */
|
|---|
| 4 | #/* ------------------------------------------------ */
|
|---|
| 5 | #/* */
|
|---|
| 6 | #/* Source File Name: MAKEFILE for OpenWatcom */
|
|---|
| 7 | #/* */
|
|---|
| 8 | #/*---------------------------------------------------------------------*/
|
|---|
| 9 | #/* */
|
|---|
| 10 | #/* Copyright (c) 2009 Markus Thielen thi.guten@gmail.com */
|
|---|
| 11 | #/* */
|
|---|
| 12 | #/***********************************************************************/
|
|---|
| 13 |
|
|---|
| 14 | _VERSION = 0.1
|
|---|
| 15 | _FIXLEVEL = 1
|
|---|
| 16 |
|
|---|
| 17 | #****************************************************************************
|
|---|
| 18 | # Dot directive definition area (usually just suffixes)
|
|---|
| 19 | #****************************************************************************
|
|---|
| 20 |
|
|---|
| 21 | .SUFFIXES:
|
|---|
| 22 | .SUFFIXES: .com .add .exe .obj .asm .inc .def .lnk .crf .ref
|
|---|
| 23 | .SUFFIXES: .sym .map .c .h .lib
|
|---|
| 24 |
|
|---|
| 25 | #****************************************************************************
|
|---|
| 26 | # Environment Setup for the component(s).
|
|---|
| 27 | #****************************************************************************
|
|---|
| 28 |
|
|---|
| 29 | #
|
|---|
| 30 | # Conditional Setup Area and User Defined Macros
|
|---|
| 31 | #
|
|---|
| 32 |
|
|---|
| 33 | #
|
|---|
| 34 | # Compiler Location w/ includes, libs and tools
|
|---|
| 35 | #
|
|---|
| 36 |
|
|---|
| 37 | INC = $(%DDKBASE)\base\inc
|
|---|
| 38 | H = $(%WATCOM)\h;$(%DDKBASE)\base\h
|
|---|
| 39 | LIB = $(%DDKBASE)\base\lib
|
|---|
| 40 | TOOLS = $(%DDKBASE)\tools
|
|---|
| 41 | DISKH = $(%DDKBASE)\base\src\dev\dasd\diskh
|
|---|
| 42 | RMLIB = $(%DDKBASE)\base\src\dev\resource\rmcalls
|
|---|
| 43 | APM = $(%DDKBASE)\base\src\dev\thinkpad\dockii\apmcalls
|
|---|
| 44 | ACPI = $(%ACPI_H)
|
|---|
| 45 |
|
|---|
| 46 | %INCLUDE=.;$(H);$(DISKH);$(ACPI)
|
|---|
| 47 | %PATH=$(TOOLS);$(%PATH)
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 | #
|
|---|
| 51 | # Compiler/tools Macros
|
|---|
| 52 | #
|
|---|
| 53 |
|
|---|
| 54 | AS=wasm
|
|---|
| 55 | CC=wcc
|
|---|
| 56 | LINK=wlink
|
|---|
| 57 | MAPSYM=mapsym
|
|---|
| 58 | PACK=nelite
|
|---|
| 59 |
|
|---|
| 60 | #
|
|---|
| 61 | # Set compiler and Linker Options
|
|---|
| 62 | #
|
|---|
| 63 | # To create ICAT debug version use:
|
|---|
| 64 | # nmake icat=on
|
|---|
| 65 | #
|
|---|
| 66 |
|
|---|
| 67 | TASM_AFLAGS = -MX -T -Z -M
|
|---|
| 68 | WASM_AFLAGS = -2
|
|---|
| 69 | AINC = -I. -I$(INC)
|
|---|
| 70 | AFLAGS = $(WASM_AFLAGS)
|
|---|
| 71 |
|
|---|
| 72 | CFLAGS = -bt=os2 -ms -omi -s -zdp -zff -zgf -zu -zl -fpi87 -ecf -zp -zq
|
|---|
| 73 | LFLAGS = name $(TARGET) sys os2 dll initglobal option map quiet lib os2 file $(OBJS)
|
|---|
| 74 | PACKFLAGS = /P:255 /A:0 /S /E+ /O-
|
|---|
| 75 |
|
|---|
| 76 | !ifdef icat
|
|---|
| 77 | CFLAGS = $(CFLAGS) -hc
|
|---|
| 78 | LFLAGS = $(LFLAGS) /co
|
|---|
| 79 | !endif
|
|---|
| 80 |
|
|---|
| 81 | LIBS = $(APM)\apmcalls.lib $(RMLIB)\rmcalls.lib $(LIB)\libh.lib $(LIB)\os2286p.lib
|
|---|
| 82 |
|
|---|
| 83 | #****************************************************************************
|
|---|
| 84 | # Set up Macros that will contain all the different dependencies for the
|
|---|
| 85 | # executables and dlls etc. that are generated.
|
|---|
| 86 | #****************************************************************************
|
|---|
| 87 |
|
|---|
| 88 | #
|
|---|
| 89 | # H files
|
|---|
| 90 | #
|
|---|
| 91 | #
|
|---|
| 92 | HDR =
|
|---|
| 93 |
|
|---|
| 94 | #
|
|---|
| 95 | # OBJ files
|
|---|
| 96 | #
|
|---|
| 97 | #
|
|---|
| 98 |
|
|---|
| 99 | OBJS = ahci.obj
|
|---|
| 100 |
|
|---|
| 101 | #****************************************************************************
|
|---|
| 102 | # Setup the inference rules for compiling and assembling source code to
|
|---|
| 103 | # obejct code.
|
|---|
| 104 | #****************************************************************************
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 | .asm.obj:
|
|---|
| 108 | $(AS) $(AFLAGS) $(AINC) $*.asm;
|
|---|
| 109 |
|
|---|
| 110 | .c.obj:
|
|---|
| 111 | $(CC) $(CFLAGS) $(CINC) $*.c
|
|---|
| 112 |
|
|---|
| 113 |
|
|---|
| 114 | #****************************************************************************
|
|---|
| 115 | # Target Information
|
|---|
| 116 | #****************************************************************************
|
|---|
| 117 |
|
|---|
| 118 | _VENDOR = THI.GUTEN
|
|---|
| 119 | FILEVER = @^#$(_VENDOR):$(_VERSION)^#@^#^#1^#^# $(TIMESTAMP)::::$(_FIXLEVEL)::@@
|
|---|
| 120 | CFLAGS = $(CFLAGS) -dVERSION="$(_VERSION).$(_FIXLEVEL)"
|
|---|
| 121 |
|
|---|
| 122 | #
|
|---|
| 123 | # Should be the default tag for all general processing
|
|---|
| 124 | #
|
|---|
| 125 |
|
|---|
| 126 | all: ahci.add
|
|---|
| 127 |
|
|---|
| 128 | clean:
|
|---|
| 129 | if exist *.lnk del *.lnk
|
|---|
| 130 | if exist *.obj del *.obj
|
|---|
| 131 | if exist *.map del *.map
|
|---|
| 132 | if exist *.lst del *.lst
|
|---|
| 133 | if exist *.sym del *.sym
|
|---|
| 134 | if exist *.add del *.add
|
|---|
| 135 | if exist *.def del *.def
|
|---|
| 136 | if exist *.mak del *.mak
|
|---|
| 137 |
|
|---|
| 138 |
|
|---|
| 139 | #*****************************************************************************
|
|---|
| 140 | # Specific Description Block Information
|
|---|
| 141 | #*****************************************************************************
|
|---|
| 142 |
|
|---|
| 143 | ahci.add: $(OBJS) $(LIBS) $(HDR) makefile
|
|---|
| 144 | Rem Create DEF file <<$^&.def
|
|---|
| 145 | LIBRARY $^&
|
|---|
| 146 |
|
|---|
| 147 | DESCRIPTION "$(FILEVER) Adapter Driver for SATA/AHCI DASD"
|
|---|
| 148 |
|
|---|
| 149 | PROTMODE
|
|---|
| 150 |
|
|---|
| 151 | SEGMENTS
|
|---|
| 152 | DDHeader CLASS 'DATA'
|
|---|
| 153 | LIBDATA CLASS 'DATA'
|
|---|
| 154 | _DATA CLASS 'DATA'
|
|---|
| 155 | CONST CLASS 'CONST'
|
|---|
| 156 | _BSS CLASS 'BSS'
|
|---|
| 157 | 'Code' CLASS 'CODE' IOPL
|
|---|
| 158 | LIBCODE CLASS 'CODE' IOPL
|
|---|
| 159 | _TEXT CLASS 'CODE' IOPL
|
|---|
| 160 | InitCode CLASS 'CODE' IOPL
|
|---|
| 161 | EndCode CLASS 'CODE' IOPL
|
|---|
| 162 | Messages CLASS 'MSGS' IOPL SWAPPABLE
|
|---|
| 163 | CSCode CLASS 'CODE' IOPL
|
|---|
| 164 | ACPICode CLASS 'CODE' IOPL
|
|---|
| 165 | FCode CLASS 'CODE' IOPL
|
|---|
| 166 | RMCode CLASS 'CODE' IOPL
|
|---|
| 167 |
|
|---|
| 168 | <<keep
|
|---|
| 169 | $(LINK) $(LFLAGS) /NOE @<<$^&.lnk
|
|---|
| 170 | $(OBJS)
|
|---|
| 171 | $*.add
|
|---|
| 172 | $*.map
|
|---|
| 173 | $(LIBS)
|
|---|
| 174 | $^&.def
|
|---|
| 175 | <<keep
|
|---|
| 176 | $(MAPSYM) $*.map
|
|---|
| 177 | !ifndef icat
|
|---|
| 178 | $(PACK) $@ $@ $(PACKFLAGS)
|
|---|
| 179 | !endif
|
|---|
| 180 | ######## trcust $*.tsf
|
|---|
| 181 |
|
|---|
| 182 | #****************************************************************************
|
|---|
| 183 | # Dependency generation and Checking
|
|---|
| 184 | #****************************************************************************
|
|---|
| 185 |
|
|---|
| 186 | depend.mak: dephold
|
|---|
| 187 | touch depchk
|
|---|
| 188 | includes -e -sobj -llst -I. -I$(H) -I$(DOSINC) -I$(DISKH) -I$(ADDLIB) -I$(APM_H) -I$(PCM_H) -I$(INIT) -I$(TASK) -I$(INC) -P$$(H)=$(H) *.c *.asm >$@
|
|---|
| 189 | -del depchk
|
|---|
| 190 |
|
|---|
| 191 | dephold:
|
|---|
| 192 | touch $@
|
|---|
| 193 |
|
|---|
| 194 | $(OBJS): $(HDR)
|
|---|
| 195 |
|
|---|