Patrick Georgi | 227055b | 2021-01-11 15:17:59 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: BSD-3-Clause |
| 2 | |
| 3 | ifdtoolobj = ifdtool.o fmap.o kv_pair.o valstr.o |
| 4 | |
| 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 |
Marek Kasiewicz | f1e401c | 2020-10-20 13:06:37 +0200 | [diff] [blame] | 9 | IFDTOOLCFLAGS += -D_DEFAULT_SOURCE # for endianness converting functions |
Patrick Georgi | 227055b | 2021-01-11 15:17:59 +0100 | [diff] [blame] | 10 | |
| 11 | $(objutil)/ifdtool/%.o: $(top)/util/ifdtool/%.c |
| 12 | $(HOSTCC) $(IFDTOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $< |
| 13 | |
| 14 | $(objutil)/ifdtool/%.o: $(top)/util/cbfstool/flashmap/%.c |
| 15 | $(HOSTCC) $(IFDTOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $< |
| 16 | |
| 17 | $(objutil)/ifdtool/ifdtool: $(addprefix $(objutil)/ifdtool/,$(ifdtoolobj)) |
| 18 | printf " IFDTOOL\n" |
| 19 | $(HOSTCC) $(addprefix $(objutil)/ifdtool/,$(ifdtoolobj)) -o $@ |