blob: a384a85040405f4d63b48910767468bdc6ace5eb [file] [log] [blame]
TARGET := mrdump_tool
FLAGS := -Werror \
-D__YOCTO_OS__ \
-D_GNU_SOURCE
INCLUDES := -I.
bindir ?= /usr/bin
VPATH = mrdump_tool_source
SRCS := mrdump_log.c \
mrdump_defaults.c \
mrdump_common.c \
mrdump_status.c \
mrdump_support_fiemap.c \
mrdump_support_ext4.c \
mrdump_support_f2fs.c \
mrdump_support_mpart.c \
mrdump_tool.c
OBJS := ${SRCS:%.c=%.o}
LDFLAGS = -L.-lz
.PHONY: all
all : $(TARGET)
${TARGET}: ${OBJS}
${CC} ${OBJS} $(LDFLAGS) -o $@
.PHONY: clean
clean:
$(warning "makefile clean")
rm -rf $(OBJS) $(TARGET)
%.o: %.c
${CC} $(CFLAGS) -c $< -o $@ $(INCLUDES) $(FLAGS)
.PHONY: install
install:
install -d ${DESTDIR}${bindir}
install -m 0755 $(TARGET) ${DESTDIR}${bindir}