1 ## SPDX-License-Identifier: GPL-2.0-only
2 bincfg_obj
:= bincfg.
lex.o bincfg.tab.o
4 BINCFG_FLAGS
+= -I
$(top
)/util
/bincfg
-I
$(objutil
)/bincfg
9 $(objutil
)/bincfg
/.generated
: $(objutil
)/bincfg
12 $(objutil
)/bincfg
/%.o
: util
/bincfg
/%.c |
$(objutil
)/bincfg
/.generated
13 printf
" HOSTCC $(subst $(obj)/,,$(@))\n"
14 $(HOSTCC
) $(BINCFG_FLAGS
) $(HOSTCFLAGS
) -c
-o
$@
$<
16 $(objutil
)/bincfg
/%.o
: $(objutil
)/bincfg
/%.c
17 printf
" HOSTCC $(subst $(obj)/,,$(@))\n"
18 $(HOSTCC
) $(BINCFG_FLAGS
) $(HOSTCFLAGS
) -c
-o
$@
$<
20 ifeq ($(CONFIG_UTIL_GENPARSER
),y
)
21 $(top
)/util
/bincfg
/bincfg.
lex.c_shipped
: $(top
)/util
/bincfg
/bincfg.l
22 printf
" FLEX $(subst $(top)/,,$(@))\n"
25 # the .c rule also creates .h
26 $(top
)/util
/bincfg
/bincfg.tab.h_shipped
: $(top
)/util
/bincfg
/bincfg.tab.c_shipped
27 $(top
)/util
/bincfg
/bincfg.tab.c_shipped
: $(top
)/util
/bincfg
/bincfg.y
28 printf
" BISON $(subst $(top)/,,$(@))\n"
29 bison
-l
--defines
=$(top
)/util
/bincfg
/bincfg.tab.h_shipped
-o
$@
$<
32 $(objutil
)/bincfg
/bincfg.
lex.o
: $(objutil
)/bincfg
/bincfg.tab.h
34 $(objutil
)/bincfg
/%: $(top
)/util
/bincfg
/%_shipped
38 $(objutil
)/bincfg
/bincfg
: $(addprefix $(objutil
)/bincfg
/,$(bincfg_obj
))
39 printf
" HOSTCC $(subst $(obj)/,,$(@)) (link)\n"
40 $(HOSTCC
) $(BINCFG_FLAGS
) -o
$@
$(addprefix $(objutil
)/bincfg
/,$(bincfg_obj
))
42 $(addprefix $(objutil
)/bincfg
/,$(bincfg_obj
)) : $(objutil
)/bincfg
/bincfg.tab.h
$(objutil
)/bincfg
/bincfg.tab.c
$(objutil
)/bincfg
/bincfg.
lex.c