Changeset 63 for trunk/tools/internal/Makefile
- Timestamp:
- Oct 9, 2016, 10:53:41 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/internal/Makefile
r60 r63 1 1 ############################################################################### 2 # Makefile :: Builds 'fixcode' program for several platforms. [wmake] # 3 ############################################################################### 4 5 # 6 # This Makefile builds the 'fixcode' program for DOS, Windows, OS/2 and Linux. 7 # It is used to embed the anti-virus code into the AiR-BOOT image. 8 # This anti-virus code protects the MBR and is installed as a TSR by the 9 # loader. That's why it cannot be included at the source level. 10 # 2 # Makefile :: Builds 'fixcode' program for several platforms. [WMake] # 3 # --------------------------------------------------------------------------- # 4 # # 5 # This Makefile builds the 'fixcode' program for DOS, Windows, OS/2 & Linux. # 6 # It is used to embed the anti-virus code into the AiR-BOOT image. # 7 # This anti-virus code protects the MBR and is installed as a TSR by the # 8 # loader. That's why it cannot be included at the source level. # 9 # # 10 ############################################################################### 11 11 12 12 13 # … … 14 15 # This is used to compensate for the differences between the target platforms. 15 16 # 16 !include 17 !include ../../include/makefile.mif 17 18 18 19 … … 69 70 # we are building on Linux. 70 71 # 71 !ifdef 72 !ifdef __LINUX__ 72 73 !if "$(ASM)"=="masm" | "$(ASM)"=="tasm" | "$(ASM)"=="alp" 73 74 ASM=jwasm … … 76 77 77 78 !if "$(ASM)"=="jwasm" 78 # -Cp 79 # -zcw 79 # -Cp = case sensitive symbols 80 # -zcw = no _ prefix on symbols (C model) 80 81 ASM_FLAGS_D0=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DASSEMBLER=JWASM -q -Cp -Fo$^. -Fl=$^&.lst -Fw$^&.err 81 82 ASM_FLAGS_D1=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DASSEMBLER=JWASM -q -Zd -Zi -Fo$^. -Sa -Fl=$^&.lst -Fw$^&.err … … 86 87 ASM_FLAGS_D2=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -dASSEMBLER=TASM -zq -d1 -fo=$^. -fr=$^&.err 87 88 !elseif "$(ASM)"=="tasm" 88 # -ml 89 # -ml = case sensitive symbols 89 90 ASM_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -dASSEMBLER=TASM -t -l 90 91 ASM_FLAGS_D1=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -dASSEMBLER=TASM -t -z -zi -c -la … … 141 142 .AFTER 142 143 # @echo == AFTER == 143 !ifdef 144 !ifdef __MSDOS__ 144 145 @echo $(WARN_DOS_BLD_ENV) 145 146 !endif … … 150 151 # If this Makefile was modified, all targets are forcefully rebuilt. 151 152 # 152 all: 153 all: .SYMBOLIC Makefile.bu header $(TARGETS) footer 153 154 154 155 … … 172 173 # Show the header. 173 174 # 174 header: 175 header: .SYMBOLIC 175 176 @echo. 176 177 @echo ===================================================================== … … 183 184 # Show the footer. 184 185 # 185 footer: 186 footer: .SYMBOLIC 186 187 @echo All targets up to date ! 187 188 @echo. … … 194 195 # using the new level. 195 196 # 196 Makefile.bu: 197 Makefile.bu: Makefile 197 198 @echo. 198 199 @echo Makefile modified, forcing rebuild of all targets ! … … 222 223 # DOS 16-bits (COM) 223 224 ############################################################################### 224 $(BASENAME).com: 225 $(BASENAME).com: $(BASENAME).obj 225 226 $(LNK) $(LNK_FLAGS) file $^&.obj name $^. sys dos com 226 @if exist $^. @echo 227 @echo. 228 229 $(BASENAME).obj: 230 # @echo. 231 @echo TARGET: $^&.com 227 @if exist $^. @echo $^. $(MSG_SUCCESS) 228 @echo. 229 230 $(BASENAME).obj: $(BASENAME).asm 231 # @echo. 232 @echo TARGET: $^&.com [DOS 16-bits COM-file] 232 233 $(ASM) $(ASM_FLAGS) $(BASENAME).asm 233 234 @wdis -fi $^. > $^&.wda … … 237 238 # DOS 16-bits (MZ) 238 239 ############################################################################### 239 $(BASENAME)d.exe: 240 $(BASENAME)d.exe: $(BASENAME)d.obj 240 241 $(LNK) $(LNK_FLAGS) file $^&.obj name $^. sys dos 241 @if exist $^. @echo 242 @echo. 243 244 $(BASENAME)d.obj: 245 # @echo. 246 @echo TARGET: $^&.exe 242 @if exist $^. @echo $^. $(MSG_SUCCESS) 243 @echo. 244 245 $(BASENAME)d.obj: $(BASENAME).c $(BASENAME).h 246 # @echo. 247 @echo TARGET: $^&.exe [DOS 16-bits Executable] 247 248 $(CC16) $(CC16_FLAGS) -bt=dos $(BASENAME).c 248 249 @wdis -fi $^. > $^&.wda … … 252 253 # NT 32-bits (PE) 253 254 ############################################################################### 254 $(BASENAME)w.exe: 255 $(BASENAME)w.exe: $(BASENAME)w.obj 255 256 $(LNK) $(LNK_FLAGS) file $^&.obj name $^. sys nt 256 @if exist $^. @echo 257 @echo. 258 259 $(BASENAME)w.obj: 260 # @echo. 261 @echo TARGET: $^&.exe 257 @if exist $^. @echo $^. $(MSG_SUCCESS) 258 @echo. 259 260 $(BASENAME)w.obj: $(BASENAME).c $(BASENAME).h 261 # @echo. 262 @echo TARGET: $^&.exe [NT 32-bits Executable] 262 263 $(CC32) $(CC32_FLAGS) -I$(%WATCOM)$(DS)h$(DS)nt -bt=nt $(BASENAME).c 263 264 @wdis -fi $^. > $^&.wda … … 267 268 # OS/2 32-bits (LX) 268 269 ############################################################################### 269 $(BASENAME)2.exe: 270 $(BASENAME)2.exe: $(BASENAME)2.obj 270 271 $(LNK) $(LNK_FLAGS) file $^&.obj name $^. sys os2v2 271 @if exist $^. @echo 272 @echo. 273 274 $(BASENAME)2.obj: 275 # @echo. 276 @echo TARGET: $^&.exe 272 @if exist $^. @echo $^. $(MSG_SUCCESS) 273 @echo. 274 275 $(BASENAME)2.obj: $(BASENAME).c $(BASENAME).h 276 # @echo. 277 @echo TARGET: $^&.exe [OS/2 32-bits Executable] 277 278 $(CC32) $(CC32_FLAGS) -I$(%WATCOM)$(DS)h$(DS)os2 -bt=os2 $(BASENAME).c 278 279 @wdis -fi $^. > $^&.wda … … 282 283 # Linux 32-bits (ELF) 283 284 ############################################################################### 284 $(BASENAME)l.elf: 285 $(BASENAME)l.elf: $(BASENAME)l.obj 285 286 $(LNK) $(LNK_FLAGS) file $^&.obj name $^&.elf sys linux 286 287 # $(MV) $^&.elf $^. 287 @if exist $^. @echo 288 @echo. 289 290 $(BASENAME)l.obj: 291 # @echo. 292 @echo TARGET: $^&.elf 288 @if exist $^. @echo $^. $(MSG_SUCCESS) 289 @echo. 290 291 $(BASENAME)l.obj: $(BASENAME).c $(BASENAME).h 292 # @echo. 293 @echo TARGET: $^&.elf [Linux 32-bits Executable] 293 294 $(CC32) $(CC32_FLAGS) -bt=linux $(BASENAME).c 294 295 @wdis -fi $^. > $^&.wda … … 306 307 # Rebuild all targets. 307 308 # 308 rebuild: 309 rebuild: .SYMBOLIC 309 310 @%MAKE clean 310 311 @%MAKE all … … 313 314 # Remove all generated files. 314 315 # 315 clean: 316 clean: .SYMBOLIC 316 317 @for %%i in ($(TARGETS)) do @if exist %%i $(RM) %%i 317 318 @if exist *.obj $(RM) *.obj … … 326 327 # Help on using this Makefile. 327 328 # 328 help: 329 @echo. 330 @echo 331 @echo wmaketo build all targets332 @echo wmake showto show the list of buildable targets333 @echo wmake cleanto remove all generated files334 @echo wmake rebuildto rebuild all targets335 @echo wmake help forthis information329 help: .SYMBOLIC 330 @echo. 331 @echo The following actions are available: 332 @echo wmake to build all targets 333 @echo wmake show to show the list of buildable targets 334 @echo wmake clean to remove all generated files 335 @echo wmake rebuild to rebuild all targets 336 @echo wmake help to show this information 336 337 @echo. 337 338 … … 339 340 # Show the list of buildable targets. 340 341 # 341 show: 342 @echo. 343 @echo 344 @for %%i in ($(TARGETS)) do @echo 342 show: .SYMBOLIC 343 @echo. 344 @echo The following [case sensitive] targets can be built: 345 @for %%i in ($(TARGETS)) do @echo %%i 345 346 @echo. 346 347 # Alias for show 347 list: 348 list: .SYMBOLIC 348 349 @%MAKE show 349 350 … … 353 354 .ERROR 354 355 @echo. 355 @echo 356 @echo 357 @echo 358 @echo 359 @echo 356 @echo Oops! 357 @echo Some error occured in this build session. 358 @echo If it's a linker problem, it could be 359 @echo the result of out-of-sync object files. 360 @echo Doing a wmake rebuild might resolve the problem. 360 361 @%MAKE help 361 362 @echo. 362 363
Note:
See TracChangeset
for help on using the changeset viewer.