From b90f157666f871378a05521b93c66faa7c493af5 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Fri, 21 Nov 2014 02:09:51 +0100 Subject: improving flags --- Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7633252..9ab1e7c 100644 --- a/Makefile +++ b/Makefile @@ -33,17 +33,24 @@ CC=i686-elf-gcc ############ compiler flags ############ CFLAGS= CFLAGS+=-ffreestanding -CFLAGS+=-nostdlib +CFLATS+=-Wall +CFLAGS+=-Wextra +#CFLAGS+=-O2 +#CFLAGS+=-nostdlib CFLAGS+=-std=gnu11 CFLAGS+=-I. CFLAGS+=-I/home/miguel/temp/fool-os-stuff/newlib-2.1.0/newlib/libc/include #CFLAGS+=-lgcc -CFLAGS+=-Werror-implicit-function-declaration +#CFLAGS+=-Werror-implicit-function-declaration #CFLAGS+=-fno-zero-initialized-in-bss #CFLAGS+= -O4 #CFLAGS+=-fdata-sections -ffunction-sections #CFLAGS+= -Werror +LDFLAGS= +LDFLAGS+=-nostdlib +LDFLAGS+=-lgcc + ############ source and object files and their deps ############ @@ -115,7 +122,7 @@ $(CLEANDIRS): # the kernel_entry.o needs to be FIRST!! $(BIN_KERNEL): $(KERNEL_ENTRY) $(ASM_OBJECTS) $(OBJECTS) - $(CC) $(CFLAGS) -o $@ -Wl,-Ttext,$(KERNEL_START),--oformat,binary $^ + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -Wl,-Ttext,$(KERNEL_START),--oformat,binary $^ -- cgit v1.2.3