aboutsummaryrefslogtreecommitdiff
path: root/tests/ubi-tests/Makefile
blob: d6be0dce6031543deedda5985b8f1978a2798d00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
LIBUBI_PATH=../../ubi-utils/
LIBUBI_SRC_PATH=../../ubi-utils/src/
LIBUBI_HEADER_PATH=../../ubi-utils/include
UBIUTILS_PATH=../../ubi-utils/

LIBUBI_PATH=../../ubi-utils/
KERNELHDR := ../../include

LIBS = libubi
TARGETS=io_update volrefcnt integ io_paral io_read io_basic \
          mkvol_basic mkvol_bad mkvol_paral rsvol

CFLAGS += -I$(LIBUBI_HEADER_PATH) -I $(KERNELHDR) -lpthread

include ../../common.mk

# Compile ubilib with the udevsettle hack
libubi.a: $(LIBUBI_SRC_PATH)/libubi.c  $(LIBUBI_HEADER_PATH)/libubi.h  $(LIBUBI_SRC_PATH)/libubi_int.h
	$(CC) $(CFLAGS) -I $(LIBUBI_SRC_PATH) -I../../include -DUDEV_SETTLE_HACK -c $(LIBUBI_SRC_PATH)/libubi.c -o libubi.o
	ar cr libubi.a libubi.o

$(TARGETS): $(addprefix $(BUILDDIR)/, common.o) libubi.a

clean::
	rm -f $(TARGETS) $(addsuffix .o, $(TESTS)) libubi.*