Misc update
This commit is contained in:
parent
c5954cb79a
commit
074ae10bb4
2 changed files with 11 additions and 8 deletions
|
@ -26,6 +26,9 @@ NASMFLAGS ?= -F dwarf -g
|
||||||
# User controllable linker flags. We set none by default.
|
# User controllable linker flags. We set none by default.
|
||||||
LDFLAGS ?=
|
LDFLAGS ?=
|
||||||
|
|
||||||
|
# User controllable preprocessor flags. We set none by default.
|
||||||
|
CPPFLAGS ?=
|
||||||
|
|
||||||
# Internal C flags that should not be changed by the user.
|
# Internal C flags that should not be changed by the user.
|
||||||
override INTERNALCFLAGS := \
|
override INTERNALCFLAGS := \
|
||||||
-I. \
|
-I. \
|
||||||
|
@ -70,18 +73,18 @@ limine.h:
|
||||||
|
|
||||||
# Link rules for the final kernel executable.
|
# Link rules for the final kernel executable.
|
||||||
$(KERNEL): $(OBJ)
|
$(KERNEL): $(OBJ)
|
||||||
$(CC) $(OBJ) $(LDFLAGS) $(INTERNALLDFLAGS) -o $@
|
$(CC) $(CFLAGS) $(INTERNALCFLAGS) $(OBJ) $(LDFLAGS) $(INTERNALLDFLAGS) -o $@
|
||||||
|
|
||||||
# Include header dependencies.
|
# Include header dependencies.
|
||||||
-include $(HEADER_DEPS)
|
-include $(HEADER_DEPS)
|
||||||
|
|
||||||
# Compilation rules for *.c files.
|
# Compilation rules for *.c files.
|
||||||
%.o: %.c limine.h
|
%.o: %.c limine.h
|
||||||
$(CC) $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
# Compilation rules for *.S files.
|
# Compilation rules for *.S files.
|
||||||
%.o: %.S limine.h
|
%.o: %.S limine.h
|
||||||
$(CC) $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
# Compilation rules for *.asm (nasm) files.
|
# Compilation rules for *.asm (nasm) files.
|
||||||
%.o: %.asm
|
%.o: %.asm
|
||||||
|
|
|
@ -36,11 +36,6 @@ SECTIONS
|
||||||
/* Move to the next memory page for .data */
|
/* Move to the next memory page for .data */
|
||||||
. += CONSTANT(MAXPAGESIZE);
|
. += CONSTANT(MAXPAGESIZE);
|
||||||
|
|
||||||
/* Not placing this here may cause trouble on some hosts */
|
|
||||||
.note.gnu.build-id : {
|
|
||||||
*(.note.gnu.build-id)
|
|
||||||
} :data
|
|
||||||
|
|
||||||
.data : {
|
.data : {
|
||||||
*(.data .data.*)
|
*(.data .data.*)
|
||||||
} :data
|
} :data
|
||||||
|
@ -49,4 +44,9 @@ SECTIONS
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
*(.bss .bss.*)
|
*(.bss .bss.*)
|
||||||
} :data
|
} :data
|
||||||
|
|
||||||
|
/* Discard notes since they may cause issues on some hosts. */
|
||||||
|
/DISCARD/ : {
|
||||||
|
*(.note .note.*)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue