]> wirehaze git hosting - stm32f411ceu6.git/blobdiff - Makefile

wirehaze git hosting

hello friend
[stm32f411ceu6.git] / Makefile
index df8f7583b68fb14e5bb6d0359a93144026f01db5..b864e5a312d25e8788f64c8aa0b8eee9658e84c2 100644 (file)
--- a/Makefile
+++ b/Makefile
 #      'N.s' is made automatically from 'N.S' by running the C
 #      preprocessor, 'cpp'.  The precise recipe is '$(CPP) $(CPPFLAGS)'.
 
 #      'N.s' is made automatically from 'N.S' by running the C
 #      preprocessor, 'cpp'.  The precise recipe is '$(CPP) $(CPPFLAGS)'.
 
-# Preprocessor
 CPP := arm-none-eabi-cpp
 CPPFLAGS :=
 
 CPP := arm-none-eabi-cpp
 CPPFLAGS :=
 
-# Assembler
 AS := arm-none-eabi-as
 ASFLAGS :=
 
 AS := arm-none-eabi-as
 ASFLAGS :=
 
-# C Compiler
 CC := arm-none-eabi-gcc
 CFLAGS := -march=armv7e-m+fp \
                                        -mtune=cortex-m4 \
 CC := arm-none-eabi-gcc
 CFLAGS := -march=armv7e-m+fp \
                                        -mtune=cortex-m4 \
@@ -31,26 +28,24 @@ CFLAGS := -march=armv7e-m+fp \
                                        -std=gnu90 \
                                        -ffreestanding \
                                        -fsingle-precision-constant \
                                        -std=gnu90 \
                                        -ffreestanding \
                                        -fsingle-precision-constant \
-                                       -pedantic \
-                                       -pedantic-errors \
                                        -Wall \
                                        -Wextra \
                                        -Wconversion \
                                        -Wstrict-prototypes \
                                        -Wshadow \
                                        -Wundef \
                                        -Wall \
                                        -Wextra \
                                        -Wconversion \
                                        -Wstrict-prototypes \
                                        -Wshadow \
                                        -Wundef \
-                                       -Wdouble-promotion
+                                       -Wdouble-promotion \
+                                       -Os
 
 
-# Linker
 LD := arm-none-eabi-ld
 LDFLAGS := -nostdlib
 LDLIBS :=
 
 LD := arm-none-eabi-ld
 LDFLAGS := -nostdlib
 LDLIBS :=
 
-# objcopy
 OC := arm-none-eabi-objcopy
 OCFLAGS := --output-target=binary
 
 OC := arm-none-eabi-objcopy
 OCFLAGS := --output-target=binary
 
-# Build
+#  ---------------------------------------------------------------------------  #
+
 objs := kernel.o
 lds := kernel.ld
 LDFLAGS += -T $(lds)
 objs := kernel.o
 lds := kernel.ld
 LDFLAGS += -T $(lds)
@@ -58,7 +53,8 @@ LDFLAGS += -T $(lds)
 elf := kernel.elf
 bin := kernel.bin
 
 elf := kernel.elf
 bin := kernel.bin
 
-# Targets
+#  ---------------------------------------------------------------------------  #
+
 all : $(bin)
 
 clean :
 all : $(bin)
 
 clean :