1 ## SPDX-License-Identifier: GPL-2.0-only
7 CFLAGS
=-O2
-Wall
-Wextra
-Wshadow
${WERROR}
8 CFLAGS
+=-Wno-unused-function
13 $(TARGET
): $(TARGET
).
lex.o
$(TARGET
).tab.o
14 $(CC
) $^
$(CFLAGS
) $(LDFLAGS
) -o
$@
16 $(TARGET
).
lex.c
: $(TARGET
).l
$(TARGET
).tab.h
17 $(LEX
) -o
$(patsubst $(TARGET
).l
,$(TARGET
).
lex.c
,$<) $<
19 $(TARGET
).tab.c
$(TARGET
).tab.h
: $(TARGET
).y
22 # Use this target to generate GbE for X200
23 gen-gbe-ich9m
: $(TARGET
)
24 $(abspath
$(TARGET
)) gbe-ich9m.spec gbe-ich9m.set gbe1.bin
25 # duplicate binary as per spec
26 cat gbe1.bin gbe1.bin
> flashregion_3_gbe.bin
29 # Use this target to generate GbE for X220/x230
30 gen-gbe-82579LM
: $(TARGET
)
31 $(abspath
$(TARGET
)) gbe-82579LM.spec gbe-82579LM.set gbe1.bin
32 # duplicate binary as per spec
33 cat gbe1.bin gbe1.bin
> flashregion_3_gbe.bin
36 # Use this target to generate IFD for X200
37 gen-ifd-x200
: $(TARGET
)
38 $(abspath
$(TARGET
)) ifd-x200.spec ifd-x200.set flashregion_0_fd.bin
41 rm -f
*.
lex.c
*.tab.c
*.tab.h
*.o bincfg flashregion_0_fd.bin flashregion_3_gbe.bin
46 @echo
"${TARGET}: Compiler/Decompiler for data blobs with specs"
47 @echo
"Targets: all, clean, distclean, help"
48 @echo
" gen-gbe-ich9m - generate GbE for X200"
49 @echo
" gen-gbe-82579LM - generate GbE for X220/x230"
50 @echo
" gen-ifd-x200 - generate IFD for X200"
51 @echo
"To disable warnings as errors, run make as:"
52 @echo
" make all WERROR=\"\""
54 .PHONY
: all clean distclean help
55 .PHONY
: gen-gbe-ich9m gen-ifd-x200 gen-gbe-82579LM