Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame^] | 1 | # |
| 2 | # Makefile for flash_rom |
| 3 | # |
| 4 | # redone by Stefan Reinauer <stepan@openbios.org> |
| 5 | # |
Ronald G. Minnich | 5e5f75e | 2002-01-29 18:21:41 +0000 | [diff] [blame] | 6 | |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame^] | 7 | PROGRAM = flashrom |
Ronald G. Minnich | eaab50b | 2003-09-12 22:41:53 +0000 | [diff] [blame] | 8 | |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame^] | 9 | CC = gcc |
| 10 | STRIP = strip |
| 11 | #CFLAGS = -O2 -g -Wall -Werror |
| 12 | CFLAGS = -Os -Wall -Werror -DDISABLE_DOC |
| 13 | LDFLAGS = -lpci -static |
Ronald G. Minnich | eaab50b | 2003-09-12 22:41:53 +0000 | [diff] [blame] | 14 | |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame^] | 15 | |
| 16 | OBJS = flash_enable.o udelay.o jedec.o sst28sf040.o am29f040b.o mx29f002.o \ |
| 17 | sst39sf020.o m29f400bt.o w49f002u.o 82802ab.o msys_doc.o pm49fl004.o \ |
| 18 | sst49lf040.o sst_fwhub.o layout.o lbtable.o flashchips.o flash_rom.o |
| 19 | |
| 20 | all: dep $(PROGRAM) |
| 21 | |
| 22 | $(PROGRAM): $(OBJS) |
| 23 | $(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS) |
| 24 | $(STRIP) -s $(PROGRAM) |
Ronald G. Minnich | 5e5f75e | 2002-01-29 18:21:41 +0000 | [diff] [blame] | 25 | |
| 26 | clean: |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame^] | 27 | rm -f *.o *~ |
Ronald G. Minnich | eaab50b | 2003-09-12 22:41:53 +0000 | [diff] [blame] | 28 | |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame^] | 29 | distclean: clean |
| 30 | rm -f $(PROGRAM) .dependencies |
| 31 | |
| 32 | dep: |
| 33 | @$(CC) -MM *.c > .dependencies |
Ronald G. Minnich | eaab50b | 2003-09-12 22:41:53 +0000 | [diff] [blame] | 34 | |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame^] | 35 | .PHONY: all clean distclean dep |
| 36 | |
| 37 | -include .dependencies |
| 38 | |