Changeset 16 for trunk/src/os2ahci/wmakefile
- Timestamp:
- Sep 17, 2010, 11:45:29 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/wmakefile
r15 r16 1 1 ############################################################################### 2 # wmakefile - makefile for os2ahci driver using WATCOM compiler 2 3 # 3 # wmakefile - Watcom makefile for os2ahci driver 4 # 5 # NOTE: This is a wmake file! See here: 6 # http://www.openwatcom.org/index.php/Using_wmake 7 # 8 9 # 10 # Copyright (c) 2010 Markus Thielen, Christian Mueller. 4 # Copyright (c) 2010 Christian Mueller, Markus Thielen. 11 5 # Parts copied from/inspired by the Linux AHCI driver; 12 6 # those parts are (c) Linux AHCI/ATA maintainers … … 26 20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 21 22 28 23 ############################################################################### 29 # wmake options24 # Environment 30 25 31 # disable prompt to delete out of date files on compile errors 32 .ERASE 26 # main path to OS/2 DDK; this needs to be set before this makefile will work 27 !ifndef DDK 28 DDK = i:\ddk 29 !endif 30 31 # main path to WATCOM installation 32 !ifndef WATCOM 33 WATCOM = i:\watcom 34 !endif 35 36 CC_INCLUDE = -I$(DDK)\base\h \ 37 -I$(DDK)\base\ibmh \ 38 -I$(DDK)\base\src\dev\dasd\diskh \ 39 -I$(WATCOM)\h 40 41 AS_INCLUDE = -I:$(DDK)\base\inc \ 42 -I:$(DDK)\base\src\dev\dasd\diskinc 43 44 LIB_DIRS = $(DDK)\base\lib\ \ 45 $(DDK)\base\src\dev\dasd\devhlp\ \ 33 46 34 47 35 48 ############################################################################### 36 49 # Tool Chain 37 38 AS = wasm # Watcom assembler39 CC = wcc # Watcom 16bit compiler40 LD = wlink # Watcom linker41 42 43 ###############################################################################44 # Environment45 50 # 46 # we need the following set before this makefile is called: 47 # 48 # WATCOM - to the base WATCOM installation directory 49 # DDK - to the base dir of the OS/2 DDK to use 50 # PS - the path separator (/ or \) 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 51 53 # 52 54 53 DDK = $(%DDK) 54 WATCOM = $(%WATCOM) 55 !ifndef %PS 56 PS = \ 57 !else 58 PS = $(%PS) 59 !endif 55 AS = $(DDK)\tools\alp.exe 56 CC = wcc 57 LD = $(DDK)\base\tools\link.exe 60 58 61 CC_INCLUDE = -I$(DDK)$(PS)BASE$(PS)H & 62 -I$(DDK)$(PS)BASE$(PS)IBMH & 63 -I$(DDK)$(PS)BASE$(PS)SRC$(PS)DEV$(PS)DASD$(PS)DISKH & 64 -I$(WATCOM)$(PS)h & 65 66 AS_INCLUDE = -I$(DDK)$(PS)BASE$(PS)INC & 67 -I$(DDK)$(PS)BASE$(PS)SRC$(PS)DEV$(PS)DASD$(PS)DISKINC 68 69 # the linker wants this on one line, no spaces... 70 LIB_DIRS = $(DDK)$(PS)BASE$(PS)LIB$;$(DDK)$(PS)BASE$(PS)SRC$(PS)DEV$(PS)DASD$(PS)DEVHLP;$(WATCOM)$(PS)LIB286$(PS)os2 71 59 AFLAGS = -Mb 60 CFLAGS = -ecc -bt=os2 -ms -zu -2 -w2 -wcd=138 -zp=1 -q -s -zdf 61 CFLAGS_DEBUG = -d3 -hc 62 LFLAGS = /noe /nod /packd /a:16 /batch /map /line 72 63 73 64 ############################################################################### … … 76 67 TARGET = os2ahci.add 77 68 78 LIBS = addcalls ,dhcalls,doscalls,rmcalls,clibc69 LIBS = addcalls dhcalls doscalls rmcalls 79 70 80 SRCS = init.asm libc.c os2ahci.c pci.c ahci.c ata.c atapi.c ctxhook.c 71 SRCS = init.asm math.asm libc.c os2ahci.c pci.c ahci.c ata.c atapi.c \ 72 ctxhook.c 81 73 82 OBJS = init.obj libc.obj os2ahci.obj pci.obj ahci.obj ata.obj atapi.obj& 83 ctxhook.obj 84 85 # the Watcom linker needs commas between object files 86 LDOBJS = init.obj,libc.obj,os2ahci.obj,pci.obj,ahci.obj,ata.obj,atapi.obj,& 74 OBJS = init.obj libc.obj os2ahci.obj pci.obj ahci.obj ata.obj atapi.obj \ 87 75 ctxhook.obj 88 76 … … 94 82 clean: 95 83 rm -f $(OBJS) $(TARGET) 96 97 98 ###############################################################################99 # compiler/linker flags100 101 AFLAGS = -2 -bt=os2 -w3 -zq -ms102 CFLAGS = -ecc -bt=os2 -ms -zu -2 -w2 -wcd=138 -zp=1 -q -s -zdf103 CFLAGS_DEBUG = -d3 -hc104 LFLAGS = name $(TARGET) system os2 dll initglobal option map option quiet &105 option nodefaultlibs libpath $(LIB_DIRS) file $(LDOBJS) &106 library $(LIBS) option nocaseexact #option packd=64k107 LFLAGS_DEBUG = DEBUG CODEVIEW option cvpack108 109 !IFDEF DEBUG110 CFLAGS = $(CFLAGS) $(CFLAGS_DEBUG)111 LFLAGS = $(LFLAGS) $(LFLAGS_DEBUG)112 !ENDIF113 84 114 85 ############################################################################### … … 129 100 atapi.obj: atapi.c wmakefile $(INCS) ata.h atapi.h 130 101 131 ctxhook.obj: ctxhook.c wmakefile $(INCS) 102 ctxhook.obj: ctxhook.c wmakefile $(INCS) ata.h atapi.h 132 103 133 104 ############################################################################### … … 135 106 136 107 .asm.obj: 137 $(AS) $(AFLAGS) $(AS_INCLUDE) $*.asm -fo=$*.obj 138 wdis -l $*.obj 108 $(AS) $(AFLAGS) $(AS_INCLUDE) $*.asm 139 109 140 110 .c.obj: … … 143 113 144 114 $(TARGET): $(OBJS) os2ahci.def wmakefile 145 $(LD) $(LFLAGS) 115 $(LD) $(LFLAGS) $(OBJS),$(TARGET),$*.map,$(LIB_DIRS) $(LIBS),$*.def 116 mapsym os2ahci 146 117 118
Note:
See TracChangeset
for help on using the changeset viewer.