Changeset 144 for trunk/src/os2ahci/wmakefile
- Timestamp:
- Jan 3, 2013, 1:22:56 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/wmakefile
r112 r144 29 29 # 30 30 31 #32 # THE WATCOM BUILD IS BROKEN!33 #34 # It might run through but produces a non-working driver35 #36 37 31 ############################################################################### 38 32 # wmake directives … … 43 37 ############################################################################### 44 38 # Environment 39 45 40 46 41 # main path to OS/2 DDK; this needs to be set before this makefile will work … … 57 52 -I$(DDK)\base\h \ 58 53 -I$(DDK)\base\ibmh \ 59 54 -I$(DDK)\base\src\dev\dasd\diskh \ 60 55 -I$(DDK)\base\src\dev\thinkpad\dockii\apmcalls \ 61 -I$(CC16)\include62 63 AS_INCLUDE = -I :$(DDK)\base\inc \64 -I :$(DDK)\base\src\dev\dasd\diskinc56 # -I$(CC16)\include 57 58 AS_INCLUDE = -I=$(DDK)\base\inc \ 59 -I=$(DDK)\base\src\dev\dasd\diskinc 65 60 66 61 LIB_DIRS = $(DDK)\base\lib\ \ 67 62 $(DDK)\base\src\dev\dasd\devhlp\ \ 68 63 $(DDK)\base\src\dev\thinkpad\dockii\apmcalls\ \ 69 64 65 66 67 70 68 ############################################################################### 71 69 # Tool Chain 72 70 # 73 # This makefile uses the Watcom 16bit compiler. 74 # Linker and assembler are link.exe and alp.exe that ship with the OS/2 DDK 75 # 76 77 AS = $(DDK)\tools\alp.exe 71 # This makefile uses the Watcom 16-bit compiler, Watcom Assembler and Linker. 72 # You can change to the DDK Linker and Assembler by modifying the macros below. 73 # 74 75 76 #LINKER=ibm 77 LINKER=watcom 78 79 80 #AS = $(DDK)\tools\alp.exe 81 #AS = jwasm -Cp 82 AS = wasm 78 83 CC = wcc 79 84 LD = $(DDK)\base\tools\link.exe … … 82 87 MAPSYM = $(DDK)\base\tools\mapsym.exe 83 88 84 AFLAGS = -Mb 85 CFLAGS = -d3 -hc -bt=os2 -ms -zu -5 -w3 -wcd=138 -wcd=300 -ecc -zp1 -q -s -zgp -zfp -oi 86 CFLAGS_DEBUG = -d3 -hc 89 #AFLAGS = -Mb 90 #CFLAGS = -ei -5 -d3 -hc -bt=os2 -ms -zu -w3 -wcd=138 -wcd=300 -ecc -zp1 -q -s -zgp -zfp -oi 91 CFLAGS = -ei -5 -d0 -bt=os2 -ms -zu -w=0 -ecc -zp=1 -q -s -zgp -zfp -oi 92 CFLAGS_DEBUG = -ei -5 -d3 -hc -bt=os2 -ms -zu -ecc -zp=1 -q -s -zgp -zfp -od 93 87 94 LFLAGS = /noe /nod /packd /a:16 /batch /map /line 88 95 … … 92 99 TARGET = os2ahci.add 93 100 94 LIBS = addcalls doscalls rmcalls apmcalls # dhcalls not needed, see local devhelp.h 101 #LIBS = addcalls doscalls rmcalls apmcalls # dhcalls not needed, see local devhelp.h 102 LIBS = addcalls doscalls rmcalls apmcalls dhcalls 95 103 96 104 SRCS = init.asm math.asm libc.c os2ahci.c pci.c ahci.c ata.c atapi.c \ 97 105 ctxhook.c trace.c ioctl.c apm.c 98 106 99 107 OBJS = init.obj libc.obj os2ahci.obj pci.obj ahci.obj ata.obj atapi.obj \ … … 106 114 107 115 clean: 108 rm -f $(OBJS) $(TARGET) *.lst *.cod 116 rm -f $(OBJS) $(TARGET) *.cod *.lst *.def *.map *.sym *.err *.lnk \ 117 bldday.h 109 118 110 119 ############################################################################### 111 120 # Object/source dependencies 112 121 113 init.obj: init.asm Makefile114 115 libc.obj: libc.c Makefile $(INCS)116 117 os2ahci.obj: os2ahci.c Makefile $(INCS) bldday.h ioctl.h118 119 pci.obj: pci.c Makefile $(INCS)120 121 ahci.obj: ahci.c Makefile $(INCS) ata.h atapi.h122 123 ata.obj: ata.c Makefile $(INCS) ata.h124 125 atapi.obj: atapi.c Makefile $(INCS) ata.h atapi.h126 127 ctxhook.obj: ctxhook.c Makefile $(INCS) ata.h atapi.h128 129 apm.obj: apm.c Makefile $(INCS)130 131 ioctl.obj: ioctl.c Makefile $(INCS) atapi.h ioctl.h132 133 trace.obj: trace.c Makefile $(INCS)134 135 os2ahci.def: version.h os2ahci.def.template122 init.obj: $*.asm wmakefile 123 124 libc.obj: $*.c wmakefile $(INCS) 125 126 os2ahci.obj: $*.c wmakefile $(INCS) bldday.h ioctl.h 127 128 pci.obj: $*.c wmakefile $(INCS) 129 130 ahci.obj: $*.c wmakefile $(INCS) ata.h atapi.h 131 132 ata.obj: $*.c wmakefile $(INCS) $*.h 133 134 atapi.obj: $*.c wmakefile $(INCS) $*.h ata.h 135 136 ctxhook.obj: $*.c wmakefile $(INCS) ata.h atapi.h 137 138 apm.obj: $*.c wmakefile $(INCS) 139 140 ioctl.obj: $*.c wmakefile $(INCS) $*.h atapi.h 141 142 trace.obj: $*.c wmakefile $(INCS) 143 144 os2ahci.def: version.h $*.def.template 136 145 137 146 ############################################################################### … … 140 149 # emacs TAGS file creation 141 150 # NOTE: OS/2 emacs etags.exe expects an empty file named c:\dev\null... 142 tags: 143 151 tags: $(SRCS) $(INCS) 152 etags.exe $(SRCS) $(INCS) 144 153 145 154 bldday.h: 146 155 $(BLDDATE) > bldday.h 147 156 148 157 .asm.obj: 149 $(AS) $(AFLAGS) $(AS_INCLUDE) $*.asm 158 $(AS) $(AFLAGS) $(AS_INCLUDE) $*.asm 159 wdis -l $*.obj 150 160 151 161 .c.obj: 152 153 162 $(CC) $(CFLAGS) $(CC_INCLUDE) $*.c 163 wdis -l $*.obj 154 164 155 165 os2ahci.def: 156 $(BLDLEVEL) os2ahci.def.template os2ahci.def version.h 157 158 $(TARGET): $(OBJS) os2ahci.def wmakefile 159 $(LD) $(LFLAGS) $(OBJS),$(TARGET),$*.map,$(LIB_DIRS) $(LIBS),$*.def 160 mapsym os2ahci 161 162 166 $(BLDLEVEL) $*.def.template $*.def version.h 167 168 $(TARGET): $(OBJS) $*.def wmakefile 169 170 !if "$(LINKER)"=="watcom" 171 # Target name, system and type 172 @%create $*.lnk 173 @%append $*.lnk name $*.add 174 @%append $*.lnk sys os2 dll 175 # Merge BLDLEVEL information 176 @%append $*.lnk option 177 @qgrep -y -e "description" $*.def >> $*.lnk 178 # Set various options 179 @%append $*.lnk option protmode 180 @%append $*.lnk option map 181 @%append $*.lnk option quiet 182 @%append $*.lnk option nocase 183 @%append $*.lnk option stack=0 184 # Generate directives for objects, libraries and library search-paths 185 @for %f in ($(OBJS)) do @%append $*.lnk file %f 186 @for %f in ($(LIBS)) do @%append $*.lnk lib %f 187 @for %f in ($(LIB_DIRS)) do @%append $*.lnk libpath %f 188 # Attributes for the DATA and CODE segments 189 @%append $*.lnk segment type DATA SHARED 190 @%append $*.lnk segment type CODE IOPL 191 # Order segments by class 192 @%append $*.lnk order 193 @%append $*.lnk clname 'DATA' 194 @%append $*.lnk clname 'CONST' 195 @%append $*.lnk clname 'BSS' 196 @%append $*.lnk clname 'CODE' 197 # Link the stuff together and build the target 198 wlink @$*.lnk 199 200 !elseif "$(LINKER)"=="ibm" 201 $(LD) $(LFLAGS) $(OBJS),$(TARGET),$*.map,$(LIB_DIRS) $(LIBS),$*.def 202 mapsym $* 203 !else 204 @echo "Error: No valid linker specified" 205 !endif 206
Note:
See TracChangeset
for help on using the changeset viewer.