diff options
Diffstat (limited to 'util/ifdtool/Makefile.mk')
-rw-r--r-- | util/ifdtool/Makefile.mk | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/util/ifdtool/Makefile.mk b/util/ifdtool/Makefile.mk new file mode 100644 index 0000000000..2b97bf51c8 --- /dev/null +++ b/util/ifdtool/Makefile.mk @@ -0,0 +1,19 @@ +# 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 +IFDTOOLCFLAGS += -D_DEFAULT_SOURCE # for endianness converting functions + +$(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) ${LDFLAGS} $(addprefix $(objutil)/ifdtool/,$(ifdtoolobj)) -o $@ |