Damien Zammit | 0685322 | 2016-11-16 21:06:54 +1100 | [diff] [blame] | 1 | CC = gcc |
| 2 | YACC = bison |
| 3 | LEX = flex |
Denis 'GNUtoo' Carikli | 780e931 | 2018-01-10 14:35:55 +0100 | [diff] [blame] | 4 | TARGET=bincfg |
Damien Zammit | 0685322 | 2016-11-16 21:06:54 +1100 | [diff] [blame] | 5 | |
| 6 | $(TARGET): $(TARGET).lex.o $(TARGET).tab.o |
| 7 | $(CC) $^ -Wall -Wno-unused-function -g -lfl -o $@ |
| 8 | |
| 9 | $(TARGET).lex.c: $(TARGET).l $(TARGET).tab.h |
| 10 | $(LEX) -o $(patsubst $(TARGET).l,$(TARGET).lex.c,$<) $< |
| 11 | |
| 12 | $(TARGET).tab.c $(TARGET).tab.h: $(TARGET).y |
| 13 | $(YACC) -d $< |
| 14 | |
| 15 | # Use this target to generate GbE for X200 |
| 16 | gen-gbe-ich9m: |
Denis 'GNUtoo' Carikli | 780e931 | 2018-01-10 14:35:55 +0100 | [diff] [blame] | 17 | ./bincfg gbe-ich9m.spec gbe-ich9m.set gbe1.bin |
Damien Zammit | 0685322 | 2016-11-16 21:06:54 +1100 | [diff] [blame] | 18 | # duplicate binary as per spec |
| 19 | cat gbe1.bin gbe1.bin > flashregion_3_gbe.bin |
| 20 | rm -f gbe1.bin |
| 21 | |
| 22 | # Use this target to generate IFD for X200 |
| 23 | gen-ifd-x200: |
Denis 'GNUtoo' Carikli | 780e931 | 2018-01-10 14:35:55 +0100 | [diff] [blame] | 24 | ./bincfg ifd-x200.spec ifd-x200.set flashregion_0_fd.bin |
Damien Zammit | 0685322 | 2016-11-16 21:06:54 +1100 | [diff] [blame] | 25 | |
| 26 | .PHONY: clean gen-gbe-ich9m gen-ifd-x200 |
| 27 | |
| 28 | clean: |
Denis 'GNUtoo' Carikli | 780e931 | 2018-01-10 14:35:55 +0100 | [diff] [blame] | 29 | rm -f *.lex.c *.tab.c *.tab.h *.o bincfg flashregion_0_fd.bin flashregion_3_gbe.bin |