summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-09-16 10:09:21 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-09-16 10:09:21 +0000
commit4740c6ff3c230c83fa618557f94cc6675c5ab3b1 (patch)
tree9e511c0b501d900db3810632231ca8a620a118e6 /Makefile
parentab044b20a2b44097ce65c3fd4f232ee7170303ba (diff)
downloadast2050-flashrom-4740c6ff3c230c83fa618557f94cc6675c5ab3b1.zip
ast2050-flashrom-4740c6ff3c230c83fa618557f94cc6675c5ab3b1.tar.gz
Allow to exclude each of the external programmer drivers from being compiled in
Example make commandline if you want only internal programmers: make CONFIG_FT2232SPI=no CONFIG_SERPROG=no CONFIG_NIC3COM=no CONFIG_SATASII=no CONFIG_DRKAISER=no CONFIG_DUMMY=no Of course, all of the CONFIG_* symbols can be mixed and matched as needed. CONFIG_FT2232SPI is special because even if it is enabled, make will check if the headers are available and skip it otherwise. Corresponding to flashrom svn r724. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile45
1 files changed, 41 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 0a6eb79..1b50d87 100644
--- a/Makefile
+++ b/Makefile
@@ -49,8 +49,7 @@ OBJS = chipset_enable.o board_enable.o udelay.o jedec.o stm50flw0x0x.o \
sst49lfxxxc.o sst_fwhub.o layout.o cbtable.o flashchips.o physmap.o \
flashrom.o w39v080fa.o sharplhf00l04.o w29ee011.o spi.o it87spi.o \
ichspi.o w39v040c.o sb600spi.o wbsio_spi.o m29f002.o internal.o \
- dummyflasher.o pcidev.o nic3com.o satasii.o ft2232_spi.o \
- print.o drkaiser.o
+ pcidev.o print.o
all: pciutils features dep $(PROGRAM)
@@ -67,7 +66,22 @@ RELEASENAME ?= $(VERSION)
SVNDEF := -D'FLASHROM_VERSION="$(VERSION)"'
# Always enable serprog for now. Needs to be disabled on Windows.
-CONFIG_SERPROG = yes
+CONFIG_SERPROG ?= yes
+
+# Always enable 3Com NICs for now.
+CONFIG_NIC3COM ?= yes
+
+# Always enable SiI SATA controllers for now.
+CONFIG_SATASII ?= yes
+
+# Always enable FT2232 SPI dongles for now.
+CONFIG_FT2232SPI ?= yes
+
+# Always enable dummy tracing for now.
+CONFIG_DUMMY ?= yes
+
+# Always enable Dr. Kaiser for now.
+CONFIG_DRKAISER ?= yes
ifeq ($(CONFIG_SERPROG), yes)
FEATURE_CFLAGS += -D'SERPROG_SUPPORT=1'
@@ -77,9 +91,32 @@ LIBS += -lsocket
endif
endif
-FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-D'FT2232_SPI_SUPPORT=1'")
+ifeq ($(CONFIG_NIC3COM), yes)
+FEATURE_CFLAGS += -D'NIC3COM_SUPPORT=1'
+OBJS += nic3com.o
+endif
+ifeq ($(CONFIG_SATASII), yes)
+FEATURE_CFLAGS += -D'SATASII_SUPPORT=1'
+OBJS += satasii.o
+endif
+
+ifeq ($(CONFIG_FT2232SPI), yes)
+# This is a totally ugly hack.
+FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-D'FT2232_SPI_SUPPORT=1'")
FEATURE_LIBS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-lftdi")
+OBJS += ft2232_spi.o
+endif
+
+ifeq ($(CONFIG_DUMMY), yes)
+FEATURE_CFLAGS += -D'DUMMY_SUPPORT=1'
+OBJS += dummyflasher.o
+endif
+
+ifeq ($(CONFIG_DRKAISER), yes)
+FEATURE_CFLAGS += -D'DRKAISER_SUPPORT=1'
+OBJS += drkaiser.o
+endif
$(PROGRAM): $(OBJS)
$(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS) $(FEATURE_LIBS)
OpenPOWER on IntegriCloud