diff --git a/dummyflasher.c b/dummyflasher.c
index a8bf8f0..e947f00 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -22,20 +22,11 @@
 #include "chipdrivers.h"
 #include "programmer.h"
 
-/* Remove the #define below if you don't want SPI flash chip emulation. */
-#define EMULATE_SPI_CHIP 1
-
-#if EMULATE_SPI_CHIP
-#define EMULATE_CHIP 1
 #include "spi.h"
-#endif
 
-#if EMULATE_CHIP
 #include <sys/types.h>
 #include <sys/stat.h>
-#endif
 
-#if EMULATE_CHIP
 enum emu_chip {
 	EMULATE_NONE,
 	EMULATE_ST_M25P10_RES,
@@ -66,7 +57,6 @@
 	uint8_t *flashchip_contents;
 };
 
-#if EMULATE_SPI_CHIP
 /* A legit complete SFDP table based on the MX25L6436E (rev. 1.8) datasheet. */
 static const uint8_t sfdp_table[] = {
 	0x53, 0x46, 0x44, 0x50, // @0x00: SFDP signature
@@ -93,8 +83,6 @@
 	0xFF, 0xFF, 0xFF, 0xFF, // @0x54: Macronix parameter table end
 };
 
-#endif
-#endif
 
 static unsigned int spi_write_256_chunksize = 256;
 
@@ -136,7 +124,6 @@
 static int dummy_shutdown(void *data)
 {
 	msg_pspew("%s\n", __func__);
-#if EMULATE_CHIP
 	struct emu_data *emu_data = (struct emu_data *)data;
 	if (emu_data->emu_chip != EMULATE_NONE) {
 		if (emu_data->emu_persistent_image && emu_data->emu_modified) {
@@ -148,7 +135,6 @@
 		free(emu_data->emu_persistent_image);
 		free(emu_data->flashchip_contents);
 	}
-#endif
 	free(data);
 	return 0;
 }
@@ -159,9 +145,7 @@
 	char *tmp = NULL;
 	unsigned int i;
 	char *endptr;
-#if EMULATE_SPI_CHIP
 	char *status = NULL;
-#endif
 
 	bustext = extract_programmer_param("bus");
 	msg_pdbg("Requested buses are: %s\n", bustext ? bustext : "default");
@@ -274,7 +258,6 @@
 	}
 	free(tmp);
 
-#if EMULATE_CHIP
 	tmp = extract_programmer_param("emulate");
 	if (!tmp) {
 		msg_pdbg("Not emulating any flash chip.\n");
@@ -282,7 +265,6 @@
 		return 0;
 	}
 
-#if EMULATE_SPI_CHIP
 	if (!strcmp(tmp, "M25P10.RES")) {
 		data->emu_chip = EMULATE_ST_M25P10_RES;
 		data->emu_chip_size = 128 * 1024;
@@ -347,7 +329,6 @@
 		data->emu_jedec_ce_c7_size = data->emu_chip_size;
 		msg_pdbg("Emulating Winbond W25Q128FV SPI flash chip (RDID)\n");
 	}
-#endif /* EMULATE_SPI_CHIP */
 	if (data->emu_chip == EMULATE_NONE) {
 		msg_perr("Invalid chip specified for emulation: %s\n", tmp);
 		free(tmp);
@@ -355,7 +336,6 @@
 	}
 	free(tmp);
 
-#ifdef EMULATE_SPI_CHIP
 	status = extract_programmer_param("spi_status");
 	if (status) {
 		errno = 0;
@@ -370,7 +350,6 @@
 		msg_pdbg("Initial status register is set to 0x%02x.\n",
 			 data->emu_status);
 	}
-#endif /* EMULATE_SPI_CHIP */
 
 	data->flashchip_contents = malloc(data->emu_chip_size);
 	if (!data->flashchip_contents) {
@@ -378,16 +357,13 @@
 		return 1;
 	}
 
-#endif /* EMULATE_CHIP */
 
 	return 0;
 }
 
 int dummy_init(void)
 {
-#if EMULATE_CHIP
 	struct stat image_stat;
-#endif
 
 	struct emu_data *data = calloc(1, sizeof(struct emu_data));
 	if (!data) {
@@ -406,7 +382,6 @@
 		return 1;
 	}
 
-#if EMULATE_CHIP
 	if (data->emu_chip == EMULATE_NONE) {
 		msg_pdbg("Not emulating any flash chip.\n");
 		/* Nothing else to do. */
@@ -442,7 +417,6 @@
 			msg_pdbg("doesn't match.\n");
 		}
 	}
-#endif /* EMULATE_CHIP */
 
 dummy_init_out:
 	if (register_shutdown(dummy_shutdown, data)) {
@@ -523,7 +497,6 @@
 	return;
 }
 
-#if EMULATE_SPI_CHIP
 static int emulate_spi_chip_response(unsigned int writecnt,
 				     unsigned int readcnt,
 				     const unsigned char *writearr,
@@ -868,7 +841,6 @@
 		data->emu_status &= ~SPI_SR_WEL;
 	return 0;
 }
-#endif
 
 static int dummy_spi_send_command(const struct flashctx *flash, unsigned int writecnt,
 				  unsigned int readcnt,
@@ -890,7 +862,6 @@
 
 	/* Response for unknown commands and missing chip is 0xff. */
 	memset(readarr, 0xff, readcnt);
-#if EMULATE_SPI_CHIP
 	switch (emu_data->emu_chip) {
 	case EMULATE_ST_M25P10_RES:
 	case EMULATE_SST_SST25VF040_REMS:
@@ -906,7 +877,6 @@
 	default:
 		break;
 	}
-#endif
 	msg_pspew(" reading %u bytes:", readcnt);
 	for (i = 0; i < readcnt; i++)
 		msg_pspew(" 0x%02x", readarr[i]);
