Changeset 46 for trunk/TOOLS
- Timestamp:
- Apr 12, 2014, 8:23:32 AM (11 years ago)
- Location:
- trunk/TOOLS
- Files:
-
- 2 added
- 2 deleted
- 9 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/TOOLS/DOS/SETABOOT/SETABOOT.ASM
r37 r46 20 20 21 21 Include ../../../INCLUDE/ASM.INC 22 include ../../../INCLUDE/DOS/AIRBOOT.INC22 ;include ../../../INCLUDE/DOS/AIRBOOT.INC 23 23 24 24 .386p … … 60 60 db ' detected.', 13, 10, 0 61 61 62 Include ../../../INCLUDE/DOS/CONST.ASM62 ; Include ../../../INCLUDE/DOS/CONST.ASM 63 63 64 64 AiRBOOTdetected db 0 -
trunk/TOOLS/INTERNAL/FIXCODE
r43 r46 4 4 # $airboot@ecomstation.com$ 5 5 # 6 # This is a hack until the Linux version of FIXCODE.C is finished.6 # This is a quick-hack until the Linux version of FIXCODE.C is finished. 7 7 # Note that it does not search for the AiR-BOOT Protection Signature, 8 8 # but embeds it at the 'well known' location. 9 # I t the protection image is moved, this script will corrupt AIR-BOOT.COM10 # of which the final AIRBOOT.BIN is derived.9 # If the protection image is moved, this script will produce a corrupted 10 # AIRBOOT.BIN. 11 11 # Also, a code-size of 35h (max size) is always inserted. 12 # Furthermore, it does no sanity checks whatsoever.12 # Furthermore, it does not do any sanity checks whatsoever. 13 13 # 14 14 15 PROT_IMG="MBR-PROT/MBR_PROT.COM" 15 # 16 # This script is now obsolete. 17 # 18 exit 1; 19 20 21 PROT_IMG="MBR-PROT/MBR-PROT.BIN" 16 22 AB_INTERIM_IMG="AIR-BOOT.COM" 23 AB_IMG="AIRBOOT.BIN" 17 24 CODE_SIZE_OFFSET=16 18 25 PROT_IMG_OFFSET=26624 19 26 20 27 28 function echox() { 29 echo -e $@; 30 } 31 32 21 33 function Header() { 22 echo "Header";34 echox "\t## FIXCODE script for Linux ##"; 23 35 } 24 36 25 37 function CheckIfFileExists() { 26 echo "CheckIfFileExists";38 echox "\tCheckIfFileExists"; 27 39 if [ ! -f "${1}" ]; then 28 echo "ERROR: File ${1} could not be found !";29 echo "Aborting...";40 echox "\tERROR: File ${1} could not be found !"; 41 echox "\t Aborting..."; 30 42 exit 1; 31 43 else 32 echo "File ${1} found, OK.";44 echox "\tFile ${1} found, OK."; 33 45 fi; 34 46 } 35 47 48 function CreateImage() { 49 echox "\tCreateImage"; 50 cp -a "${1}" "${2}"; 51 } 52 36 53 function EmbedCodeSize() { 37 echo "EmbedCodeSize"; 38 echo -n "5" | dd of="${1}" bs=1 seek=${CODE_SIZE_OFFSET} conv=notrunc; 54 echox "\tEmbedCodeSize"; 55 echo "${1}" 56 echo -n "5" | dd of="${1}" bs=1 seek=${CODE_SIZE_OFFSET} conv=notrunc 2> /dev/null; 39 57 } 40 58 41 59 function EmbedProtectionImage() { 42 echo "EmbedProtectionImage";43 dd if="${1}" of="${2}" bs=1 seek=${PROT_IMG_OFFSET} conv=notrunc ;60 echox "\tEmbedProtectionImage"; 61 dd if="${1}" of="${2}" bs=1 seek=${PROT_IMG_OFFSET} conv=notrunc 2> /dev/null; 44 62 } 45 63 46 64 function VerifyImage() { 47 echo "VerfyImage";65 echox "\tVerfyImage"; 48 66 } 49 67 50 68 function Footer() { 51 echo "Footer"; 69 echox "\t## AiR-BOOT code fixed ##"; 70 echo ""; 52 71 } 53 72 … … 58 77 # 59 78 function Main() { 60 echo "## Main ##";79 echo ""; 61 80 Header; 62 CheckIfFileExists "${PROT_IMG}" 63 CheckIfFileExists "${AB_INTERIM_IMG}" 64 EmbedCodeSize "${AB_INTERIM_IMG}"; 65 EmbedProtectionImage "${PROT_IMG}" "${AB_INTERIM_IMG}"; 81 CheckIfFileExists "${PROT_IMG}"; 82 CheckIfFileExists "${AB_INTERIM_IMG}"; 83 CreateImage "${AB_INTERIM_IMG}" "${AB_IMG}"; 84 EmbedProtectionImage "${PROT_IMG}" "${AB_IMG}"; 85 EmbedCodeSize "${AB_IMG}"; 66 86 Footer; 67 87 } -
trunk/TOOLS/INTERNAL/FIXCODE.ASM
r43 r46 41 41 COM_CodeName db 'AIR-BOOT.COM', 0 42 42 COM_LoadMBR db ' - Loading MBR-protection from file...$' 43 COM_MBRName db 'MBR-PROT\MBR _PROT.COM', 043 COM_MBRName db 'MBR-PROT\MBR-PROT.BIN', 0 44 44 COM_MergeMBR db ' - Merging MBR-protection into bootcode...$' 45 45 COM_CountCode db ' - Count code in bootcode-image...$' … … 51 51 COM_FailedReadCode db 'Read air-boot.com failed', 13, 10, '$' 52 52 COM_FailedInvalidCode db 'Invalid air-boot.com', 13, 10, '$' 53 COM_FailedOpenMBR db 'mbr-prot\mbr _prot.comnot found', 13, 10, '$'54 COM_FailedReadMBR db 'Read mbr-prot\mbr _prot.comfailed', 13, 10, '$'55 COM_FailedInvalidMBR db 'Invalid mbr-prot\mbr _prot.com', 13, 10, '$'53 COM_FailedOpenMBR db 'mbr-prot\mbr-prot.bin not found', 13, 10, '$' 54 COM_FailedReadMBR db 'Read mbr-prot\mbr-prot.bin failed', 13, 10, '$' 55 COM_FailedInvalidMBR db 'Invalid mbr-prot\mbr-prot.bin', 13, 10, '$' 56 56 COM_FailedWriteCode db 'Write air-boot.com failed', 13, 10, '$' 57 57 … … 65 65 ShowMessage EndP 66 66 67 ShowError Proc Near 68 mov ah, 09h 69 int 21h ; DOS: WRITE STRING DS:DX TO CONSOLE 70 jmp EndProgram 71 ret 72 ShowError EndP 67 ShowError Proc Near 68 mov ah, 09h 69 int 21h ; DOS: WRITE STRING DS:DX TO CONSOLE 70 mov al,1 ; Error code 71 jmp EndProgram 72 ret 73 ShowError EndP 73 74 74 75 COM_Init: … … 128 129 call ShowMessage 129 130 130 ; Open MBR_PROT. COM131 ; Open MBR_PROT.BIN 131 132 mov dx, offset COM_LoadMBR 132 133 call ShowMessage … … 141 142 DoneOpenMBR: mov bx, ax ; BX = Filehandle 142 143 143 ; Load MBR _PROT.COM144 ; Load MBR-PROT.BIN 144 145 mov ah, 3Fh 145 146 mov cx, 1024 ; Image size … … 204 205 mov dx, offset COM_Failed 205 206 call ShowMessage 207 mov al,2 ; Error code 206 208 jmp EndProgram 207 209 … … 220 222 221 223 mov si, offset BootCode 222 add si, 512*53 223 mov cx, 256 224 mov dx, 53 224 add si, 512*53 ; 6A00 225 mov cx, 256 ; 512 bytes 226 mov dx, 53 ; initial count 225 227 COM_CodeEndLoop:push cx 226 228 push si … … 277 279 mov dx, offset COM_Okay 278 280 call ShowMessage 281 xor al,al ; No Error 279 282 jmp EndProgram 280 283 … … 282 285 EndProgram: 283 286 ; DOS: TERMINATE PROGRAM 284 mov a x, 4C00h287 mov ah, 04Ch 285 288 int 21h 286 289 -
trunk/TOOLS/INTERNAL/FIXCODE.C
r37 r46 1 // AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz 2 // 3 // This file is part of AiR-BOOT 4 // 5 // AiR-BOOT is free software: you can redistribute it and/or modify it under 6 // the terms of the GNU General Public License as published by the Free 7 // Software Foundation, either version 3 of the License, or (at your option) 8 // any later version. 9 // 10 // AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY 11 // WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS 12 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 // details. 14 // 15 // You should have received a copy of the GNU General Public License along with 16 // AiR-BOOT. If not, see <http://www.gnu.org/licenses/>. 17 // 18 19 /* 20 // FIXCODE.C -- Fix the AiR-BOOT image; include the code-size and MBR prot-img. 21 // This reads AIR-BOOT.COM, merges MBR-PROT.BIN and writes AIRBOOT.BIN. 22 // It is a quick-and-dirty translation of the original DOS-only ASM file. 23 // Of course it's not as small but it's much easier to maintain across 24 // multiple platforms. 25 */ 26 27 1 28 #include "FIXCODE.H" 2 29 … … 19 46 20 47 21 #define IN_FILE "AIR-BOOT.COM" // Target from assembly. 22 #define MERGE_FILE "MBR_PROT.BIN" // MBR protection TSR. 23 #define OUT_FILE "AIRBOOT.BIN" // Generated loader image. 24 25 26 48 /* File names */ 49 #define IN_FILE "AIR-BOOT.COM" // Target from assembly. 50 #ifdef PLATFORM_LINUX 51 #define MERGE_FILE "MBR-PROT/MBR-PROT.BIN" // MBR protection TSR. 52 #else 53 #define MERGE_FILE "MBR-PROT\\MBR-PROT.BIN" // MBR protection TSR. 54 #endif 55 #define OUT_FILE "AIRBOOT.BIN" // Generated loader image. 56 57 58 /* Copyright message */ 59 char Copyright[] = "AiR-BOOT Bootcode Image Fix\n" 60 " - (c) Copyright 2009-2012 by M. Kiewitz\n"; 61 /* Progress messages */ 62 char LoadCode[] = " - Loading bootcode from file..."; 63 char LoadMBR[] = " - Loading MBR-protection from file..."; 64 char MergeMBR[] = " - Merging MBR-protection into bootcode..."; 65 char CountCode[] = " - Count code in bootcode-image..."; 66 char WriteCode[] = " - Saving bootcode to file..."; 67 char Okay[] = "ok\n"; 68 char Failed[] = "failed\n"; 69 70 /* Error messages */ 71 char FailedOpenCode[] = IN_FILE" not found\n"; 72 char FailedReadCode[] = "Read "IN_FILE" failed\n"; 73 char FailedInvalidCode[] = "Invalid "IN_FILE"\n"; 74 char FailedOpenMBR[] = MERGE_FILE" not found\n"; 75 char FailedReadMBR[] = "Read "MERGE_FILE" failed\n"; 76 char FailedInvalidMBR[] = "Invalid "MERGE_FILE"\n"; 77 char FailedWriteCode[] = "Write "OUT_FILE" failed\n"; 78 79 /* The signature we search for in the AIR-BOOT.COM image */ 80 char MBRProtectionSignature[] = "AiR-BOOT MBR-Protection Image"; 81 82 /* File buffers */ 83 char BootCode[IMAGE_SIZE]; // Buffer for boot-image 84 char MBRProtection[1024]; // Buffer for protection-image 85 86 87 88 89 /* 90 // Main Entrypoint. 91 */ 27 92 int main(int argc, char* argv[]) { 28 FILE* ifile = NULL; 29 FILE* mfile = NULL; 30 FILE* ofile = NULL; 31 93 FILE* ifile = NULL; 94 FILE* mfile = NULL; 95 FILE* ofile = NULL; 96 size_t ibytes = 0; 97 size_t mbytes = 0; 98 size_t obytes = 0; 99 unsigned i = 0; 100 unsigned found = 0; 101 102 103 #if DEBUG_LEVEL > 0 104 printf("\n%s\n", welcome); 105 printf("Debug level is: %d\n\n", DEBUG_LEVEL); 106 #endif 107 108 /* 109 // Show copyright message. 110 */ 111 printf("%s",Copyright); 112 113 /* 114 // Load AIR-BOOT.COM 115 */ 116 printf("%s",LoadCode); 32 117 ifile = fopen(IN_FILE, "rb"); 118 if (!ifile) { 119 printf("%s",FailedOpenCode); 120 exit(1); 121 } 122 ibytes = fread(BootCode, 1, IMAGE_SIZE, ifile); 123 if (ferror(ifile)) { 124 printf("%s",FailedReadCode); 125 exit(1); 126 } 127 //printf("ibytes: %d\n", ibytes); 128 fread(BootCode, 1, 1, ifile); 129 if (ibytes != IMAGE_SIZE || !feof(ifile)) { 130 printf("%s", FailedInvalidCode); 131 exit(1); 132 } 133 printf("%s", Okay); 134 135 136 /* 137 // Load MBR-PROT.BIN 138 */ 139 printf("%s",LoadMBR); 33 140 mfile = fopen(MERGE_FILE, "rb"); 141 if (!mfile) { 142 printf("%s",FailedOpenMBR); 143 exit(1); 144 } 145 mbytes = fread(MBRProtection, 1, MBRPROT_SIZE, mfile); 146 if (ferror(mfile)) { 147 printf("%s",FailedReadMBR); 148 exit(1); 149 } 150 fread(MBRProtection, 1, 1, mfile); 151 if (mbytes != MBRPROT_SIZE || !feof(mfile)) { 152 printf("%s", FailedInvalidMBR); 153 exit(1); 154 } 155 printf("%s", Okay); 156 157 158 /* 159 // Find Protection Image Signature. 160 // Note that this signature must reside on a sector boundary. 161 */ 162 for (i=0; i<55; i++) { 163 if (!memcmp(MBRProtectionSignature, &BootCode[i*SECSIZE], strlen(MBRProtectionSignature))) { 164 found = 1; 165 break; 166 } 167 } 168 169 /* 170 // Merge Protection Image. 171 */ 172 printf("%s",MergeMBR); 173 if (!found) { 174 printf("%s",Failed); 175 exit(2); 176 } 177 memcpy(&BootCode[i*SECSIZE], MBRProtection, MBRPROT_SIZE); 178 printf("%s", Okay); 179 180 181 /* 182 // Count Code Sectors. 183 // Obsolete now since the Protection Image has moved just below the 184 // Configuration and the code is always max. size. 185 // Overlap checking is done while assembling AIR-BOOT.ASM. 186 */ 187 printf("%s", CountCode); 188 BootCode[16] = 53; 189 printf("%s", Okay); 190 191 /* 192 // Write AIRBOOT.BIN 193 */ 194 printf("%s", WriteCode); 34 195 ofile = fopen(OUT_FILE, "wb"); 35 36 37 printf("\n%s\n", welcome); 38 39 #if DEBUG_LEVEL > 0 40 printf("Debug level is: %d", DEBUG_LEVEL); 41 #endif 42 43 196 if (!ofile) { 197 printf("%s", FailedWriteCode); 198 exit(3); 199 } 200 obytes = fwrite(BootCode, 1, IMAGE_SIZE, ofile); 201 if (obytes != IMAGE_SIZE || ferror(ofile)) { 202 printf("%s", FailedWriteCode); 203 exit(3); 204 } 205 printf("%s", Okay); 206 207 208 /* 209 // Close files. 210 */ 211 if (ifile) 212 fclose(ifile); 213 if (mfile) 214 fclose(mfile); 215 if (ofile) 216 fclose(ofile); 44 217 45 218 -
trunk/TOOLS/INTERNAL/FIXCODE.H
r37 r46 6 6 #define PLATFORM_DOS 7 7 #elif defined(__OS2__) && !defined(OS2) 8 #define INCL_NOPMAPI9 #define INCL_BASE10 #define INCL_DOS11 #define INCL_DOSDEVIOCTL12 #include <os2.h>13 8 #define PLATFORM_OS2 14 9 #elif defined(__NT__) 15 #include <windows.h>16 10 #define PLATFORM_WINNT 17 11 #elif defined(__LINUX__) … … 21 15 #endif 22 16 17 23 18 #include <stdlib.h> 24 19 #include <stdio.h> … … 26 21 27 22 28 29 30 31 32 33 34 35 23 #define IMAGE_SIZE 31744 24 #define MBRPROT_SIZE 1024 25 #define SECSIZE 512 36 26 37 27 #endif 38 39 40 41 42 43 -
trunk/TOOLS/INTERNAL/Makefile
r37 r46 102 102 # 103 103 CC16=wcc 104 CC16_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -w4 -e25 -zq -od -fo=$^. 105 CC16_FLAGS_D1=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -d2 -w4 -e25 -zq -od -fo=$^. 106 CC16_FLAGS_D2=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -d2 -w4 -e25 -zq -od -fo=$^. 104 MM16=-ml 105 CC16_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM16) -w4 -e25 -zq -otexan -fo=$^. -fr=$^&.ERR 106 CC16_FLAGS_D1=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM16) -d2 -w4 -e25 -zq -od -fo=$^. -fr=$^&.ERR 107 CC16_FLAGS_D2=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM16) -d2 -w4 -e25 -zq -od -fo=$^. -fr=$^&.ERR 107 108 CC16_FLAGS=$(CC16_FLAGS_D$(DEBUG_LEVEL)) 108 109 … … 110 111 # 32-bits C Compiler 111 112 # 113 MM32=-mf 112 114 CC32=wcc386 113 CC32_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -w4 -e25 -zq -od -6r -mf -fo=$^.114 CC32_FLAGS_D1=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -d2 -w4 -e25 -zq -od -6r -mf -fo=$^.115 CC32_FLAGS_D2=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -d2 -w4 -e25 -zq -od -6r -mf -fo=$^.115 CC32_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM32) -w4 -e25 -zq -otexan -6r -fo=$^. -fr=$^&.ERR 116 CC32_FLAGS_D1=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM32) -d2 -w4 -e25 -zq -od -6r -fo=$^. -fr=$^&.ERR 117 CC32_FLAGS_D2=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM32) -d2 -w4 -e25 -zq -od -6r -fo=$^. -fr=$^&.ERR 116 118 CC32_FLAGS_R=-w4 -e25 -zq -od -6r -mf -fo=$^. 117 119 CC32_FLAGS=$(CC32_FLAGS_D$(DEBUG_LEVEL)) … … 210 212 # 211 213 212 #213 # While the DOS build-environment has been kept alive in this version,214 # it has several drawbacks:215 # - No support for long filenames216 # - Very limited memory217 # - JWasmR does not work because of memory limitations218 # - JWasmD does not work at all219 # - Batch scripting is very rudimentairy220 #221 # Therefore, the DOS build-environment will most probably disappear222 # in future versions.223 # This does not influence the building of DOS targets, which can be done224 # on OS/2, Windows or Linux.225 #226 227 228 214 229 215 … … 244 230 @echo TARGET: $^&.COM [DOS 16-bits COM-file] 245 231 $(ASM) $(ASM_FLAGS) $(BASENAME).ASM 246 @wdis $^. > $^&.WDA232 @wdis -fi $^. > $^&.WDA 247 233 248 234 … … 259 245 @echo TARGET: $^&.EXE [DOS 16-bits Executable] 260 246 $(CC16) $(CC16_FLAGS) -bt=dos $(BASENAME).C 261 @wdis $^. > $^&.WDA247 @wdis -fi $^. > $^&.WDA 262 248 263 249 … … 274 260 @echo TARGET: $^&.EXE [NT 32-bits Executable] 275 261 $(CC32) $(CC32_FLAGS) -I$(%WATCOM)$(DS)h$(DS)nt -bt=nt $(BASENAME).C 276 @wdis $^. > $^&.WDA262 @wdis -fi $^. > $^&.WDA 277 263 278 264 … … 289 275 @echo TARGET: $^&.EXE [OS/2 32-bits Executable] 290 276 $(CC32) $(CC32_FLAGS) -I$(%WATCOM)$(DS)h$(DS)os2 -bt=os2 $(BASENAME).C 291 @wdis $^. > $^&.WDA277 @wdis -fi $^. > $^&.WDA 292 278 293 279 … … 305 291 @echo TARGET: $^&.ELF [Linux 32-bits Executable] 306 292 $(CC32) $(CC32_FLAGS) -bt=linux $(BASENAME).C 307 @wdis $^. > $^&.WDA293 @wdis -fi $^. > $^&.WDA 308 294 309 295 … … 330 316 @if exist *.OBJ $(RM) *.OBJ 331 317 @if exist *.WDA $(RM) *.WDA 318 @if exist *.NDA $(RM) *.NDA 332 319 @if exist *.MAP $(RM) *.MAP 333 320 @if exist *.LST $(RM) *.LST -
trunk/TOOLS/OS2/SETABOOT/.build
r45 r46 1 1 #!/bin/bash 2 2 3 make clean4 3 make -
trunk/TOOLS/OS2/SETABOOT/.clean
r45 r46 2 2 3 3 make clean 4 make -
trunk/TOOLS/OS2/SETABOOT/Makefile
r45 r46 1 1 ############################################################################### 2 # Makefile :: Builds FIXCODE program for several platforms.[wmake] #2 # Makefile :: Builds the SET(A)BOOT Helper for several platforms. [wmake] # 3 3 ############################################################################### 4 5 # 6 # This Makefile builds the FIXCODE program for DOS, Windows, OS/2 and Linux. 7 # FIXCODE 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. 4 # rousseau@ecomstation.com 5 # 6 # Derived from the INSTALL Makefile. 7 # 8 9 # 10 # This Makefile builds the SET(A)BOOT Helper for DOS, Windows, OS/2 and Linux. 11 # Like FIXCODE, each platform version has a letter appended it: 12 # 'D' for DOS, 'W' for Windows, '2' for OS/2 and 'L' for Linux. 10 13 # 11 14 … … 14 17 # This is used to compensate for the differences between the target platforms. 15 18 # 16 !include ../../ INCLUDE/MAKEFILE.MIF19 !include ../../../INCLUDE/MAKEFILE.MIF 17 20 18 21 … … 41 44 42 45 # 43 # Base Name of Program to build. 46 # Base Name of Source Program to compile. 47 # 48 BASENAME=SETABOOT 49 50 # 51 # Base Name of Executable Module to build. 44 52 # A letter is appended for each platform version: 45 53 # D=DOS, W=Windows, 2=OS2, L=Linux. 46 # The DOS COM-version has no suffix. 47 # 48 BASENAME=FIXCODE 54 # 55 MODULE=$(BASENAME) 49 56 50 57 # 51 58 # This is a list of the Targets to be built. 52 59 # 53 TARGETS=$(BASENAME).COM $(BASENAME)D.EXE $(BASENAME)W.EXE $(BASENAME)2.EXE $(BASENAME)L.ELF 54 #TARGETS=$(BASENAME)D.EXE 55 #TARGETS=$(BASENAME).COM 60 #TARGETS=$(MODULE)D.EXE $(MODULE)W.EXE $(MODULE)2.EXE $(MODULE)L.ELF 61 TARGETS=$(MODULE).EXE 56 62 57 63 # … … 78 84 # -zcw = no _ prefix on symbols (C model) 79 85 ASM_FLAGS_D0=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DASSEMBLER=JWASM -q -Cp -Fo$^. -Fl=$^&.LST -Fw$^&.ERR 80 ASM_FLAGS_D1=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DASSEMBLER=JWASM -q - Zd -Zi -Fo$^. -Sa -Fl=$^&.LST -Fw$^&.ERR81 ASM_FLAGS_D2=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DASSEMBLER=JWASM -q - Zd -Zi -Fo$^. -Sa -Fl=$^&.LST -Fw$^&.ERR86 ASM_FLAGS_D1=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DASSEMBLER=JWASM -q -Cp -Zd -Zi -Fo$^. -Sa -Fl=$^&.LST -Fw$^&.ERR 87 ASM_FLAGS_D2=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DASSEMBLER=JWASM -q -Cp -Zd -Zi -Fo$^. -Sa -Fl=$^&.LST -Fw$^&.ERR 82 88 !elseif "$(ASM)"=="wasm" 83 89 ASM_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -dASSEMBLER=TASM -zq -fo=$^. -fr=$^&.ERR … … 86 92 !elseif "$(ASM)"=="tasm" 87 93 # -ml = case sensitive symbols 88 ASM_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -dASSEMBLER=TASM -t - l89 ASM_FLAGS_D1=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -dASSEMBLER=TASM -t - z -zi -c -la90 ASM_FLAGS_D2=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -dASSEMBLER=TASM -t - z -zi -c -la94 ASM_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -dASSEMBLER=TASM -t -ml -l 95 ASM_FLAGS_D1=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -dASSEMBLER=TASM -t -ml -z -zi -c -la 96 ASM_FLAGS_D2=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -dASSEMBLER=TASM -t -ml -z -zi -c -la 91 97 !elseif "$(ASM)"=="alp" 92 98 ASM_FLAGS_D0=-D:DEBUG_LEVEL=$(DEBUG_LEVEL) -D:ASSEMBLER=ALP -Mb +Feo:OBJ +Fl +Fel:LST +Fm +Fem:ERR … … 101 107 # 16-bits C Compiler 102 108 # 109 MM16=-ml 103 110 CC16=wcc 104 CC16_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -w4 -e25 -zq -od -fo=$^.105 CC16_FLAGS_D1=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -d2 -w4 -e25 -zq -od -fo=$^.106 CC16_FLAGS_D2=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -d2 -w4 -e25 -zq -od -fo=$^.111 CC16_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM16) -w4 -e25 -zq -otexan -fo=$^. -fr=$^&.ERR 112 CC16_FLAGS_D1=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM16) -d2 -w4 -e25 -zq -od -fo=$^. -fr=$^&.ERR 113 CC16_FLAGS_D2=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM16) -d3 -w4 -e25 -zq -od -fo=$^. -fr=$^&.ERR 107 114 CC16_FLAGS=$(CC16_FLAGS_D$(DEBUG_LEVEL)) 108 115 … … 110 117 # 32-bits C Compiler 111 118 # 119 MM32=-mf 112 120 CC32=wcc386 113 CC32_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -w4 -e25 -zq -od -6r -mf -fo=$^. 114 CC32_FLAGS_D1=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -d2 -w4 -e25 -zq -od -6r -mf -fo=$^. 115 CC32_FLAGS_D2=-dDEBUG_LEVEL=$(DEBUG_LEVEL) -d2 -w4 -e25 -zq -od -6r -mf -fo=$^. 116 CC32_FLAGS_R=-w4 -e25 -zq -od -6r -mf -fo=$^. 121 CC32_FLAGS_D0=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM32) -w4 -e25 -zq -otexan -6r -fo=$^. -fr=$^&.ERR 122 CC32_FLAGS_D1=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM32) -d2 -w4 -e25 -zq -od -6r -fo=$^. -fr=$^&.ERR 123 CC32_FLAGS_D2=-dDEBUG_LEVEL=$(DEBUG_LEVEL) $(MM32) -d3 -w4 -e25 -zq -od -6r -fo=$^. -fr=$^&.ERR 117 124 CC32_FLAGS=$(CC32_FLAGS_D$(DEBUG_LEVEL)) 118 125 … … 121 128 # 122 129 LNK=wlink 130 # 131 # DESCRIPTION does not work under WLink/Linux 132 # @ Cannot be escaped like with \x40 and it is still processed in quotes. 133 # WLink/2 can use the '\x40' variant. 134 # 135 #~ LNK_FLAGS_D0=op q op v op map=$^&.MAP op de '\x40\x23KIEWITZ:1.18\x23\x40\x41iR-BOOT Installer by Kiewitz' 123 136 LNK_FLAGS_D0=op q op v op map=$^&.MAP 137 #~ LNK_FLAGS_D1=op q op v d all & 138 #~ order clname CODE clname FAR_CONST clname FAR_DATA clnam BEGDATA clname DATA clname BSS clname STACK clname BLAP NOE & 139 #~ op map=$^&.MAP 124 140 LNK_FLAGS_D1=op q op v d all op map=$^&.MAP 125 141 LNK_FLAGS_D2=op q op v d all op map=$^&.MAP … … 172 188 @echo. 173 189 @echo ===================================================================== 174 @echo = PROGRAM: FIXCODE Multi Platform[DOS, Win32, OS/2 and Linux] =190 @echo = PROGRAM: SETABOOT Multi Platform [DOS, Win32, OS/2 and Linux] = 175 191 @echo ===================================================================== 176 192 # @echo. … … 229 245 230 246 # 231 # MAIN TARGETS 232 # 233 234 ############################################################################### 235 # DOS 16-bits (COM) 236 ############################################################################### 237 $(BASENAME).COM: $(BASENAME).OBJ 238 $(LNK) $(LNK_FLAGS) file $^&.OBJ name $^. sys dos com 239 @if exist $^. @echo $^. $(MSG_SUCCESS) 240 @echo. 241 242 $(BASENAME).OBJ: $(BASENAME).ASM 243 # @echo. 244 @echo TARGET: $^&.COM [DOS 16-bits COM-file] 245 $(ASM) $(ASM_FLAGS) $(BASENAME).ASM 246 @wdis $^. > $^&.WDA 247 248 249 ############################################################################### 250 # DOS 16-bits (MZ) 251 ############################################################################### 252 $(BASENAME)D.EXE: $(BASENAME)D.OBJ 253 $(LNK) $(LNK_FLAGS) file $^&.OBJ name $^. sys dos 254 @if exist $^. @echo $^. $(MSG_SUCCESS) 255 @echo. 256 257 $(BASENAME)D.OBJ: $(BASENAME).C $(BASENAME).H 258 # @echo. 259 @echo TARGET: $^&.EXE [DOS 16-bits Executable] 260 $(CC16) $(CC16_FLAGS) -bt=dos $(BASENAME).C 261 @wdis $^. > $^&.WDA 262 263 264 ############################################################################### 265 # NT 32-bits (PE) 266 ############################################################################### 267 $(BASENAME)W.EXE: $(BASENAME)W.OBJ 268 $(LNK) $(LNK_FLAGS) file $^&.OBJ name $^. sys nt 269 @if exist $^. @echo $^. $(MSG_SUCCESS) 270 @echo. 271 272 $(BASENAME)W.OBJ: $(BASENAME).C $(BASENAME).H 273 # @echo. 274 @echo TARGET: $^&.EXE [NT 32-bits Executable] 275 $(CC32) $(CC32_FLAGS) -I$(%WATCOM)$(DS)h$(DS)nt -bt=nt $(BASENAME).C 276 @wdis $^. > $^&.WDA 277 247 # MAIN TARGET 248 # 278 249 279 250 ############################################################################### 280 251 # OS/2 32-bits (LX) 281 252 ############################################################################### 282 $( BASENAME)2.EXE: $(BASENAME)2.OBJ253 $(MODULE).EXE: $(MODULE).OBJ 283 254 $(LNK) $(LNK_FLAGS) file $^&.OBJ name $^. sys os2v2 284 255 @if exist $^. @echo $^. $(MSG_SUCCESS) 285 256 @echo. 286 287 $(BASENAME)2.OBJ: $(BASENAME).C $(BASENAME).H 257 #~ wstrip $^. 258 259 $(MODULE).OBJ: $(BASENAME).C $(BASENAME).H 288 260 # @echo. 289 261 @echo TARGET: $^&.EXE [OS/2 32-bits Executable] 290 262 $(CC32) $(CC32_FLAGS) -I$(%WATCOM)$(DS)h$(DS)os2 -bt=os2 $(BASENAME).C 291 @wdis $^. > $^&.WDA 292 293 294 ############################################################################### 295 # Linux 32-bits (ELF) 296 ############################################################################### 297 $(BASENAME)L.ELF: $(BASENAME)L.OBJ 298 $(LNK) $(LNK_FLAGS) file $^&.OBJ name $^&.ELF sys linux 299 # $(MV) $^&.ELF $^. 300 @if exist $^. @echo $^. $(MSG_SUCCESS) 301 @echo. 302 303 $(BASENAME)L.OBJ: $(BASENAME).C $(BASENAME).H 304 # @echo. 305 @echo TARGET: $^&.ELF [Linux 32-bits Executable] 306 $(CC32) $(CC32_FLAGS) -bt=linux $(BASENAME).C 307 @wdis $^. > $^&.WDA 308 309 310 263 @wdis -fi $^. > $^&.WDA 311 264 312 265 … … 330 283 @if exist *.OBJ $(RM) *.OBJ 331 284 @if exist *.WDA $(RM) *.WDA 285 @if exist *.NDA $(RM) *.NDA 332 286 @if exist *.MAP $(RM) *.MAP 333 287 @if exist *.LST $(RM) *.LST -
trunk/TOOLS/OS2/SETABOOT/SETABOOT.C
r35 r46 24 24 25 25 26 #include "SETABOOT.H" 27 28 26 29 #define INCL_BASE 27 30 #define INCL_WINSHELLDATA … … 37 40 #include <string.h> 38 41 39 #include " msghelp.c"42 #include "MSGHELP.C" 40 43 41 44 // Msg-IDs from OSO001.msg -
trunk/TOOLS/OS2/SETABOOT/_build.cmd
r32 r46 1 /* REXX */ 2 3 /* -r use release flags, -d use debug flags */ 4 debug='-d'; 5 6 'ide2make '||debug||' -p SETABOOT.WPJ'; 7 'wmake -h -f SETABOOT.MK'; 1 @wmake -
trunk/TOOLS/OS2/SETABOOT/_clean.cmd
r30 r46 1 /* REXX */ 2 3 '@if exist SETABOOT.MK del SETABOOT.MK'; 4 '@if exist SETABOOT.EXE del SETABOOT.EXE'; 5 '@if exist SETABOOT.OBJ del SETABOOT.OBJ'; 6 '@if exist SETABOOT.MK1 del SETABOOT.MK1'; 7 '@if exist SETABOOT.LK1 del SETABOOT.LK1'; 8 '@if exist SETABOOT.MAP del SETABOOT.MAP'; 9 '@if exist *.err del *.err'; 10 '@if exist ..\..\..\RELEASE\OS2\SETABOOT.EXE del ..\..\..\RELEASE\OS2\SETABOOT.EXE'; 1 @wmake clean
Note:
See TracChangeset
for help on using the changeset viewer.