Separate src directory

This commit is contained in:
Thomas Oltmann 2026-02-18 01:41:04 +01:00
parent ae735033f0
commit c67bfdeb10
7 changed files with 7 additions and 10 deletions

5
.gitignore vendored
View file

@ -1,3 +1,4 @@
*.o *.o
boot.bin /boot.bin
boot.elf /boot.elf
/serve

View file

@ -5,7 +5,7 @@
all: boot.bin all: boot.bin
clean: clean:
rm -f *.o boot.elf boot.bin rm -f src/*.o boot.elf boot.bin
config.mk: | config.default.mk config.mk: | config.default.mk
cp config.default.mk $@ cp config.default.mk $@
@ -14,8 +14,8 @@ boot.bin: boot.elf
objcopy -O binary -j .text -j .data boot.elf $@ objcopy -O binary -j .text -j .data boot.elf $@
wc -c $@ wc -c $@
boot.elf: Rnbp.o Ptftp.o Qcommon.o fernlader.ld boot.elf: src/Rnbp.o src/Ptftp.o src/Qcommon.o fernlader.ld
$(LD) $(LDFLAGS) -o $@ Rnbp.o Ptftp.o Qcommon.o $(LD) $(LDFLAGS) -o $@ src/Rnbp.o src/Ptftp.o src/Qcommon.o
%.o: %.S %.o: %.S
$(CC) $(CFLAGS) -c -o $@ $(@:.o=.S) $(CC) $(CFLAGS) -c -o $@ $(@:.o=.S)

View file

@ -4,7 +4,7 @@ PHDRS {
} }
SECTIONS { SECTIONS {
.text 0x7C00: { .text 0x7C00: {
Rnbp.o(.text) src/Rnbp.o(.text)
*(.text*, .rodata*) *(.text*, .rodata*)
} :all } :all
.data : { .data : {

View file

@ -136,7 +136,6 @@ bios_write: push %ebp
mov 8+4(%ebp), %ecx mov 8+4(%ebp), %ecx
PROT16 PROT16
.code16
REAL REAL
.bwloop: test %ecx, %ecx .bwloop: test %ecx, %ecx
@ -159,7 +158,6 @@ bios_write: push %ebp
.bwreturn: PROT .bwreturn: PROT
PROT32 PROT32
.code32
pop %ebx pop %ebx
mov %ebp, %esp mov %ebp, %esp
@ -176,7 +174,6 @@ bios_getmap:push %ebp
mov 8+0(%ebp), %edi mov 8+0(%ebp), %edi
PROT16 PROT16
.code16
REAL REAL
xor %ebx, %ebx xor %ebx, %ebx
@ -195,7 +192,6 @@ _gmdone: add $24, %di
PROT PROT
PROT32 PROT32
.code32
mov %edi, %eax mov %edi, %eax