2011-10-16 20:36:11 +00:00
|
|
|
CFLAGS+=-g
|
|
|
|
CFLAGS+=-DDEBUG
|
|
|
|
CFLAGS+=-std=gnu99
|
|
|
|
CFLAGS+=-Wall -Wextra
|
|
|
|
CFLAGS+=-I../src
|
|
|
|
|
2011-10-23 02:23:53 +00:00
|
|
|
LDFLAGS=-L.. -lstlink -lusb-1.0
|
2011-10-21 02:21:43 +00:00
|
|
|
|
2011-10-16 20:36:11 +00:00
|
|
|
SRCS=main.c
|
|
|
|
OBJS=$(SRCS:.c=.o)
|
|
|
|
|
|
|
|
NAME=flash
|
|
|
|
|
|
|
|
all: $(NAME)
|
|
|
|
|
2011-12-10 17:22:51 +00:00
|
|
|
$(NAME): $(OBJS) ../libstlink.a
|
2011-10-16 20:36:11 +00:00
|
|
|
$(CC) $(CFLAGS) -o $(NAME) $(OBJS) $(LDFLAGS)
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c $^ -o $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(OBJS)
|
|
|
|
rm -f $(NAME)
|
|
|
|
|
|
|
|
.PHONY: clean all
|