Skip to content

Commit

Permalink
add back building boot files with extra defines but use explicitly sp…
Browse files Browse the repository at this point in the history
…ecified values instead of generic NASMFLAGS so flags used for other assembly files does not effect building
  • Loading branch information
PerditionC committed Dec 18, 2023
1 parent f666ac9 commit 6001927
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
12 changes: 6 additions & 6 deletions boot/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
production: fat12com.bin fat16com.bin fat32chs.bin fat32lba.bin oemfat12.bin oemfat16.bin

fat12com.bin: boot.asm
$(NASM) -dISFAT12 boot.asm -l$*.lst -ofat12com.bin
$(NASM) -dISFAT12 $(NASMBOOTFLAGS) boot.asm -l$*.lst -ofat12com.bin

fat16com.bin: boot.asm
$(NASM) -dISFAT16 boot.asm -l$*.lst -ofat16com.bin
$(NASM) -dISFAT16 $(NASMBOOTFLAGS) boot.asm -l$*.lst -ofat16com.bin

fat32chs.bin: boot32.asm
$(NASM) boot32.asm -l$*.lst -ofat32chs.bin
$(NASM) $(NASMBOOTFLAGS) boot32.asm -l$*.lst -ofat32chs.bin

fat32lba.bin: boot32lb.asm
$(NASM) boot32lb.asm -l$*.lst -ofat32lba.bin
$(NASM) $(NASMBOOTFLAGS) boot32lb.asm -l$*.lst -ofat32lba.bin

oemfat12.bin: oemboot.asm
$(NASM) -dISFAT12 oemboot.asm -l$*.lst -ooemfat12.bin
$(NASM) -dISFAT12 $(NASMBOOTFLAGS) oemboot.asm -l$*.lst -ooemfat12.bin

oemfat16.bin: oemboot.asm
$(NASM) -dISFAT16 oemboot.asm -l$*.lst -ooemfat16.bin
$(NASM) -dISFAT16 $(NASMBOOTFLAGS) oemboot.asm -l$*.lst -ooemfat16.bin

clobber: clean
-$(RM) *.bin status.me
Expand Down
2 changes: 2 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ if "%1" == "" goto abort
if "%2" == "/V" goto :setDefineWithValue
set ALLCFLAGS=%ALLCFLAGS% -D%1
set NASMFLAGS=%NASMFLAGS% -D%1
REM $(NASMBOOTFLAGS) are extra flags only used when building boot sectors
set NASMBOOTFLAGS=%NASMBOOTFLAGS% -d%1
goto nextOption

:setDefineWithValue
Expand Down
1 change: 1 addition & 0 deletions default.bat
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ set BC5_BASE=
set MS_BASE=
set XNASM=
set NASMFLAGS=
set NASMBOOTFLAGS=
set XUPX=
set UPXOPT=
set LOADSEG=
Expand Down

0 comments on commit 6001927

Please sign in to comment.