From 1a3167bf3cbaa8099cbee42a57310ed6386e2e33 Mon Sep 17 00:00:00 2001 From: Timo Wischer Date: Tue, 1 Mar 2016 13:21:26 +0100 Subject: [PATCH] Make all modules configurable --- Makefile | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aa14ba4..27d89ce 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ LED_SERIAL_PIN ?= 14 # --------------- esp-link modules config options --------------- # Optional Modules mqtt -#MODULES ?= mqtt rest syslog cmd +#MODULES ?= mqtt rest syslog cmd esp-link/cgiadv esp-link/log serial/console serial/serbridge # --------------- esphttpd config options --------------- @@ -216,6 +216,26 @@ ifneq (,$(findstring syslog,$(MODULES))) CFLAGS += -DSYSLOG endif +ifneq (,$(findstring cmd,$(MODULES))) + CFLAGS += -DCMD +endif + +ifneq (,$(findstring esp-link/cgiadv,$(MODULES))) + CFLAGS += -DCGI_ADVANCED +endif + +ifneq (,$(findstring esp-link/log,$(MODULES))) + CFLAGS += -DLOG +endif + +ifneq (,$(findstring serial/console,$(MODULES))) + CFLAGS += -DCONSOLE +endif + +ifneq (,$(findstring serial/serbridge,$(MODULES))) + CFLAGS += -DSERIAL_BRIDGE +endif + # which modules (subdirectories) of the project to include in compiling LIBRARIES_DIR = libraries MODULES += espfs httpd user serial esp-link