Have kernel makefile targets depend on GNUmakefile and linker.ld appropriately. Closes #9
This commit is contained in:
parent
5ed745dec8
commit
3f031e7ffb
1 changed files with 4 additions and 4 deletions
|
@ -98,22 +98,22 @@ limine.h:
|
||||||
curl -Lo $@ https://github.com/limine-bootloader/limine/raw/trunk/limine.h
|
curl -Lo $@ https://github.com/limine-bootloader/limine/raw/trunk/limine.h
|
||||||
|
|
||||||
# Link rules for the final kernel executable.
|
# Link rules for the final kernel executable.
|
||||||
$(KERNEL): $(OBJ)
|
$(KERNEL): $(OBJ) GNUmakefile linker.ld
|
||||||
$(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 limine.h GNUmakefile
|
||||||
$(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 limine.h GNUmakefile
|
||||||
$(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…
Add table
Reference in a new issue