From 2830892424da13e78b4fc4da9030d5734ac25699 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 18 Oct 2019 16:24:43 -0600 Subject: [PATCH] apps/examples/udp and nettest: Back out parts of commit e806097c70084ba98ff2ed1d018afbc126e533ae that broke the build of these examples. --- examples/nettest/Makefile | 16 +++++++++++++--- examples/udp/Makefile | 10 ++++++++-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/examples/nettest/Makefile b/examples/nettest/Makefile index 22ced9269..c13a5d76a 100644 --- a/examples/nettest/Makefile +++ b/examples/nettest/Makefile @@ -109,25 +109,35 @@ $(HOST_OBJS): %.$(HOSTOBJEXT): %.c @echo "CC: $<" $(Q) $(HOSTCC) -c $(HOSTCFLAGS) $< -o $@ +endif +endif + config.h: $(TOPDIR)/include/nuttx/config.h @echo "CP: $<" $(Q) cp $< $@ +ifneq ($(CONFIG_EXAMPLES_NETTEST_TARGET2),y) +ifneq ($(CONFIG_EXAMPLES_NETTEST_LOOPBACK),y) + $(HOST_BIN): config.h $(HOST_OBJS) @echo "LD: $@" $(Q) $(HOSTCC) $(HOSTLDFLAGS) $(HOST_OBJS) -o $@ +endif +endif + context:: config.h $(HOST_BIN) clean:: +ifneq ($(CONFIG_EXAMPLES_NETTEST_TARGET2),y) +ifneq ($(CONFIG_EXAMPLES_NETTEST_LOOPBACK),y) $(call DELFILE, *.$(HOSTOBJEXT)) $(call DELFILE, $(HOST_BIN)) $(call DELFILE, *.dSYM) +endif +endif $(call DELFILE, config.h) -endif -endif - MODULE = $(CONFIG_EXAMPLES_NETTEST) include $(APPDIR)/Application.mk diff --git a/examples/udp/Makefile b/examples/udp/Makefile index 665159dd0..dabd9c24b 100644 --- a/examples/udp/Makefile +++ b/examples/udp/Makefile @@ -96,22 +96,28 @@ $(HOST_OBJS): %.$(HOSTOBJSEXT): %.c @echo "CC: $<" $(Q) $(HOSTCC) -c $(HOSTCFLAGS) $< -o $@ +endif + config.h: $(TOPDIR)/include/nuttx/config.h @echo "CP: $<" $(Q) cp $< $@ +ifneq ($(CONFIG_EXAMPLES_UDP_TARGET2),y) + $(HOST_BIN): config.h $(HOST_OBJS) $(Q) $(HOSTCC) $(HOSTLDFLAGS) $(HOST_OBJS) -o $@ +endif + context:: config.h $(HOST_BIN) clean:: +ifneq ($(CONFIG_EXAMPLES_UDP_TARGET2),y) $(call DELFILE, $(HOST_BIN)) $(call DELFILE, *.$(HOSTOBJSEXT)) $(call DELFILE, *.dSYM) - $(call DELFILE, config.h) - endif + $(call DELFILE, config.h) MODULE = $(CONFIG_EXAMPLES_UDP)