1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-25 20:20:39 +02:00
xburst-tools/Makefile
Sergey Gridassov 301f0c6605 Initial commit.
2010-12-04 04:14:23 +03:00

32 lines
611 B
Makefile

READLINE ?= 0
ifneq (${READLINE},0)
LIBS += -lreadline
CPPFLAGS += -DWITH_READLINE
endif
CC = gcc
TARGET = jzboot
SOURCES = debug.c devmgr.c ingenic.c main.c shell_lex.c usbdev.c shell.c config.c spl_cmdset.c
CFLAGS = --std=gnu99 -Wall -Werror -O2 $(shell pkg-config libusb-1.0 --cflags)
LIBS += $(shell pkg-config libusb-1.0 --libs)
OBJECTS = ${SOURCES:.c=.o}
all: ${TARGET}
${TARGET}: ${OBJECTS}
${CC} ${LDFLAGS} -o $@ $^ ${LIBS}
clean:
rm -f ${TARGET} ${OBJECTS} ${SOURCES:.c=.d}
%.o: %.c
${CC} ${CPPFLAGS} ${CFLAGS} -o $@ -MD -c $<
%.c: %.l
flex -o $@ $<
-include ${SOURCES:.c=.d}