blob: 6df7c0690fd3a5d520ab965683f1a8e70e6216d9 (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
 | #
# Makefile for ubi-utils
#
KERNELHDR := ../../include
CFLAGS ?= -O2 -g
CPPFLAGS := -I./inc -I./src -I$(KERNELHDR) \
	-std=gnu99 -DPACKAGE_VERSION=\"1.0\" $(CPPFLAGS)
PERLPROGS = mkpfi ubicrc32.pl
TARGETS = pfiflash pddcustomize ubimirror bin2nand nand2bin ubigen \
	mkbootenv unubi pfi2bin
vpath   %.c ./src
include ../../common.mk
$(BUILDDIR)/pddcustomize: $(addprefix $(BUILDDIR)/,\
	pddcustomize.o error.o libubimirror.o bootenv.o hashmap.o \
	libubi.o crc32.o)
$(BUILDDIR)/pfiflash: $(addprefix $(BUILDDIR)/,\
	pfiflash.o libpfiflash.o list.o reader.o error.o libubimirror.o \
	bootenv.o hashmap.o pfi.o libubi.o crc32.o)
$(BUILDDIR)/ubimirror: $(addprefix $(BUILDDIR)/,\
	ubimirror.o error.o libubimirror.o bootenv.o hashmap.o \
	libubi.o crc32.o)
$(BUILDDIR)/nand2bin: $(addprefix $(BUILDDIR)/,\
	nand2bin.o nandecc.o nandcorr.o)
$(BUILDDIR)/bin2nand: $(addprefix $(BUILDDIR)/,\
	bin2nand.o error.o nandecc.o)
$(BUILDDIR)/ubigen: $(addprefix $(BUILDDIR)/,\
	ubigen.o libubigen.o crc32.o)
$(BUILDDIR)/mkbootenv: $(addprefix $(BUILDDIR)/,\
	mkbootenv.o bootenv.o hashmap.o error.o crc32.o)
$(BUILDDIR)/unubi: $(addprefix $(BUILDDIR)/,\
	unubi.o crc32.o unubi_analyze.o eb_chain.o)
$(BUILDDIR)/pfi2bin: $(addprefix $(BUILDDIR)/,\
	pfi2bin.o peb.o error.o list.o crc32.o libubigen.o bootenv.o \
	hashmap.o reader.o pfi.o)
install::
	mkdir -p ${DESTDIR}/${SBINDIR}
	install -m 0755 ${TARGETS} ${DESTDIR}/${SBINDIR}/
	(cd perl && install ${PERLPROGS} ${DESTDIR}/${SBINDIR}/)
uninstall:
	for file in ${TARGETS} ${PERLPROGS}; do \
		$(RM) ${DESTDIR}/${SBINDIR}/$$file; \
	done
 |