diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-08-12 16:17:41 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-08-12 16:17:41 +0000 |
commit | 18d8712e6187ce1e977c987b0dc8e70e79c36dba (patch) | |
tree | b7a34e33e948c851fcbf64e55c1f3aea465f80b9 /Makefile | |
parent | 8121b58da9cd6098441636a91b3ae3899de4b82a (diff) | |
download | flashrom-18d8712e6187ce1e977c987b0dc8e70e79c36dba.zip flashrom-18d8712e6187ce1e977c987b0dc8e70e79c36dba.tar.gz |
Allow to compile out serprog completely
If CONFIG_SERPROG is not set, no stubs and no data of serprog will remain.
Side benefit: This kills a few dozen lines of code. r678, r679 and r680 made
this possible. Once "Only list available programers in usage()" is committed,
even the usage message will be adjusted automatically.
Corresponding to flashrom svn r681.
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 | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -49,7 +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 serprog.o \ + dummyflasher.o pcidev.o nic3com.o satasii.o ft2232_spi.o \ print.o all: pciutils features dep $(PROGRAM) @@ -64,14 +64,20 @@ VERSION := 0.9.0-r$(SVNVERSION) SVNDEF := -D'FLASHROM_VERSION="$(VERSION)"' -$(PROGRAM): $(OBJS) - $(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS) $(FEATURE_LIBS) - -FEATURE_CFLAGS = $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-D'FT2232_SPI_SUPPORT=1'") # Always enable serprog for now. Needs to be disabled on Windows. +CONFIG_SERPROG = yes + +ifeq ($(CONFIG_SERPROG), yes) FEATURE_CFLAGS += -D'SERPROG_SUPPORT=1' +OBJS += serprog.o +endif -FEATURE_LIBS = $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-lftdi") +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") + +$(PROGRAM): $(OBJS) + $(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS) $(FEATURE_LIBS) # TAROPTIONS reduces information leakage from the packager's system. # If other tar programs support command line arguments for setting uid/gid of |