mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 15:10:28 +00:00
zealbooter: Have kernel makefile targets depend on GNUmakefile and linker.ld appropriately
This commit is contained in:
parent
0c17393a4c
commit
4f0cdcd551
1 changed files with 6 additions and 6 deletions
|
@ -15,8 +15,8 @@ define DEFAULT_VAR =
|
||||||
endif
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# It is highly recommended to use a custom built cross toolchain to build a kernel.
|
# It is suggested to use a custom built cross toolchain to build a kernel.
|
||||||
# We are only using "cc" as a placeholder here. It may work by using
|
# We are using the standard "cc" here, it may work by using
|
||||||
# the host system's toolchain, but this is not guaranteed.
|
# the host system's toolchain, but this is not guaranteed.
|
||||||
override DEFAULT_CC := cc
|
override DEFAULT_CC := cc
|
||||||
$(eval $(call DEFAULT_VAR,CC,$(DEFAULT_CC)))
|
$(eval $(call DEFAULT_VAR,CC,$(DEFAULT_CC)))
|
||||||
|
@ -103,22 +103,22 @@ limine.h:
|
||||||
curl -Lo $@ https://github.com/limine-bootloader/limine/raw/trunk/limine.h || cp ../build/limine/limine.h limine.h || echo "ERROR"
|
curl -Lo $@ https://github.com/limine-bootloader/limine/raw/trunk/limine.h || cp ../build/limine/limine.h limine.h || echo "ERROR"
|
||||||
|
|
||||||
# Link rules for the final kernel executable.
|
# Link rules for the final kernel executable.
|
||||||
$(KERNEL): $(OBJ)
|
$(KERNEL): GNUmakefile linker.ld $(OBJ)
|
||||||
$(LD) $(OBJ) $(LDFLAGS) -o $@
|
$(LD) $(OBJ) $(LDFLAGS) -o $@
|
||||||
|
|
||||||
# Include header dependencies.
|
# Include header dependencies.
|
||||||
-include $(HEADER_DEPS)
|
-include $(HEADER_DEPS)
|
||||||
|
|
||||||
# Compilation rules for *.c files.
|
# Compilation rules for *.c files.
|
||||||
%.c.o: %.c limine.h
|
%.c.o: %.c GNUmakefile limine.h
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||||
|
|
||||||
# Compilation rules for *.S files.
|
# Compilation rules for *.S files.
|
||||||
%.S.o: %.S limine.h
|
%.S.o: %.S GNUmakefile limine.h
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||||
|
|
||||||
# Compilation rules for *.asm (nasm) files.
|
# Compilation rules for *.asm (nasm) files.
|
||||||
%.asm.o: %.asm
|
%.asm.o: %.asm GNUmakefile
|
||||||
nasm $(NASMFLAGS) $< -o $@
|
nasm $(NASMFLAGS) $< -o $@
|
||||||
|
|
||||||
# Remove object files and the final executable.
|
# Remove object files and the final executable.
|
||||||
|
|
Loading…
Reference in a new issue