Fixes for makefile
This commit is contained in:
		
							parent
							
								
									bc238a3bf9
								
							
						
					
					
						commit
						79bedd9013
					
				
					 1 changed files with 12 additions and 9 deletions
				
			
		
							
								
								
									
										21
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										21
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -31,32 +31,34 @@ endif | |||
| default: fdimage.img | ||||
| 
 | ||||
| # Host utils
 | ||||
| utils/%: src/utils/%.c | ||||
| utils/%: %.c | ||||
| 	mkdir -p utils | ||||
| 	$(CC) -o $@ $< | ||||
| 
 | ||||
| cp437.bin: src/cp437.bmp utils/bmp2font | ||||
| cp437.bin: cp437.bmp utils/bmp2font | ||||
| 	utils/bmp2font $< $@ | ||||
| 
 | ||||
| # BIOS option roms
 | ||||
| rom/%.rom: rom/%.asm utils/fix-rom | ||||
| 	$(NASM) $(NASM_ARGS) -o $@ $< && utils/fix-rom $@ | ||||
| vga11.com: cp437.bin | ||||
| 
 | ||||
| # COM programs
 | ||||
| %.com: %.asm | ||||
| 	$(NASM) $(NASM_ARGS) -DCOM -DBASE=0x0100 -o $@ $< | ||||
| 	$(NASM) $(NASM_ARGS) -DBASE=0x0100 -DCOM -o $@ $< | ||||
| 
 | ||||
| # Bootloaders, first sector on partition
 | ||||
| %.bs: %.asm | ||||
| 	$(NASM) $(NASM_ARGS) -DBOOT -DBASE=0x7C00 -o $@ $< | ||||
| 	$(NASM) $(NASM_ARGS) -DBASE=0x7C00 -DBOOT -o $@ $< | ||||
| 	: check boot signature | ||||
| 	test "$$(echo $$(xxd -p -l 2 -s 510 pxe.bs))" == 55aa | ||||
| 
 | ||||
| # Network bootstrap protocol as used for PXE
 | ||||
| %.0: %.asm | ||||
| 	$(NASM) $(NASM_ARGS) -DNBP -DBASE=0x7C00 -o $@ $< | ||||
| 	$(NASM) $(NASM_ARGS) -DBASE=0x7C00 -DNBP -o $@ $< | ||||
| 
 | ||||
| fdimage.img: boot/fat.bs $(BDOSIMG) $(BIOSIMG) $(DISTFILES) | ||||
| # BIOS option roms
 | ||||
| %.rom: %.asm utils/fix-rom | ||||
| 	$(NASM) $(NASM_ARGS) -DBASE=0x0000 -DROM -o $@ $< && utils/fix-rom $@ | ||||
| 
 | ||||
| fdimage.img: fat.bs $(BDOSIMG) $(BIOSIMG) $(DISTFILES) | ||||
| 	mformat -R 9 -C -i $@ -f $(FLOPPY) -B boot/fat.bs :: | ||||
| 	dd if=$(BDOSIMG) bs=512 seek=1 count=4 conv=notrunc of=$@ | ||||
| 	dd if=$(BIOSIMG) bs=512 seek=5 count=4 conv=notrunc of=$@ | ||||
|  | @ -67,6 +69,7 @@ hdimage.img: boot/mbr.bs fdimage.img | |||
| 
 | ||||
| clean: | ||||
| 	rm -f *.com *.bs *.0 *.lst *.img *.bin *.rom | ||||
| 	rm -rf utils | ||||
| 
 | ||||
| qemu-floppy: fdimage.img $(ROMS) | ||||
| 	$(QEMU) $(QEMU_ARGS) -boot a -fda fdimage.img | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue