From 8cb4896bdb07e778da87732600b30bc0a452a0a8 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 18 Oct 2019 16:47:57 -0600 Subject: [PATCH] apps/examples/flowc, tcpblaster, and udpblaster: Back out more changes that broke the makefiles fixed by commit 2830892424da13e78b4fc4da9030d5734ac25699. This applies the same fix to other Makefiles that follow that same pattern and seem to have the same breakage. --- examples/flowc/Makefile | 10 ++++++++-- examples/pf_ieee802154/.gitignore | 1 - examples/tcpblaster/Makefile | 16 +++++++++++++--- examples/udpblaster/Makefile | 7 +++++-- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/examples/flowc/Makefile b/examples/flowc/Makefile index 73209daff..f457d62cc 100644 --- a/examples/flowc/Makefile +++ b/examples/flowc/Makefile @@ -88,22 +88,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_FLOWC_TARGET2),y) + $(HOST_BIN): config.h $(HOST_OBJS) $(Q) $(HOSTCC) $(HOSTLDFLAGS) $(HOST_OBJS) -o $@ +endif + context:: config.h $(HOST_BIN) clean:: +ifneq ($(CONFIG_EXAMPLES_FLOWC_TARGET2),y) $(call DELFILE, $(HOST_BIN)) $(call DELFILE, *.$(HOSTOBJSEXT)) $(call DELFILE, *.dSYM) - $(call DELFILE, config.h) - endif + $(call DELFILE, config.h) MODULE = $(CONFIG_EXAMPLES_FLOWC) diff --git a/examples/pf_ieee802154/.gitignore b/examples/pf_ieee802154/.gitignore index f91aeb748..b671b58e8 100644 --- a/examples/pf_ieee802154/.gitignore +++ b/examples/pf_ieee802154/.gitignore @@ -2,7 +2,6 @@ /.depend /.built /host -/config.h /*.asm /*.obj /*.rel diff --git a/examples/tcpblaster/Makefile b/examples/tcpblaster/Makefile index 9bb2c17ac..585b9c9e5 100644 --- a/examples/tcpblaster/Makefile +++ b/examples/tcpblaster/Makefile @@ -106,25 +106,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_TCPBLASTER_TARGET2),y) +ifneq ($(CONFIG_EXAMPLES_TCPBLASTER_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_TCPBLASTER_TARGET2),y) +ifneq ($(CONFIG_EXAMPLES_TCPBLASTER_LOOPBACK),y) $(call DELFILE, *.$(HOSTOBJEXT)) $(call DELFILE, $(HOST_BIN)) $(call DELFILE, *.dSYM) +endif +endif $(call DELFILE, config.h) -endif -endif - MODULE = $(CONFIG_EXAMPLES_TCPBLASTER) include $(APPDIR)/Application.mk diff --git a/examples/udpblaster/Makefile b/examples/udpblaster/Makefile index 67e1add26..05e44539a 100644 --- a/examples/udpblaster/Makefile +++ b/examples/udpblaster/Makefile @@ -60,24 +60,27 @@ ifneq ($(CONFIG_EXAMPLES_UDPBLASTER_LOOPBACK),y) $(HOST_OBJS): %$(HOSTOBJEXT): %.c @echo "CC: $<" $(Q) $(HOSTCC) -c $(HOSTCFLAGS) $< -o $@ +endif config.h: $(TOPDIR)/include/nuttx/config.h @echo "CP: $<" $(Q) cp $< $@ +ifneq ($(CONFIG_EXAMPLES_UDPBLASTER_LOOPBACK),y) $(HOST_BIN): config.h $(HOST_OBJS) @echo "LD: $@" $(Q) $(HOSTCC) $(HOSTLDFLAGS) $(HOST_OBJS) -o $@ +endif context:: config.h $(HOST_BIN) clean:: +ifneq ($(CONFIG_EXAMPLES_UDPBLASTER_LOOPBACK),y) $(call DELFILE, *$(HOSTOBJEXT)) $(call DELFILE, $(HOST_BIN)) $(call DELFILE, *.dSYM) - $(call DELFILE, config.h) - endif + $(call DELFILE, config.h) MODULE = $(CONFIG_EXAMPLES_UDPBLASTER)