diff options
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) |