diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-09-16 10:09:21 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-09-16 10:09:21 +0000 |
commit | 2fa6f73ce19a6c3582f597cfa331766c94c10963 (patch) | |
tree | 9e511c0b501d900db3810632231ca8a620a118e6 /Makefile | |
parent | 41f78375687690549a26eca62552b4576bd1fea4 (diff) | |
download | flashrom-2fa6f73ce19a6c3582f597cfa331766c94c10963.zip flashrom-2fa6f73ce19a6c3582f597cfa331766c94c10963.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-- | Makefile | 45 |
1 files changed, 41 insertions, 4 deletions
@@ -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) |