summaryrefslogtreecommitdiff
path: root/tests/ubi-tests/Makefile
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-20 17:34:55 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-20 17:34:55 +0200
commit1ba6959299cb386faf178317b21ffd61689246b5 (patch)
treeb98d5f6d9aeadeb30e2d614aa174346529ae3b27 /tests/ubi-tests/Makefile
parentb722adcdb1eb8d0321eb5c4112db925c815450fc (diff)
ubi-utils: move UBI tests to tests/ubi-tests/
Clean-up ubi-utils a little by moving tests to a proper place. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'tests/ubi-tests/Makefile')
-rw-r--r--tests/ubi-tests/Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/ubi-tests/Makefile b/tests/ubi-tests/Makefile
new file mode 100644
index 0000000..a2a49d0
--- /dev/null
+++ b/tests/ubi-tests/Makefile
@@ -0,0 +1,41 @@
+UBIUTILS=../../ubi-utils
+INCLUDE1=$(UBIUTILS)/inc
+INCLUDE2=../../include
+LIB=.
+
+CC := $(CROSS)gcc
+
+ALL_FILES=libubi io_update rmvol integ
+ALL_FILES+=io_paral io_read io_basic mkvol_basic mkvol_bad mkvol_paral rsvol
+
+CFLAGS += -Wall -I$(INCLUDE1) -I$(INCLUDE2) -L$(LIB) -ggdb
+
+all: $(ALL_FILES)
+
+libubi: $(UBIUTILS)/src/libubi.c $(UBIUTILS)/inc/libubi.h $(UBIUTILS)/src/libubi_int.h
+ $(CC) $(CFLAGS) -DUDEV_SETTLE_HACK -c $(UBIUTILS)/src/libubi.c -o libubi.o
+ ar cr libubi.a libubi.o
+
+io_paral: io_paral.c common.c
+ $(CC) $(CFLAGS) $^ -lubi -lpthread -o $@
+io_update: io_update.c common.c
+ $(CC) $(CFLAGS) $^ -lubi -o $@
+io_read: io_read.c common.c
+ $(CC) $(CFLAGS) $^ -lubi -o $@
+io_basic: io_basic.c common.c
+ $(CC) $(CFLAGS) $^ -lubi -o $@
+mkvol_basic: mkvol_basic.c common.c
+ $(CC) $(CFLAGS) $^ -lubi -o $@
+mkvol_bad: mkvol_bad.c common.c
+ $(CC) $(CFLAGS) $^ -lubi -o $@
+mkvol_paral: mkvol_paral.c common.c
+ $(CC) $(CFLAGS) $^ -lubi -lpthread -o $@
+rsvol: rsvol.c common.c
+ $(CC) $(CFLAGS) $^ -lubi -o $@
+rmvol: rmvol.c common.c
+ $(CC) $(CFLAGS) $^ -lubi -o $@
+integ: integ.c
+ $(CC) $(CFLAGS) $^ -lubi -o $@
+
+clean:
+ rm -rf $(ALL_FILES) $(addsuffix .o, $(ALL_FILES))