summaryrefslogtreecommitdiff
path: root/util/flashrom/Makefile
diff options
context:
space:
mode:
authorLi-Ta Lo <ollie@lanl.gov>2005-11-26 21:55:36 +0000
committerLi-Ta Lo <ollie@lanl.gov>2005-11-26 21:55:36 +0000
commit1a4f0707bb33836953ffe90f6216ee20210cd1fa (patch)
tree72737cc64699dfdb0cbcee0be4db57ca859f74dd /util/flashrom/Makefile
parentf622d598db3a6fb7001b6b63e7184272eb19db72 (diff)
flasrom update from Stefan, resovle issue 21
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2111 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/Makefile')
-rw-r--r--util/flashrom/Makefile61
1 files changed, 33 insertions, 28 deletions
diff --git a/util/flashrom/Makefile b/util/flashrom/Makefile
index 9d4124f31f..9293fb8723 100644
--- a/util/flashrom/Makefile
+++ b/util/flashrom/Makefile
@@ -1,33 +1,38 @@
-OBJS = flash_enable.o udelay.o jedec.o sst28sf040.o am29f040b.o mx29f002.c sst39sf020.o \
- m29f400bt.o w49f002u.o 82802ab.o msys_doc.o pm49fl004.o sst49lf040.o sst_fwhub.o
-CC = gcc -O2 -g -Wall -Werror
+#
+# Makefile for flash_rom
+#
+# redone by Stefan Reinauer <stepan@openbios.org>
+#
-all: flash_rom flash_on
+PROGRAM = flashrom
-flash_rom: flash_rom.o ${OBJS}
- ${CC} -o flash_rom flash_rom.c ${OBJS} -lpci
+CC = gcc
+STRIP = strip
+#CFLAGS = -O2 -g -Wall -Werror
+CFLAGS = -Os -Wall -Werror -DDISABLE_DOC
+LDFLAGS = -lpci -static
-flash_on: flash_on.c
- ${CC} -o flash_on flash_on.c
+
+OBJS = flash_enable.o udelay.o jedec.o sst28sf040.o am29f040b.o mx29f002.o \
+ sst39sf020.o m29f400bt.o w49f002u.o 82802ab.o msys_doc.o pm49fl004.o \
+ sst49lf040.o sst_fwhub.o layout.o lbtable.o flashchips.o flash_rom.o
+
+all: dep $(PROGRAM)
+
+$(PROGRAM): $(OBJS)
+ $(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
+ $(STRIP) -s $(PROGRAM)
clean:
- rm -f flash_rom flash_on *.o *~
-
-flash_rom.o: flash_rom.c flash.h jedec.h \
- 82802ab.h am29f040b.h m29f400bt.h msys_doc.h mx29f002.h sst28sf040.h \
- sst39sf020.h w49f002u.h sst49lf040.h
-flash_on.o: flash_on.c
-
-82802ab.o: 82802ab.c 82802ab.h flash.h
-am29f040b.o: am29f040b.c am29f040b.h jedec.h flash.h
-m29f400bt.o: m29f400bt.c m29f400bt.h flash.h
-msys_doc.o: msys_doc.c msys_doc.h flash.h
-mx29f002.o: mx29f002.c mx29f002.h jedec.h flash.h
-sst28sf040.o: sst28sf040.c sst28sf040.h jedec.h flash.h
-sst39sf020.o: sst39sf020.c sst39sf020.h jedec.h flash.h
-sst49lf040.o: sst49lf040.c sst49lf040.h jedec.h flash.h
-w49f002u.o: w49f002u.c w49f002u.h jedec.h flash.h
-pm49fl004.o: pm49fl004.c pm49fl004.h jedec.h flash.h
-flash_enable.o: flash_enable.c
-udelay.o: udelay.c
-jedec.o: jedec.c jedec.h flash.h
+ rm -f *.o *~
+
+distclean: clean
+ rm -f $(PROGRAM) .dependencies
+
+dep:
+ @$(CC) -MM *.c > .dependencies
+
+.PHONY: all clean distclean dep
+
+-include .dependencies
+