2023-09-04 14:14:06 +00:00
|
|
|
include Makefile.common
|
|
|
|
|
2023-09-27 01:35:00 +00:00
|
|
|
all: bin k.iso
|
2023-09-04 14:14:06 +00:00
|
|
|
|
|
|
|
k.iso: install
|
|
|
|
./tools/create_iso.sh
|
|
|
|
|
|
|
|
install:
|
|
|
|
mkdir -p $(GRUBDIR)
|
|
|
|
$(MAKE) -C $(SOURCEDIR) $@
|
|
|
|
|
2023-09-27 01:35:00 +00:00
|
|
|
bin:
|
|
|
|
$(MAKE) -C $(LIB)
|
|
|
|
gcc -c test.c -Ilibk -Llibk -lk -m32
|
|
|
|
ld -m elf_i386 -Ttext=0x6000000 --entry=main test.o -L./libk/ -lk
|
|
|
|
objcopy --input binary --output elf32-i386 --binary-architecture i386 --rename-section .data=.rodata,CONTENTS,ALLOC,LOAD,READONLY,DATA a.out myfile.o
|
|
|
|
cp myfile.o $(SOURCEDIR)/myfile.o
|
|
|
|
|
2023-09-04 14:14:06 +00:00
|
|
|
clean:
|
|
|
|
$(MAKE) -C $(SOURCEDIR) $@
|
2023-09-27 01:35:00 +00:00
|
|
|
$(MAKE) -C $(LIB) $@
|
2023-09-04 14:14:06 +00:00
|
|
|
$(RM) kernel.iso
|
|
|
|
$(RM) -r iso
|
|
|
|
|
|
|
|
.PHONY: $(GRUBDIR) install
|