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.
|
||||
LDFLAGS ?=
|
||||
|
||||
# User controllable preprocessor flags. We set none by default.
|
||||
CPPFLAGS ?=
|
||||
|
||||
# Internal C flags that should not be changed by the user.
|
||||
override INTERNALCFLAGS := \
|
||||
-I. \
|
||||
|
@ -70,18 +73,18 @@ limine.h:
|
|||
|
||||
# Link rules for the final kernel executable.
|
||||
$(KERNEL): $(OBJ)
|
||||
$(CC) $(OBJ) $(LDFLAGS) $(INTERNALLDFLAGS) -o $@
|
||||
$(CC) $(CFLAGS) $(INTERNALCFLAGS) $(OBJ) $(LDFLAGS) $(INTERNALLDFLAGS) -o $@
|
||||
|
||||
# Include header dependencies.
|
||||
-include $(HEADER_DEPS)
|
||||
|
||||
# Compilation rules for *.c files.
|
||||
%.o: %.c limine.h
|
||||
$(CC) $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@
|
||||
|
||||
# Compilation rules for *.S files.
|
||||
%.o: %.S limine.h
|
||||
$(CC) $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@
|
||||
|
||||
# Compilation rules for *.asm (nasm) files.
|
||||
%.o: %.asm
|
||||
|
|
|
@ -36,11 +36,6 @@ SECTIONS
|
|||
/* Move to the next memory page for .data */
|
||||
. += 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
|
||||
|
@ -49,4 +44,9 @@ SECTIONS
|
|||
*(COMMON)
|
||||
*(.bss .bss.*)
|
||||
} :data
|
||||
|
||||
/* Discard notes since they may cause issues on some hosts. */
|
||||
/DISCARD/ : {
|
||||
*(.note .note.*)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue