Don't try reading device params in bad USB modes.
[fw/stlink] / example / libstm32l_discovery / build / Makefile
1 LIB = libstm32l_discovery.a
2
3 CC = arm-none-eabi-gcc
4 AR = arm-none-eabi-ar
5 RANLIB = arm-none-eabi-ranlib
6
7 CFLAGS = -Wall -O2 -mlittle-endian -mthumb
8 CFLAGS += -mcpu=cortex-m3 -ffreestanding -nostdlib -nostdinc
9 CFLAGS += -I../inc -I../inc/device_support -I../inc/core_support -I../inc/base
10
11 SRCS = \
12 ../src/misc.c \
13 ../src/stm32l1xx_adc.c \
14 ../src/stm32l1xx_comp.c \
15 ../src/stm32l1xx_crc.c \
16 ../src/stm32l1xx_dac.c \
17 ../src/stm32l1xx_dbgmcu.c \
18 ../src/stm32l1xx_dma.c \
19 ../src/stm32l1xx_exti.c \
20 ../src/stm32l1xx_flash.c \
21 ../src/stm32l1xx_flash_ramfunc.c \
22 ../src/stm32l1xx_gpio.c \
23 ../src/stm32l1xx_i2c.c \
24 ../src/stm32l1xx_iwdg.c \
25 ../src/stm32l1xx_lcd.c \
26 ../src/stm32l1xx_pwr.c \
27 ../src/stm32l1xx_rcc.c \
28 ../src/stm32l1xx_rtc.c \
29 ../src/stm32l1xx_spi.c \
30 ../src/stm32l1xx_syscfg.c \
31 ../src/stm32l1xx_tim.c \
32 ../src/stm32l1xx_usart.c \
33 ../src/stm32l1xx_wwdg.c \
34 ../inc/core_support/core_cm3.c
35
36 OBJS = $(SRCS:.c=.o)
37
38 all: $(LIB)
39
40 $(LIB): $(OBJS)
41         $(AR) -r $(LIB) $(OBJS)
42         $(RANLIB) $(LIB)
43
44 %.o : %.c
45         $(CC) $(CFLAGS) -c -o $@ $^
46
47 clean:
48         -rm -f $(OBJS)
49         -rm -f $(LIB)
50
51 .PHONY: all clean