Changeset 180 for trunk/src/os2ahci/Makefile
- Timestamp:
- Dec 9, 2016, 8:18:01 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/Makefile
r176 r180 4 4 # 5 5 # Copyright (c) 2010 Christian Mueller, Markus Thielen. 6 # Copyright (c) 2013-2015 David Azarewicz 7 # Parts copied from/inspired by the Linux AHCI driver; 8 # those parts are (c) Linux AHCI/ATA maintainers 6 # Copyright (c) 2013-2016 David Azarewicz 9 7 # 10 # This program is free software; you can redistribute it and/or modify11 # it under the terms of the GNU General Public License as published by12 # the Free Software Foundation; either version 2 of the License, or13 # (at your option) any later version.14 #15 # This program is distributed in the hope that it will be useful,16 # but WITHOUT ANY WARRANTY; without even the implied warranty of17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the18 # GNU General Public License for more details.19 #20 # You should have received a copy of the GNU General Public License21 # along with this program; if not, write to the Free Software22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA23 ###############################################################################24 # Environment25 26 8 .ERASE 27 9 .SUFFIXES … … 29 11 30 12 # Define default build version if not specified in environment 31 BLD_MAJOR= 132 BLD_MINOR= 32# must be 2 digits13 BLD_MAJOR=2 14 BLD_MINOR=01 # must be 2 digits 33 15 BLD_REV=0 # not used at this time 34 FIXPACK= 16 FIXPACK=Test Build 35 17 36 18 !ifndef %ROOT … … 50 32 DDK=$(%DDK) 51 33 34 !ifndef %DRV32KIT 35 !error DRV32KIT must be defined in environment 36 !endif 37 DRV32KIT=$(%DRV32KIT) 38 52 39 !ifdef %VENDOR 53 40 VENDOR=$(%VENDOR) … … 71 58 !error BLD_DATE must be defined for test versions 72 59 !endif 73 WPIFILE=$(ROOT)\AHCI- test-$(VERSION)-$(%BLD_DATE)-WPI.zip60 WPIFILE=$(ROOT)\AHCI-$(VERSION)-$(%BLD_DATE)-WPI.zip 74 61 !else 75 62 WPIFILE=$(ROOT)\AHCI-$(VERSION)-WPI.zip … … 77 64 78 65 AS_INCLUDE = -I=$(DDK)\base\inc 79 LIB_DIRS = $(DDK)\base\lib\ 80 81 ############################################################################### 82 # Tool Chain 83 # 84 # This makefile uses the Watcom 16-bit compiler, Watcom Assembler and Linker. 85 # The updated DDK devhelp.h is required and a copy is in the include directory 86 # of this project. 87 # 88 89 %INCLUDE=..\include;$(DDK)\base\h; 90 %PATH=$(ROOT)\tools;$(WATCOM)\BINP;$(WATCOM)\BINW;$(DDK)\base\tools;$(%PATH) 66 67 %INCLUDE=.;$(ROOT)\src\include;$(DRV32KIT);$(WATCOM)\H;$(DDK)\base\h;$(DDK)\base32\h; 68 %PATH=$(ROOT)\Tools;$(TOOLKIT)\bin;$(DDK)\base\tools;$(WATCOM)\BINP;$(WATCOM)\BINW;$(%PATH) 69 91 70 AS=wasm 92 CC=wcc 71 CC=wcc386 93 72 MAPSYM=mapsym.exe 94 73 … … 98 77 !endif 99 78 100 AFLAGS = -q 101 CFLAGS= -ei -6 -d0 -bt=os2 -ms -zu -wx -ecc -zp1 -q -s -zgp -zfp -oi 102 CFLAGS_DEBUG = -ei -6 -d3 -hc -bt=os2 -ms -zu -ecc -zp1 -q -s -zgp -zfp -od 79 #DAZ need to find which structures need pack(1) so we can reset this back to -zp4 80 AFLAGS=-q -6p -bt=os2 -wx -d1 81 CFLAGS =-q -bt=os2 -6s -olinar -s -ze -zl -zq -zfp -zgp -ms -wx -zp1 -ecs -ei -za99 82 CFLAGS_DEBUG=-q -bt=os2 -6s -olinar -s -ze -zl -zq -zfp -zgp -ms -wx -zp1 -ecs -ei -za99 103 83 !ifneq FIXPACK 104 84 CFLAGS+= -DTESTVER … … 108 88 # Main dependencies 109 89 110 LIBS = addcalls doscalls rmcalls apmcalls os2286p.lib 111 112 SRCS = init.asm math.asm libc.c os2ahci.c pci.c ahci.c ata.c atapi.c & 113 ctxhook.c trace.c ioctl.c apm.c 114 115 OBJS = init.obj libc.obj os2ahci.obj pci.obj ahci.obj ata.obj atapi.obj & 116 ctxhook.obj trace.obj ioctl.obj apm.obj 90 LIBS = $(DRV32KIT)\Drv32.lib $(DDK)\base32\lib\kee.lib 91 92 OBJS = os2ahci.obj pci.obj ahci.obj ata.obj atapi.obj & 93 ctxhook.obj trace.obj ioctl.obj apm.obj thunk.obj 117 94 118 95 INCS = os2ahci.h ahci.h … … 121 98 122 99 clean: .symbolic 123 100 rm -f $(OBJS) os2ahci.add *.cod *.lst *.def *.map *.sym *.err *.lnk version.h 124 101 125 102 ############################################################################### 126 103 # Object/source dependencies 127 104 128 libc.obj: libc.c Makefile $(INCS)129 130 105 os2ahci.obj: os2ahci.c Makefile $(INCS) version.h ioctl.h 131 106 … … 149 124 # Action definitions (compile/link commands) 150 125 151 # emacs TAGS file creation152 # NOTE: OS/2 emacs etags.exe expects an empty file named c:\dev\null...153 tags: $(SRCS) $(INCS)154 etags.exe $(SRCS) $(INCS)155 156 126 version.h: Makefile .always 157 158 159 160 161 162 163 164 165 @AddToFile $^@,$#define BLDLEVEL,BLDLEVEL2,$(VENDOR),$(VERSION),AHCI Driver (c) 2015$(VENDOR),$(FIXPACK)127 @%create $^@ 128 @%append $^@ /* Autogenerated by Makefile */ 129 @%append $^@ $#define DMAJOR $(BLD_MAJOR) 130 @%append $^@ $#define DMINOR $(BLD_MINOR) 131 @%append $^@ $#define DVENDOR "$(VENDOR)" 132 @AddToFile $^@,$#define BLD_YEAR,DATEYEAR 133 @AddToFile $^@,$#define BLD_MONTH,DATEMONTH 134 @AddToFile $^@,$#define BLD_DAY,DATEDAY 135 @AddToFile $^@,$#define BLDLEVEL,BLDLEVEL2,$(VENDOR),$(VERSION),AHCI Driver (c) %Y $(VENDOR),$(FIXPACK) 166 136 167 137 .asm.obj: .autodepend 168 169 138 $(AS) $(AFLAGS) $(AS_INCLUDE) $[@ 139 #wdis -l $^@ 170 140 171 141 .c.obj: .autodepend 172 $(CC) $(CFLAGS) $[@ 173 #wdis -l $^@ 174 175 os2ahci.add: $(OBJS) Makefile 176 # Target name, system and type 177 @%create $*.lnk 178 @%append $*.lnk name $*.add 179 @%append $*.lnk sys os2 dll 180 # Set various options 181 @%append $*.lnk option protmode 182 @%append $*.lnk option map 183 @%append $*.lnk option quiet 184 @%append $*.lnk option nocase 185 @%append $*.lnk option stack=0 186 # Generate directives for objects, libraries and library search-paths 187 @for %f in ($(OBJS)) do @%append $*.lnk file %f 188 @for %f in ($(LIBS)) do @%append $*.lnk lib %f 189 @for %f in ($(LIB_DIRS)) do @%append $*.lnk libpath %f 190 # Attributes for the DATA and CODE segments 191 @%append $*.lnk segment type DATA SHARED 192 @%append $*.lnk segment type CODE IOPL 193 # Order segments by class 194 @%append $*.lnk order 195 @%append $*.lnk clname 'DATA' 196 @%append $*.lnk clname 'CONST' 197 @%append $*.lnk clname 'BSS' 198 @%append $*.lnk clname 'CODE' 199 # Link the stuff together and build the target 200 wlink @$*.lnk 201 @%erase $*.lnk 142 $(CC) $(CFLAGS) $[@ 143 wdis -l $^@ 144 145 os2ahci.add: version.h $(OBJS) makefile 146 @%create $^&.lrf 147 @%append $^&.lrf format os2 lx phys 148 @%append $^&.lrf option mixed1632,nostub,align=4 149 @%append $^&.lrf option quiet,int,verbose,nocaseexact,eliminate 150 @%append $^&.lrf option map=$^*.map 151 @%append $^&.lrf option stack=0 152 # @%append $*.lnk option protmode 153 @%append $^&.lrf sort global 154 @%append $^&.lrf option osname='ArcaOS' 155 @%append $^&.lrf name $^@ 156 @%append $^&.lrf file $(DRV32KIT)\Drv32.lib(header) 157 @for %f in ($(OBJS)) do @%append $^&.lrf file %f 158 @for %f in ($(LIBS)) do @%append $^&.lrf library %f 159 # @%append $*.lnk segment type DATA SHARED 160 # @%append $*.lnk segment type CODE IOPL 161 # # Order segments by class 162 # @%append $*.lnk order 163 # @%append $*.lnk clname 'DATA' 164 # @%append $*.lnk clname 'CONST' 165 # @%append $*.lnk clname 'BSS' 166 # @%append $*.lnk clname 'CODE' 167 @wlink @$^&.lrf 168 @%erase $^&.lrf 202 169 203 170 os2ahci.sym: os2ahci.map 204 205 206 171 wat2map.cmd $[@ $^*.ma1 172 $(MAPSYM) $^*.ma1 173 @%erase $^*.ma1 207 174 208 175 release: os2ahci.add os2ahci.sym .symbolic … … 221 188 222 189 @md $(ZIPDIR)\pkg20 223 @copy $(ROOT)\src\os2ahci\R EADME$(ZIPDIR)\pkg20 >NUL190 @copy $(ROOT)\src\os2ahci\ReadMe.txt $(ZIPDIR)\pkg20 >NUL 224 191 @copy $(ROOT)\Tools\LICENSE $(ZIPDIR)\pkg20 >NUL 225 192
Note:
See TracChangeset
for help on using the changeset viewer.