mirror of
https://github.com/linux-msm/qdl.git
synced 2026-02-25 13:12:25 -08:00
qdl.c, with its main method, should not be included in the nbdkit. Add the global qdl_debug variable to nbdkit and expose it as an nbdkit configuration option. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
34 lines
708 B
Makefile
34 lines
708 B
Makefile
OUT := qdl
|
|
NBDKIT := nbdkit-qdl-plugin.so
|
|
|
|
CFLAGS := -O2 -Wall -g `xml2-config --cflags` -fPIC
|
|
LDFLAGS := `xml2-config --libs` -ludev
|
|
prefix := /usr/local
|
|
|
|
COMMON_SRCS := firehose.c json.c sahara.c util.c patch.c program.c ufs.c usb.c
|
|
|
|
QDL_SRCS := qdl.c
|
|
QDL_OBJS := $(COMMON_SRCS:.c=.o) $(QDL_SRCS:.c=.o)
|
|
|
|
$(OUT): $(QDL_OBJS)
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
NBDKIT_SRCS := nbdkit-qdl-plugin.c
|
|
NBDKIT_OBJS := $(COMMON_SRCS:.c=.o) $(NBDKIT_SRCS:.c=.o)
|
|
|
|
$(NBDKIT): LDFLAGS += -shared
|
|
$(NBDKIT): $(NBDKIT_OBJS)
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
.PHONY: lib
|
|
lib: $(NBDKIT)
|
|
|
|
.PHONY: all
|
|
all: $(OUT) $(NBDKIT)
|
|
|
|
clean:
|
|
rm -f $(OUT) $(QDL_OBJS) $(NBDKIT_OBJS)
|
|
|
|
install: $(OUT)
|
|
install -D -m 755 $< $(DESTDIR)$(prefix)/bin/$<
|