Browse Source

modified Makefile

master
Mathieu Sérandour 1 year ago
parent
commit
8f89bae3c6
  1. 6
      Makefile
  2. 3
      kernel/Makefile

6
Makefile

@ -11,13 +11,15 @@ all: disk
threaded_build:
make -j all
disk: kernel
$(HDD_FILE): kernel/entry.c
dd if=/dev/zero bs=1M count=0 seek=64 of=$(HDD_FILE)
sudo /sbin/parted -s $(HDD_FILE) mklabel gpt
sudo /sbin/parted -s $(HDD_FILE) mkpart ESP fat32 2048s 100%
sudo /sbin/parted -s $(HDD_FILE) set 1 esp on
./limine-bootloader/limine-install $(HDD_FILE)
disk: kernel $(HDD_FILE)
sudo losetup -P $(USED_LOOPBACK) $(HDD_FILE)
sudo mkfs.fat -F 32 $(USED_LOOPBACK)p1
@ -27,7 +29,9 @@ disk: kernel
sudo cp -r disk_root/* img_mount/
sync
sudo umount img_mount
sudo /sbin/losetup -d $(USED_LOOPBACK)
rm -rf img_mount
kernel: force_look

3
kernel/Makefile

@ -17,7 +17,6 @@ INTERNALLDFLAGS := \
INTERNALCFLAGS := \
-znocombreloc \
-I/opt/cross/include/ \
-H \
-std=gnu11 \
-ffreestanding \
-fno-stack-protector \
@ -40,7 +39,6 @@ all: $(KERNEL)
$(KERNEL): $(OBJ)
echo $(OBJ)
$(CC) $(INTERNALLDFLAGS) $(OBJ) -o $@
%.bmp.o: ../resources/bmp/%.bmp
@ -50,7 +48,6 @@ $(KERNEL): $(OBJ)
$(CC) $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@
%.s.o: %.s
echo "$(ASM) $(ASM_FLAGS) $< -o $@"
$(ASM) $(ASM_FLAGS) $< -o $@
clean:

Loading…
Cancel
Save