altos: Turn on warnings for LPC products too
[fw/altos] / src / lpc / Makefile-lpc.defs
index 32a02a4c4e28fcec51eeb33c5741001f15211b50..b9687196c084dceb878777834b153ddc7086e039 100644 (file)
@@ -16,21 +16,25 @@ vpath ao-make-product.5c $(TOPDIR)/util
 .SUFFIXES: .elf .ihx
 
 .elf.ihx:
-       objcopy -O ihex $*.elf $@
+       $(ELFTOHEX) --output=$@ $*.elf
 
 
 ifndef VERSION
 include $(TOPDIR)/Version
 endif
 
+ELFTOHEX=$(TOPDIR)/../ao-tools/ao-elftohex/ao-elftohex
 CC=$(ARM_CC)
 
-AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/core -I$(TOPDIR)/drivers -I$(TOPDIR)/product -I$(TOPDIR)
-LPC_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb -ffreestanding -nostdlib $(AO_CFLAGS)
+WARN_FLAGS=-Wall -Wextra
+
+AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/core -I$(TOPDIR)/drivers -I$(TOPDIR)/product -I$(TOPDIR) $(PDCLIB_INCLUDES) 
+LPC_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb\
+       -ffreestanding -nostdlib $(AO_CFLAGS) $(WARN_FLAGS)
 
 NICKLE=nickle
 
-LIBS=-lpdclib-cortex-m0 -lgcc
+LIBS=$(PDCLIB_LIBS_M0) -lgcc
 
 V=0
 # The user has explicitly enabled quiet compilation.