source: trunk/src/os2ahci/wmakefile@ 19

Last change on this file since 19 was 19, checked in by markus, 15 years ago

changed wmakefile include file order to find iorb.h from DASD/DISKH first

  • Property svn:executable set to *
File size: 3.5 KB
Line 
1###############################################################################
2# wmakefile - makefile for os2ahci driver using WATCOM compiler
3#
4# Copyright (c) 2010 Christian Mueller, Markus Thielen.
5# Parts copied from/inspired by the Linux AHCI driver;
6# those parts are (c) Linux AHCI/ATA maintainers
7#
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
22
23###############################################################################
24# Environment
25
26# main path to OS/2 DDK; this needs to be set before this makefile will work
27!ifndef DDK
28DDK = i:\ddk
29!endif
30
31# main path to WATCOM installation
32!ifndef WATCOM
33WATCOM = i:\watcom
34!endif
35
36CC_INCLUDE = -I$(DDK)\base\src\dev\dasd\diskh \
37 -I$(DDK)\base\h \
38 -I$(DDK)\base\ibmh \
39 -I$(WATCOM)\h
40
41AS_INCLUDE = -I:$(DDK)\base\inc \
42 -I:$(DDK)\base\src\dev\dasd\diskinc
43
44LIB_DIRS = $(DDK)\base\lib\ \
45 $(DDK)\base\src\dev\dasd\devhlp\ \
46
47
48###############################################################################
49# Tool Chain
50#
51# This makefile uses the Watcom 16bit compiler.
52# Linker and assembler are link.exe and alp.exe that ship with the OS/2 DDK
53#
54
55AS = $(DDK)\tools\alp.exe
56CC = wcc
57LD = $(DDK)\base\tools\link.exe
58
59AFLAGS = -Mb
60CFLAGS = -ecc -bt=os2 -ms -zu -2 -w2 -wcd=138 -zp=1 -q -s -zdf
61CFLAGS_DEBUG = -d3 -hc
62LFLAGS = /noe /nod /packd /a:16 /batch /map /line
63
64###############################################################################
65# Main dependencies
66
67TARGET = os2ahci.add
68
69LIBS = addcalls dhcalls doscalls rmcalls
70
71SRCS = init.asm math.asm libc.c os2ahci.c pci.c ahci.c ata.c atapi.c \
72 ctxhook.c
73
74OBJS = init.obj libc.obj os2ahci.obj pci.obj ahci.obj ata.obj atapi.obj \
75 ctxhook.obj
76
77INCS = os2ahci.h ahci.h
78
79
80all: $(TARGET)
81
82clean:
83 rm -f $(OBJS) $(TARGET)
84
85###############################################################################
86# Object/source dependencies
87
88init.obj: init.asm wmakefile
89
90libc.obj: libc.c wmakefile $(INCS)
91
92os2ahci.obj: os2ahci.c wmakefile $(INCS)
93
94pci.obj: pci.c wmakefile $(INCS)
95
96ahci.obj: ahci.c wmakefile $(INCS) ata.h atapi.h
97
98ata.obj: ata.c wmakefile $(INCS) ata.h
99
100atapi.obj: atapi.c wmakefile $(INCS) ata.h atapi.h
101
102ctxhook.obj: ctxhook.c wmakefile $(INCS) ata.h atapi.h
103
104###############################################################################
105# Action definitions (compile/link commands)
106
107.asm.obj:
108 $(AS) $(AFLAGS) $(AS_INCLUDE) $*.asm
109
110.c.obj:
111 $(CC) $(CFLAGS) $(CC_INCLUDE) $*.c
112 wdis -l $*.obj
113
114$(TARGET): $(OBJS) os2ahci.def wmakefile
115 $(LD) $(LFLAGS) $(OBJS),$(TARGET),$*.map,$(LIB_DIRS) $(LIBS),$*.def
116 mapsym os2ahci
117
118
Note: See TracBrowser for help on using the repository browser.