mb/google/nissa/var/rull: when using pcie wifi7, turn off CNVI BT
[coreboot2.git] / util / sconfig / Makefile.mk
blobc3da29d1998e40d096ae36a0cc8af61256e52eda
1 ## SPDX-License-Identifier: GPL-2.0-only
2 sconfigobj :=
3 sconfigobj += lex.yy.o
4 sconfigobj += sconfig.tab.o
5 sconfigobj += main.o
7 SCONFIGFLAGS += -I$(top)/util/sconfig -I$(objutil)/sconfig
8 SCONFIGFLAGS += -I$(top)/src/commonlib/include -I$(top)/src/commonlib/bsd/include
10 $(objutil)/sconfig:
11 mkdir -p $@
13 $(objutil)/sconfig/.generated: $(objutil)/sconfig
14 touch $@
16 $(objutil)/sconfig/%.o: util/sconfig/%.c | $(objutil)/sconfig/.generated
17 printf " HOSTCC $(subst $(obj)/,,$(@))\n"
18 $(HOSTCC) $(SCONFIGFLAGS) $(HOSTCFLAGS) -c -o $@ $<
20 $(objutil)/sconfig/%.o: $(objutil)/sconfig/%.c
21 printf " HOSTCC $(subst $(obj)/,,$(@))\n"
22 $(HOSTCC) $(SCONFIGFLAGS) $(HOSTCFLAGS) -c -o $@ $<
24 ifeq ($(CONFIG_UTIL_GENPARSER),y)
25 $(top)/util/sconfig/lex.yy.c_shipped: $(top)/util/sconfig/sconfig.l
26 printf " FLEX $(subst $(top)/,,$(@))\n"
27 flex -L -o $@ $<
29 # the .c rule also creates .h
30 $(top)/util/sconfig/sconfig.tab.h_shipped: $(top)/util/sconfig/sconfig.tab.c_shipped
31 $(top)/util/sconfig/sconfig.tab.c_shipped: $(top)/util/sconfig/sconfig.y
32 printf " BISON $(subst $(top)/,,$(@))\n"
33 bison -l --defines=$(top)/util/sconfig/sconfig.tab.h_shipped -o $@ $<
35 endif
37 $(objutil)/sconfig/lex.yy.o: $(objutil)/sconfig/sconfig.tab.h
39 $(objutil)/sconfig/%: $(top)/util/sconfig/%_shipped
40 mkdir -p $(dir $@)
41 cp $< $@
43 $(objutil)/sconfig/sconfig: $(addprefix $(objutil)/sconfig/,$(sconfigobj))
44 printf " HOSTCC $(subst $(obj)/,,$(@)) (link)\n"
45 $(HOSTCC) $(SCONFIGFLAGS) -o $@ $(addprefix $(objutil)/sconfig/,$(sconfigobj))
47 $(addprefix $(objutil)/sconfig/,$(sconfigobj)) : $(objutil)/sconfig/sconfig.tab.h $(objutil)/sconfig/sconfig.tab.c $(objutil)/sconfig/lex.yy.c