source: trunk/makefile@ 3

Last change on this file since 3 was 2, checked in by markus, 16 years ago

added makefile and build script (test SVN)

  • Property svn:eol-style set to native
File size: 4.8 KB
Line 
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
37INC = $(%DDKBASE)\base\inc
38H = $(%WATCOM)\h;$(%DDKBASE)\base\h
39LIB = $(%DDKBASE)\base\lib
40TOOLS = $(%DDKBASE)\tools
41DISKH = $(%DDKBASE)\base\src\dev\dasd\diskh
42RMLIB = $(%DDKBASE)\base\src\dev\resource\rmcalls
43APM = $(%DDKBASE)\base\src\dev\thinkpad\dockii\apmcalls
44ACPI = $(%ACPI_H)
45
46%INCLUDE=.;$(H);$(DISKH);$(ACPI)
47%PATH=$(TOOLS);$(%PATH)
48
49
50#
51# Compiler/tools Macros
52#
53
54AS=wasm
55CC=wcc
56LINK=wlink
57MAPSYM=mapsym
58PACK=nelite
59
60#
61# Set compiler and Linker Options
62#
63# To create ICAT debug version use:
64# nmake icat=on
65#
66
67TASM_AFLAGS = -MX -T -Z -M
68WASM_AFLAGS = -2
69AINC = -I. -I$(INC)
70AFLAGS = $(WASM_AFLAGS)
71
72CFLAGS = -bt=os2 -ms -omi -s -zdp -zff -zgf -zu -zl -fpi87 -ecf -zp -zq
73LFLAGS = name $(TARGET) sys os2 dll initglobal option map quiet lib os2 file $(OBJS)
74PACKFLAGS = /P:255 /A:0 /S /E+ /O-
75
76!ifdef icat
77CFLAGS = $(CFLAGS) -hc
78LFLAGS = $(LFLAGS) /co
79!endif
80
81LIBS = $(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#
92HDR =
93
94#
95# OBJ files
96#
97#
98
99OBJS = 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
119FILEVER = @^#$(_VENDOR):$(_VERSION)^#@^#^#1^#^# $(TIMESTAMP)::::$(_FIXLEVEL)::@@
120CFLAGS = $(CFLAGS) -dVERSION="$(_VERSION).$(_FIXLEVEL)"
121
122#
123# Should be the default tag for all general processing
124#
125
126all: ahci.add
127
128clean:
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
143ahci.add: $(OBJS) $(LIBS) $(HDR) makefile
144 Rem Create DEF file <<$^&.def
145LIBRARY $^&
146
147DESCRIPTION "$(FILEVER) Adapter Driver for SATA/AHCI DASD"
148
149PROTMODE
150
151SEGMENTS
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
186depend.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
191dephold:
192 touch $@
193
194$(OBJS): $(HDR)
195
Note: See TracBrowser for help on using the repository browser.