Skip to content

Commit

Permalink
kernel: Make include flag override ones in CFLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsuki committed Sep 14, 2021
1 parent d46275d commit be9c8a5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ LDFLAGS =
VFLAGS =

INTERNALCFLAGS := \
-I./c \
-ffreestanding \
-fno-omit-frame-pointer \
-fno-stack-protector \
Expand Down Expand Up @@ -76,13 +75,13 @@ install:

blob.o: $(VFILES)
VMODULES=/tmp/.vmodules $(V) $(VFLAGS) $(INTERNALVFLAGS) -o blob.c .
$(CC) $(CFLAGS) $(INTERNALCFLAGS) -w -c blob.c -o $@
$(CC) -I./c $(CFLAGS) $(INTERNALCFLAGS) -w -c blob.c -o $@

%.o: %.c
$(CC) $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@
$(CC) -I./c $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@

%.o: %.S
$(CC) $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@
$(CC) -I./c $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@

$(KERNEL): blob.o $(COBJ)
$(LD) $^ $(LDFLAGS) $(INTERNALLDFLAGS) -o $@
Expand Down

0 comments on commit be9c8a5

Please sign in to comment.