summaryrefslogtreecommitdiff
path: root/nuttx/examples/usbserial/Makefile.host
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/examples/usbserial/Makefile.host')
-rw-r--r--nuttx/examples/usbserial/Makefile.host20
1 files changed, 17 insertions, 3 deletions
diff --git a/nuttx/examples/usbserial/Makefile.host b/nuttx/examples/usbserial/Makefile.host
index ea394090b..0997ce81c 100644
--- a/nuttx/examples/usbserial/Makefile.host
+++ b/nuttx/examples/usbserial/Makefile.host
@@ -33,16 +33,30 @@
#
############################################################################
--include $(TOPDIR)/.config
--include $(TOPDIR)/Make.defs
+include $(TOPDIR)/.config
+include $(TOPDIR)/Make.defs
SRC = host.c
BIN = host
+DEFINES =
+ifeq ($(CONFIG_EXAMPLES_USBSERIAL_INONLY),y)
+DEFINES += -DCONFIG_EXAMPLES_USBSERIAL_INONLY=1
+endif
+ifeq ($(CONFIG_EXAMPLES_USBSERIAL_OUTONLY),y)
+DEFINES += -DCONFIG_EXAMPLES_USBSERIAL_OUTONLY=1
+endif
+ifeq ($(CONFIG_EXAMPLES_USBSERIAL_ONLYSMALL),y)
+DEFINES += -DCONFIG_EXAMPLES_USBSERIAL_ONLYSMALL=1
+endif
+ifeq ($(CONFIG_EXAMPLES_USBSERIAL_ONLYBIG),y)
+DEFINES += -DCONFIG_EXAMPLES_USBSERIAL_ONLYBIG=1
+endif
+
all: $(BIN)$(EXEEXT)
$(BIN)$(EXEEXT): $(SRC)
- $(HOSTCC) $(HOSTCFLAGS) $^ -o $@
+ $(HOSTCC) $(HOSTCFLAGS) $(DEFINES) $^ -o $@
clean:
@rm -f $(BIN) *~ .*.swp *.o