1 # SPDX-License-Identifier: BSD-3-Clause
3 ifdtoolobj
= ifdtool.o fmap.o kv_pair.o valstr.o
5 IFDTOOLCFLAGS
= -O2
-g
-Wall
-Wextra
-Wmissing-prototypes
-Werror
6 IFDTOOLCFLAGS
+= -I
$(top
)/src
/commonlib
/include -I
$(top
)/src
/commonlib
/bsd
/include
7 IFDTOOLCFLAGS
+= -I
$(top
)/util
/cbfstool
/flashmap
8 IFDTOOLCFLAGS
+= -include $(top
)/src
/commonlib
/bsd
/include/commonlib
/bsd
/compiler.h
9 IFDTOOLCFLAGS
+= -D_DEFAULT_SOURCE
# for endianness converting functions
11 $(objutil
)/ifdtool
/%.o
: $(top
)/util
/ifdtool
/%.c
12 $(HOSTCC
) $(IFDTOOLCFLAGS
) $(HOSTCFLAGS
) -c
-o
$@
$<
14 $(objutil
)/ifdtool
/%.o
: $(top
)/util
/cbfstool
/flashmap
/%.c
15 $(HOSTCC
) $(IFDTOOLCFLAGS
) $(HOSTCFLAGS
) -c
-o
$@
$<
17 $(objutil
)/ifdtool
/ifdtool
: $(addprefix $(objutil
)/ifdtool
/,$(ifdtoolobj
))
19 $(HOSTCC
) ${LDFLAGS} $(addprefix $(objutil
)/ifdtool
/,$(ifdtoolobj
)) -o
$@