diff options
Diffstat (limited to 'src/glutt-o-logique/Makefile')
-rw-r--r-- | src/glutt-o-logique/Makefile | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/src/glutt-o-logique/Makefile b/src/glutt-o-logique/Makefile index 6762514..b7c2b9a 100644 --- a/src/glutt-o-logique/Makefile +++ b/src/glutt-o-logique/Makefile @@ -40,7 +40,24 @@ MCFLAGS=-mcpu=cortex-m4 -mthumb -mlittle-endian \ # COMPILE FLAGS DEFS=-DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DARM_MATH_CM4 -D__FPU_PRESENT=1 -CFLAGS =-Wall -ggdb -std=c99 -c $(MCFLAGS) $(DEFS) $(INCLUDES) +CWARNS += -Wextra +CWARNS += -Wformat +CWARNS += -Wmissing-braces +CWARNS += -Wno-cast-align +CWARNS += -Wparentheses +CWARNS += -Wshadow +CWARNS += -Wno-sign-compare +CWARNS += -Wswitch +CWARNS += -Wuninitialized +CWARNS += -Wunknown-pragmas +CWARNS += -Wunused-function +CWARNS += -Wunused-label +CWARNS += -Wunused-parameter +CWARNS += -Wunused-value +CWARNS += -Wunused-variable +CWARNS += -Wmissing-prototypes + +CFLAGS =-Wall $(CWARNS) -ggdb -std=c99 -c $(MCFLAGS) $(DEFS) $(INCLUDES) # LINKER FLAGS LDSCRIPT= $(SRCDIR)/bsp/stm32_flash.ld LDFLAGS =-T $(LDSCRIPT) --specs=nosys.specs $(MCFLAGS) -Wl,-Map=$(BINDIR)/outp.map @@ -101,17 +118,20 @@ debug: LDFLAGS+=-g debug: release $(BINDIR)/$(BINHEX): $(BINDIR)/$(BINELF) - $(CP) -O ihex $< $@ + @$(CP) -O ihex $< $@ + @echo "[CP] $@" + @echo "[:)] Happiness :)" $(BINDIR)/$(BINELF): vc.h $(OBJECTS) - $(CC) $(LDFLAGS) $(OBJECTS) -o $@ - $(SIZE) $(BINDIR)/$(BINELF) + @$(CC) $(LDFLAGS) $(OBJECTS) -o $@ + @echo "[CC] $@" + @$(SIZE) $(BINDIR)/$(BINELF) dir_guard=@mkdir -p $(@D) obj/%.o: %.c $(HEADERS) $(dir_guard) - @echo [CC] $< + @echo "[CC] $<" @$(CC) $(CFLAGS) $< -o $@ obj/%.o: %.s $(HEADERS) @@ -120,14 +140,16 @@ obj/%.o: %.s $(HEADERS) @$(CC) $(CFLAGS) $< -o $@ vc.h: ../../.git/logs/HEAD - echo "// This file is generated by Makefile." > vc.h - echo "// Do not edit this file!" >> vc.h - git log -1 --format="format:#define GIT_VERSION \"%h\"" >> vc.h - echo >> vc.h - echo >> vc.h + @echo "// This file is generated by Makefile." > vc.h + @echo "// Do not edit this file!" >> vc.h + @git log -1 --format="format:#define GIT_VERSION \"%h\"" >> vc.h + @echo >> vc.h + @echo >> vc.h + @echo [EC] vc.h clean: - rm -f $(OBJECTS) $(BINDIR)/$(BINELF) $(BINDIR)/$(BINHEX) + @rm -f $(OBJECTS) $(BINDIR)/$(BINELF) $(BINDIR)/$(BINHEX) + @echo "[RM] Cleanuped °o°" # Connect to openocd's gdb server on port 3333 deploy: $(BINDIR)/$(BINELF) |