2021-01-11 15:17:59 +01:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
|
|
|
ifdtoolobj = ifdtool.o fmap.o kv_pair.o valstr.o
|
|
|
|
|
|
|
|
IFDTOOLCFLAGS = -O2 -g -Wall -Wextra -Wmissing-prototypes -Werror
|
|
|
|
IFDTOOLCFLAGS += -I$(top)/src/commonlib/include -I$(top)/src/commonlib/bsd/include
|
|
|
|
IFDTOOLCFLAGS += -I$(top)/util/cbfstool/flashmap
|
|
|
|
IFDTOOLCFLAGS += -include $(top)/src/commonlib/bsd/include/commonlib/bsd/compiler.h
|
2020-10-20 13:06:37 +02:00
|
|
|
IFDTOOLCFLAGS += -D_DEFAULT_SOURCE # for endianness converting functions
|
2021-01-11 15:17:59 +01:00
|
|
|
|
|
|
|
$(objutil)/ifdtool/%.o: $(top)/util/ifdtool/%.c
|
|
|
|
$(HOSTCC) $(IFDTOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
$(objutil)/ifdtool/%.o: $(top)/util/cbfstool/flashmap/%.c
|
|
|
|
$(HOSTCC) $(IFDTOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
$(objutil)/ifdtool/ifdtool: $(addprefix $(objutil)/ifdtool/,$(ifdtoolobj))
|
|
|
|
printf " IFDTOOL\n"
|
|
|
|
$(HOSTCC) $(addprefix $(objutil)/ifdtool/,$(ifdtoolobj)) -o $@
|