diff options
67 files changed, 832 insertions, 719 deletions
diff --git a/apps/examples/adc/Makefile b/apps/examples/adc/Makefile index 57d406f23..2c84db045 100644 --- a/apps/examples/adc/Makefile +++ b/apps/examples/adc/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # NuttX NX Graphics Example. -ASRCS = -CSRCS = adc_main.c +ASRCS = +CSRCS = +MAINSRC = adc_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= adc$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Touchscreen built-in application info -APPNAME = adc -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = adc +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/buttons/Makefile b/apps/examples/buttons/Makefile index 1b891e286..6310e5ba5 100644 --- a/apps/examples/buttons/Makefile +++ b/apps/examples/buttons/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # Hello, World! Example -ASRCS = -CSRCS = buttons_main.c +ASRCS = +CSRCS = +MAINSRC = buttons_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= buttons$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Buttons built-in application info -APPNAME = buttons -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = buttons +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/can/Makefile b/apps/examples/can/Makefile index 3898bb484..d9c837587 100644 --- a/apps/examples/can/Makefile +++ b/apps/examples/can/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # NuttX NX Graphics Example. -ASRCS = -CSRCS = can_main.c +ASRCS = +CSRCS = +MAINSRC = can_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= can$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Touchscreen built-in application info -APPNAME = can -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = can +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/cc3000/Makefile b/apps/examples/cc3000/Makefile index c5aa0290f..a2e2e306b 100644 --- a/apps/examples/cc3000/Makefile +++ b/apps/examples/cc3000/Makefile @@ -39,37 +39,44 @@ include $(APPDIR)/Make.defs # Hello, World! built-in application info -APPNAME = c3b -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 608 +APPNAME = c3b +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 608 -APPNAME1 = shell -PRIORITY1 = SCHED_PRIORITY_DEFAULT -STACKSIZE1 = 980 +APPNAME1 = shell +PRIORITY1 = SCHED_PRIORITY_DEFAULT +STACKSIZE1 = 980 # Hello, World! Example -ASRCS = -CSRCS = cc3000basic.c board.c shell.c telnetd_driver.c telnetd_daemon.c +ASRCS = +CSRCS = board.c telnetd_driver.c telnetd_daemon.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +CC3000SRC = cc3000basic.c +SHELLSRC = shell.c +MAINSRC = $(CC3000SRC) $(SHELLSRC) + +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) + +CC3000OBJ = $(CC3000SRC:.c=$(OBJEXT)) +SHELLOBJ = $(SHELLSRC:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -79,14 +86,17 @@ else INSTALL_DIR = $(BIN_DIR) endif -CONFIG_XYZ_PROGNAME ?= cc3000$(EXEEXT) -PROGNAME = $(CONFIG_XYZ_PROGNAME) +CONFIG_XYZ_PROGNAME1 ?= cc3000$(EXEEXT) +PROGNAME1 = $(CONFIG_XYZ_PROGNAME1) -ROOTDEPPATH = --dep-path . +CONFIG_XYZ_PROGNAME2 ?= shell$(EXEEXT) +PROGNAME2 = $(CONFIG_XYZ_PROGNAME2) + +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean @@ -102,12 +112,17 @@ $(COBJS): %$(OBJEXT): %.c @touch .built ifeq ($(CONFIG_BUILD_KERNEL),y) -$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ) - @echo "LD: $(PROGNAME)" - $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS) - $(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME) +$(BIN_DIR)$(DELIM)$(PROGNAME1): $(OBJS) $(CC3000OBJ) + @echo "LD: $(PROGNAME1)" + $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME1) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS) + $(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME1) + +$(BIN_DIR)$(DELIM)$(PROGNAME2): $(OBJS) $(SHELLOBJ) + @echo "LD: $(PROGNAME2)" + $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME2) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS) + $(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME2) -install: $(BIN_DIR)$(DELIM)$(PROGNAME) +install: $(BIN_DIR)$(DELIM)$(PROGNAME1) $(BIN_DIR)$(DELIM)$(PROGNAME2) else install: diff --git a/apps/examples/configdata/Makefile b/apps/examples/configdata/Makefile index d88b7f744..b40f7b25b 100644 --- a/apps/examples/configdata/Makefile +++ b/apps/examples/configdata/Makefile @@ -40,7 +40,8 @@ include $(APPDIR)/Make.defs # CONFIGDATA Unit Test ASRCS = -CSRCS = configdata_main.c +CSRCS = +MAINSRC = configdata_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/cpuhog/Makefile b/apps/examples/cpuhog/Makefile index 468013334..5ae7f8df1 100644 --- a/apps/examples/cpuhog/Makefile +++ b/apps/examples/cpuhog/Makefile @@ -40,7 +40,8 @@ include $(APPDIR)/Make.defs # do nothing loop to use up cpu time ASRCS = -CSRCS = cpuhog_main.c +CSRCS = +MAINSRC = cpuhog_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/cxxtest/Makefile b/apps/examples/cxxtest/Makefile index 94d65b8c2..6961bce44 100644 --- a/apps/examples/cxxtest/Makefile +++ b/apps/examples/cxxtest/Makefile @@ -39,41 +39,52 @@ include $(APPDIR)/Make.defs # CXX test program -ASRCS = -CSRCS = -CXXSRCS = cxxtest_main.cxx +ASRCS = +CSRCS = +CXXSRCS = +MAINSRC = cxxtest_main.cxx -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) +CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) +MAINOBJS = $(MAINSRC:.cxx=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) +SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) +OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) + +ifneq ($(CONFIG_BUILD_KERNEL),y) + OBJS += $(MAINOBJ) +endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif -ROOTDEPPATH = --dep-path . +CONFIG_XYZ_PROGNAME ?= cxxtest$(EXEEXT) +PROGNAME = $(CONFIG_XYZ_PROGNAME) + +ROOTDEPPATH = --dep-path . + +ROOTDEPPATH = --dep-path . # cxxtest built-in application info -APPNAME = cxxtest -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 4096 +APPNAME = cxxtest +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 4096 # Common build -VPATH = +VPATH = all: .built -.PHONY: clean depend distclean chkcxx +.PHONY: clean depend distclean chkcxx chkcxx: ifneq ($(CONFIG_HAVE_CXX),y) @@ -100,8 +111,18 @@ $(CXXOBJS): %$(OBJEXT): %.cxx $(call ARCHIVE, $(BIN), $(OBJS)) @touch .built +ifeq ($(CONFIG_BUILD_KERNEL),y) +$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ) + @echo "LD: $(PROGNAME)" + $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS) + $(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME) + +install: $(BIN_DIR)$(DELIM)$(PROGNAME) + +else install: +endif ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) diff --git a/apps/examples/dhcpd/Makefile b/apps/examples/dhcpd/Makefile index 28f95ffd7..ad7f5d514 100644 --- a/apps/examples/dhcpd/Makefile +++ b/apps/examples/dhcpd/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # DHCP Daemon Example -ASRCS = -CSRCS = target.c +ASRCS = +CSRCS = +MAINSRC = target.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= dhcpd$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # DHCPD built-in application info -APPNAME = dhcpd -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = dhcpd +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/discover/Makefile b/apps/examples/discover/Makefile index ae3c86263..6d419fd41 100644 --- a/apps/examples/discover/Makefile +++ b/apps/examples/discover/Makefile @@ -42,31 +42,32 @@ include $(APPDIR)/Make.defs # Discover built-in application info -APPNAME = discover -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = discover +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = discover_main.c +ASRCS = +CSRCS = +MAINSRC = discover_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -79,11 +80,11 @@ endif CONFIG_XYZ_PROGNAME ?= discover$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/elf/Makefile b/apps/examples/elf/Makefile index cabb7e137..08fc74f06 100644 --- a/apps/examples/elf/Makefile +++ b/apps/examples/elf/Makefile @@ -40,7 +40,8 @@ include $(APPDIR)/Make.defs # ELF Example ASRCS = -CSRCS = elf_main.c symtab.c +CSRCS = symtab.c +MAINSRC = elf_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) @@ -54,12 +55,12 @@ ifneq ($(CONFIG_BUILD_KERNEL),y) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,7 +73,7 @@ endif CONFIG_XYZ_PROGNAME ?= discover$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . --dep-path tests +ROOTDEPPATH = --dep-path . --dep-path tests # Build targets diff --git a/apps/examples/flash_test/Makefile b/apps/examples/flash_test/Makefile index 305de38e9..d6889d854 100644 --- a/apps/examples/flash_test/Makefile +++ b/apps/examples/flash_test/Makefile @@ -49,7 +49,8 @@ PRIORITY = SCHED_PRIORITY_DEFAULT STACKSIZE = 2048 ASRCS = -CSRCS = flash_test.c +CSRCS = +MAINSRC = flash_test.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/ftpc/Makefile b/apps/examples/ftpc/Makefile index 74741b5ee..10698ba31 100644 --- a/apps/examples/ftpc/Makefile +++ b/apps/examples/ftpc/Makefile @@ -39,31 +39,32 @@ include $(APPDIR)/Make.defs # FTPC Client Application -APPNAME = ftpc -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 4096 +APPNAME = ftpc +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 4096 -ASRCS = -CSRCS = ftpc_main.c ftpc_cmds.c +ASRCS = +CSRCS = ftpc_cmds.c +MAINSRC = ftpc_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -76,13 +77,13 @@ endif CONFIG_XYZ_PROGNAME ?= ftpc$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = -all: .built +all: .built .PHONY: context depend clean distclean $(AOBJS): %$(OBJEXT): %.S diff --git a/apps/examples/ftpd/Makefile b/apps/examples/ftpd/Makefile index 1e3255ff8..5037faad6 100644 --- a/apps/examples/ftpd/Makefile +++ b/apps/examples/ftpd/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # Hello, World! Example -ASRCS = -CSRCS = ftpd_main.c +ASRCS = +CSRCS = +MAINSRC = ftpd_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= ftpd$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built diff --git a/apps/examples/hidkbd/Makefile b/apps/examples/hidkbd/Makefile index 91d224fbe..db60dc76d 100644 --- a/apps/examples/hidkbd/Makefile +++ b/apps/examples/hidkbd/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # USB Host HID keyboard Example -ASRCS = -CSRCS = hidkbd_main.c +ASRCS = +CSRCS = +MAINSRC = hidkbd_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= hidkbd$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/i2schar/Makefile b/apps/examples/i2schar/Makefile index 8e3473aa1..ba44b401f 100644 --- a/apps/examples/i2schar/Makefile +++ b/apps/examples/i2schar/Makefile @@ -40,13 +40,14 @@ include $(APPDIR)/Make.defs # I2S character driver test ASRCS = -CSRCS = i2schar_main.c +CSRCS = ifeq ($(CONFIG_EXAMPLES_I2SCHAR_TX),y) CSRCS += i2schar_transmitter.c endif ifeq ($(CONFIG_EXAMPLES_I2SCHAR_RX),y) CSRCS += i2schar_receiver.c endif +MAINSRC = i2schar_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/igmp/Makefile b/apps/examples/igmp/Makefile index 1d9802412..19a901670 100644 --- a/apps/examples/igmp/Makefile +++ b/apps/examples/igmp/Makefile @@ -37,33 +37,34 @@ -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs -APPNAME = igmp -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 1024 +APPNAME = igmp +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 1024 # IGMP Networking Example -ASRCS = -CSRCS = igmp.c +ASRCS = +CSRCS = +MAINSRC = igmp.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -76,11 +77,11 @@ endif CONFIG_XYZ_PROGNAME ?= igmp$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/json/Makefile b/apps/examples/json/Makefile index 9781102b4..aaea3f05d 100644 --- a/apps/examples/json/Makefile +++ b/apps/examples/json/Makefile @@ -39,31 +39,32 @@ include $(APPDIR)/Make.defs # cJSON built-in application info -APPNAME = json -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = json +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = json_main.c +ASRCS = +CSRCS = +MAINSRC = json_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -76,11 +77,11 @@ endif CONFIG_XYZ_PROGNAME ?= json$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/keypadtest/Makefile b/apps/examples/keypadtest/Makefile index 726646c1e..1c8959e94 100644 --- a/apps/examples/keypadtest/Makefile +++ b/apps/examples/keypadtest/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # Keypad Test Example -ASRCS = -CSRCS = keypadtest_main.c +ASRCS = +CSRCS = +MAINSRC = keypadtest_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -78,11 +79,11 @@ endif CONFIG_XYZ_PROGNAME ?= keypadtest$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/lcdrw/Makefile b/apps/examples/lcdrw/Makefile index f6f2e3da0..1e9564cc2 100644 --- a/apps/examples/lcdrw/Makefile +++ b/apps/examples/lcdrw/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # LCD Read/Write Test -ASRCS = -CSRCS = lcdrw_main.c +ASRCS = +CSRCS = +MAINSRC = lcdrw_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= lcdrw$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # LCD R/W built-in application info -APPNAME = lcdrw -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = lcdrw +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/mm/Makefile b/apps/examples/mm/Makefile index 24d2abb80..7884d410f 100644 --- a/apps/examples/mm/Makefile +++ b/apps/examples/mm/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # Memory Management Test -ASRCS = -CSRCS = mm_main.c +ASRCS = +CSRCS = +MAINSRC = mm_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= mm$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/modbus/Makefile b/apps/examples/modbus/Makefile index 0ab84590c..e940a248a 100644 --- a/apps/examples/modbus/Makefile +++ b/apps/examples/modbus/Makefile @@ -39,33 +39,34 @@ include $(APPDIR)/Make.defs # FreeModBus demo built-in application info -APPNAME = modbus -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = modbus +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # FreeModBus demo -ASRCS = -CSRCS = modbus_main.c +ASRCS = +CSRCS = +MAINSRC = modbus_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -78,11 +79,11 @@ endif CONFIG_XYZ_PROGNAME ?= modbus$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/mount/Makefile b/apps/examples/mount/Makefile index 77f224819..2d3ef52ce 100644 --- a/apps/examples/mount/Makefile +++ b/apps/examples/mount/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # mount() test -ASRCS = -CSRCS = mount_main.c ramdisk.c +ASRCS = +CSRCS = ramdisk.c +MAINSRC = mount_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= mount$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/mtdpart/Makefile b/apps/examples/mtdpart/Makefile index 0b58c42f1..769e6b891 100755 --- a/apps/examples/mtdpart/Makefile +++ b/apps/examples/mtdpart/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # Hello, World! Example -ASRCS = -CSRCS = mtdpart_main.c +ASRCS = +CSRCS = +MAINSRC = mtdpart_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= mtdpart$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/netpkt/Makefile b/apps/examples/netpkt/Makefile index 46666be76..f4fb2eef1 100644 --- a/apps/examples/netpkt/Makefile +++ b/apps/examples/netpkt/Makefile @@ -46,7 +46,8 @@ STACKSIZE = 2048 # MDIO tool ASRCS = -CSRCS = netpkt_main.c +CSRCS = +MAINSRC = netpkt_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/nettest/Makefile b/apps/examples/nettest/Makefile index b828d6691..99410d47a 100644 --- a/apps/examples/nettest/Makefile +++ b/apps/examples/nettest/Makefile @@ -42,18 +42,24 @@ include $(APPDIR)/Make.defs TARG_ASRCS = TARG_AOBJS = $(TARG_ASRCS:.S=$(OBJEXT)) -TARG_CSRCS = nettest.c +TARG_CSRCS = ifeq ($(CONFIG_EXAMPLES_NETTEST_SERVER),y) TARG_CSRCS += nettest_server.c else TARG_CSRCS += nettest_client.c endif +TARG_MAINSRC = nettest.c TARG_COBJS = $(TARG_CSRCS:.c=$(OBJEXT)) +TARG_MAINOBJ = $(TARG_MAINSRC:.c=$(OBJEXT)) -TARG_SRCS = $(TARG_ASRCS) $(TARG_CSRCS) +TARG_SRCS = $(TARG_ASRCS) $(TARG_CSRCS) $(TARG_CSRCS) TARG_OBJS = $(TARG_AOBJS) $(TARG_COBJS) +ifneq ($(CONFIG_BUILD_KERNEL),y) + TARG_OBJS += $(TARG_MAINOBJ) +endif + ifeq ($(CONFIG_WINDOWS_NATIVE),y) TARG_BIN = ..\..\libapps$(LIBEXT) else @@ -126,9 +132,10 @@ $(HOST_BIN): $(HOST_OBJS) @touch .built ifeq ($(CONFIG_BUILD_KERNEL),y) -$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) +$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(TARG_MAINOBJ) @echo "LD: $(PROGNAME)" - $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(LDLIBS) + $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(TARG_MAINOBJ) $(LDLIBS) + $(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME) install: $(BIN_DIR)$(DELIM)$(PROGNAME) diff --git a/apps/examples/nrf24l01_term/Makefile b/apps/examples/nrf24l01_term/Makefile index 18b5fb07e..8ce3e60cd 100644 --- a/apps/examples/nrf24l01_term/Makefile +++ b/apps/examples/nrf24l01_term/Makefile @@ -40,7 +40,8 @@ include $(APPDIR)/Make.defs # Basic nRF24L01+ terminal demonstration ASRCS = -CSRCS = nrf24l01_term.c +CSRCS = +MAINSRC = nrf24l01_term.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/nsh/Makefile b/apps/examples/nsh/Makefile index ea20b7498..28d0cf6b6 100644 --- a/apps/examples/nsh/Makefile +++ b/apps/examples/nsh/Makefile @@ -40,7 +40,8 @@ include $(APPDIR)/Make.defs # NuttShell (NSH) Example ASRCS = -CSRCS = nsh_main.c +CSRCS = +MAINSRC = nsh_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/null/Makefile b/apps/examples/null/Makefile index 4a0a72186..a0c9d3a2b 100644 --- a/apps/examples/null/Makefile +++ b/apps/examples/null/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # The smallest thing you can build -- the NULL example. -ASRCS = -CSRCS = null_main.c +ASRCS = +CSRCS = +MAINSRC = null_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= null$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/nx/Makefile b/apps/examples/nx/Makefile index fadcddfa5..6b0d59d11 100644 --- a/apps/examples/nx/Makefile +++ b/apps/examples/nx/Makefile @@ -39,30 +39,31 @@ include $(APPDIR)/Make.defs # NuttX NX Graphics Example. -ASRCS = -CSRCS = nx_main.c nx_events.c nx_kbdin.c +ASRCS = +CSRCS = nx_events.c nx_kbdin.c ifeq ($(CONFIG_NX_MULTIUSER),y) -CSRCS += nx_server.c +CSRCS += nx_server.c endif +MAINSRC = nx_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -75,17 +76,17 @@ endif CONFIG_XYZ_PROGNAME ?= nx$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # NX built-in application info -APPNAME = nx -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = nx +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/nxconsole/Makefile b/apps/examples/nxconsole/Makefile index 6110091b7..eb358e790 100644 --- a/apps/examples/nxconsole/Makefile +++ b/apps/examples/nxconsole/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # NuttX NX Console Example. -ASRCS = -CSRCS = nxcon_main.c nxcon_toolbar.c nxcon_wndo.c nxcon_server.c +ASRCS = +CSRCS = nxcon_toolbar.c nxcon_wndo.c nxcon_server.c +MAINSRC = nxcon_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= nxconsole$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/nxffs/Makefile b/apps/examples/nxffs/Makefile index adddc943a..83f921bc3 100644 --- a/apps/examples/nxffs/Makefile +++ b/apps/examples/nxffs/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # Hello, World! Example -ASRCS = -CSRCS = nxffs_main.c +ASRCS = +CSRCS = +MAINSRC = nxffs_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= nxffs$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/nxflat/Makefile b/apps/examples/nxflat/Makefile index a0c198d9d..47e8d8ea1 100644 --- a/apps/examples/nxflat/Makefile +++ b/apps/examples/nxflat/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # NXFLAT Example -ASRCS = -CSRCS = nxflat_main.c +ASRCS = +CSRCS = +MAINSRC = nxflat_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= nxflat$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: headers clean depend distclean diff --git a/apps/examples/nxhello/Makefile b/apps/examples/nxhello/Makefile index eda438921..5d6dc804f 100644 --- a/apps/examples/nxhello/Makefile +++ b/apps/examples/nxhello/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # NuttX NX Graphics Example. -ASRCS = -CSRCS = nxhello_main.c nxhello_bkgd.c +ASRCS = +CSRCS = nxhello_bkgd.c +MAINSRC = nxhello_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= nxhello$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # NXHELLO built-in application info -APPNAME = nxhello -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = nxhello +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/nximage/Makefile b/apps/examples/nximage/Makefile index 8218b9b49..b62fe3943 100644 --- a/apps/examples/nximage/Makefile +++ b/apps/examples/nximage/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # NuttX NX Graphics Example. -ASRCS = -CSRCS = nximage_main.c nximage_bkgd.c nximage_bitmap.c +ASRCS = +CSRCS = nximage_bkgd.c nximage_bitmap.c +MAINSRC = nximage_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= nximage$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # NXIMAGE built-in application info -APPNAME = nximage -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = nximage +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/nxlines/Makefile b/apps/examples/nxlines/Makefile index 956195daa..bc9e06816 100644 --- a/apps/examples/nxlines/Makefile +++ b/apps/examples/nxlines/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # NuttX NX Graphics Example. -ASRCS = -CSRCS = nxlines_main.c nxlines_bkgd.c +ASRCS = +CSRCS = nxlines_bkgd.c +MAINSRC = nxlines_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= nxlines$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # NXLINES built-in application info -APPNAME = nxlines -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = nxlines +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/nxtext/Makefile b/apps/examples/nxtext/Makefile index 8df34d8fd..f73dd42f2 100644 --- a/apps/examples/nxtext/Makefile +++ b/apps/examples/nxtext/Makefile @@ -39,31 +39,32 @@ include $(APPDIR)/Make.defs # NuttX NX Graphics Example. -ASRCS = -CSRCS = nxtext_main.c nxtext_bkgd.c nxtext_popup.c nxtext_putc.c +ASRCS = +CSRCS = nxtext_bkgd.c nxtext_popup.c nxtext_putc.c +MAINSRC = nxtext_main.c ifeq ($(CONFIG_NX_MULTIUSER),y) -CSRCS += nxtext_server.c +CSRCS += nxtext_server.c endif -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -76,17 +77,17 @@ endif CONFIG_XYZ_PROGNAME ?= nxtext$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # NXTEXT built-in application info -APPNAME = nxtext -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = nxtext +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/ostest/Makefile b/apps/examples/ostest/Makefile index d121c683e..c6712038e 100644 --- a/apps/examples/ostest/Makefile +++ b/apps/examples/ostest/Makefile @@ -39,82 +39,83 @@ include $(APPDIR)/Make.defs # ostest built-in application info -APPNAME = ostest -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = ostest +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # NuttX OS Test -ASRCS = -CSRCS = ostest_main.c dev_null.c restart.c +ASRCS = +CSRCS = dev_null.c restart.c +MAINSRC = ostest_main.c ifeq ($(CONFIG_ARCH_FPU),y) -CSRCS += fpu.c +CSRCS += fpu.c endif ifeq ($(CONFIG_SCHED_WAITPID),y) -CSRCS += waitpid.c +CSRCS += waitpid.c endif ifneq ($(CONFIG_DISABLE_PTHREAD),y) -CSRCS += cancel.c cond.c mutex.c sem.c barrier.c +CSRCS += cancel.c cond.c mutex.c sem.c barrier.c ifneq ($(CONFIG_RR_INTERVAL),0) -CSRCS += roundrobin.c +CSRCS += roundrobin.c endif # CONFIG_RR_INTERVAL ifeq ($(CONFIG_MUTEX_TYPES),y) -CSRCS += rmutex.c +CSRCS += rmutex.c endif # CONFIG_MUTEX_TYPES endif # CONFIG_DISABLE_PTHREAD ifneq ($(CONFIG_DISABLE_SIGNALS),y) -CSRCS += sighand.c +CSRCS += sighand.c ifneq ($(CONFIG_DISABLE_PTHREAD),y) -CSRCS += timedwait.c +CSRCS += timedwait.c endif # CONFIG_DISABLE_PTHREAD endif # CONFIG_DISABLE_SIGNALS ifneq ($(CONFIG_DISABLE_MQUEUE),y) ifneq ($(CONFIG_DISABLE_PTHREAD),y) -CSRCS += mqueue.c timedmqueue.c +CSRCS += mqueue.c timedmqueue.c endif # CONFIG_DISABLE_PTHREAD endif # CONFIG_DISABLE_MQUEUE ifneq ($(CONFIG_DISABLE_POSIX_TIMERS),y) -CSRCS += posixtimer.c +CSRCS += posixtimer.c endif ifeq ($(CONFIG_ARCH_HAVE_VFORK),y) ifeq ($(CONFIG_SCHED_WAITPID),y) -CSRCS += vfork.c +CSRCS += vfork.c endif endif ifneq ($(CONFIG_DISABLE_SIGNALS),y) ifneq ($(CONFIG_DISABLE_PTHREAD),y) ifeq ($(CONFIG_PRIORITY_INHERITANCE),y) -CSRCS += prioinherit.c +CSRCS += prioinherit.c endif # CONFIG_PRIORITY_INHERITANCE endif # CONFIG_DISABLE_PTHREAD endif # CONFIG_DISABLE_SIGNALS -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -127,11 +128,11 @@ endif CONFIG_XYZ_PROGNAME ?= ostest$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/pashello/Makefile b/apps/examples/pashello/Makefile index 13ce7be97..ef9acad22 100644 --- a/apps/examples/pashello/Makefile +++ b/apps/examples/pashello/Makefile @@ -48,7 +48,8 @@ CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" \ "$(APPDIR)$(DELIM)interpreters$(DELIM)pcode$(DELIM)insn$(DELIM)include"} ASRCS = -CSRCS = pashello.c device.c +CSRCS = device.c +MAINSRC = pashello.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/pipe/Makefile b/apps/examples/pipe/Makefile index 0c65902c1..80ab25c27 100644 --- a/apps/examples/pipe/Makefile +++ b/apps/examples/pipe/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # Pipe Example -ASRCS = -CSRCS = pipe_main.c transfer_test.c interlock_test.c redirect_test.c +ASRCS = +CSRCS = transfer_test.c interlock_test.c redirect_test.c +MAINSRC = pipe_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= pipe$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/poll/Makefile b/apps/examples/poll/Makefile index de263d515..a9520255b 100644 --- a/apps/examples/poll/Makefile +++ b/apps/examples/poll/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # Device Driver poll()/select() Example -ASRCS = -CSRCS = poll_main.c poll_listener.c select_listener.c net_listener.c net_reader.c +ASRCS = +CSRCS = poll_listener.c select_listener.c net_listener.c net_reader.c +MAINSRC = poll_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= poll$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/posix_spawn/Makefile b/apps/examples/posix_spawn/Makefile index 186777aeb..43d75885b 100644 --- a/apps/examples/posix_spawn/Makefile +++ b/apps/examples/posix_spawn/Makefile @@ -40,7 +40,8 @@ include $(APPDIR)/Make.defs # ELF Example ASRCS = -CSRCS = spawn_main.c symtab.c +CSRCS = symtab.c +MAINSRC = spawn_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/pwm/Makefile b/apps/examples/pwm/Makefile index c6513db90..318c1d7d0 100644 --- a/apps/examples/pwm/Makefile +++ b/apps/examples/pwm/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # PWM Example. -ASRCS = -CSRCS = pwm_main.c +ASRCS = +CSRCS = +MAINSRC = pwm_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= pwm$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # PWM built-in application info -APPNAME = pwm -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = pwm +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/qencoder/Makefile b/apps/examples/qencoder/Makefile index c590fdb17..77f4e4bc3 100644 --- a/apps/examples/qencoder/Makefile +++ b/apps/examples/qencoder/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # NuttX NX Graphics Example. -ASRCS = -CSRCS = qe_main.c +ASRCS = +CSRCS = +MAINSRC = qe_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= qencoder$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Quadrature Encoder built-in application info -APPNAME = qe -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = qe +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/random/Makefile b/apps/examples/random/Makefile index 49cb92730..527df95b6 100644 --- a/apps/examples/random/Makefile +++ b/apps/examples/random/Makefile @@ -39,31 +39,32 @@ include $(APPDIR)/Make.defs # /dev/random test -APPNAME = rand -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 1024 +APPNAME = rand +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 1024 -ASRCS = -CSRCS = random_main.c +ASRCS = +CSRCS = +MAINSRC = random_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -76,11 +77,11 @@ endif CONFIG_XYZ_PROGNAME ?= random$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/relays/Makefile b/apps/examples/relays/Makefile index b4844e5d8..2574f04bd 100644 --- a/apps/examples/relays/Makefile +++ b/apps/examples/relays/Makefile @@ -40,7 +40,8 @@ include $(APPDIR)/Make.defs # relays Example ASRCS = -CSRCS = relays_main.c +CSRCS = +MAINSRC = relays_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/rgmp/Makefile b/apps/examples/rgmp/Makefile index 23b73b67e..2dda65f3b 100644 --- a/apps/examples/rgmp/Makefile +++ b/apps/examples/rgmp/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # The smallest thing you can build -- the NULL example. -ASRCS = -CSRCS = rgmp_main.c +ASRCS = +CSRCS = +MAINSRC = rgmp_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= rgmp$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/romfs/Makefile b/apps/examples/romfs/Makefile index a9fb891fc..281357d97 100644 --- a/apps/examples/romfs/Makefile +++ b/apps/examples/romfs/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # ROMFS File System Example -ASRCS = -CSRCS = romfs_main.c +ASRCS = +CSRCS = +MAINSRC = romfs_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,14 +73,14 @@ endif CONFIG_XYZ_PROGNAME ?= romfs$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built -.PHONY: checkgenromfs clean depend distclean +.PHONY: checkgenromfs clean depend distclean $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -89,9 +90,9 @@ $(COBJS): %$(OBJEXT): %.c checkgenromfs: @genromfs -h 1>/dev/null 2>&1 || { \ - echo "Host executable genromfs not available in PATH"; \ - echo "You may need to download in from http://romfs.sourceforge.net/"; \ - exit 1; \ + echo "Host executable genromfs not available in PATH"; \ + echo "You may need to download in from http://romfs.sourceforge.net/"; \ + exit 1; \ } testdir : testdir.tar.gz diff --git a/apps/examples/sendmail/Makefile b/apps/examples/sendmail/Makefile index 1e71ec08d..2fd72c959 100644 --- a/apps/examples/sendmail/Makefile +++ b/apps/examples/sendmail/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # Sendmail SMTP Example -ASRCS = -CSRCS = target.c +ASRCS = +CSRCS = +MAINSRC = target.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= sendmail$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/serialblaster/Makefile b/apps/examples/serialblaster/Makefile index d5944283d..bf4acbec5 100644 --- a/apps/examples/serialblaster/Makefile +++ b/apps/examples/serialblaster/Makefile @@ -40,7 +40,8 @@ include $(APPDIR)/Make.defs # For testing: Blast canned characters at a designated serial port ASRCS = -CSRCS = serialblaster_main.c +CSRCS = +MAINSRC = serialblaster_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/serialrx/Makefile b/apps/examples/serialrx/Makefile index 24d17db66..4e97e49a0 100644 --- a/apps/examples/serialrx/Makefile +++ b/apps/examples/serialrx/Makefile @@ -40,7 +40,8 @@ include $(APPDIR)/Make.defs # For testing: Blast canned characters at a designated serial port ASRCS = -CSRCS = serialrx_main.c +CSRCS = +MAINSRC = serialrx_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/serloop/Makefile b/apps/examples/serloop/Makefile index adc77606f..ec945c93e 100644 --- a/apps/examples/serloop/Makefile +++ b/apps/examples/serloop/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # Mindlessly simple console loopack test -ASRCS = -CSRCS = serloop_main.c +ASRCS = +CSRCS = +MAINSRC = serloop_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= serloop$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/slcd/Makefile b/apps/examples/slcd/Makefile index 419b936c4..8d27ca8ec 100644 --- a/apps/examples/slcd/Makefile +++ b/apps/examples/slcd/Makefile @@ -39,33 +39,34 @@ include $(APPDIR)/Make.defs # Hello, World! built-in application info -APPNAME = slcd -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = slcd +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Hello, World! Example -ASRCS = -CSRCS = slcd_main.c +ASRCS = +CSRCS = +MAINSRC = slcd_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -78,11 +79,11 @@ endif CONFIG_XYZ_PROGNAME ?= slcd$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/smart/Makefile b/apps/examples/smart/Makefile index b16aa7827..6916280ed 100644 --- a/apps/examples/smart/Makefile +++ b/apps/examples/smart/Makefile @@ -40,7 +40,8 @@ include $(APPDIR)/Make.defs # SMART file system stress test ASRCS = -CSRCS = smart_main.c +CSRCS = +MAINSRC = smart_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/smart_test/Makefile b/apps/examples/smart_test/Makefile index 58d1d0477..cb63bf4ff 100644 --- a/apps/examples/smart_test/Makefile +++ b/apps/examples/smart_test/Makefile @@ -49,7 +49,8 @@ PRIORITY = SCHED_PRIORITY_DEFAULT STACKSIZE = 4096 ASRCS = -CSRCS = smart_test.c +CSRCS = +MAINSRC = smart_test.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/tcpecho/Makefile b/apps/examples/tcpecho/Makefile index 165efb385..1af312020 100644 --- a/apps/examples/tcpecho/Makefile +++ b/apps/examples/tcpecho/Makefile @@ -42,31 +42,32 @@ include $(APPDIR)/Make.defs # Discover built-in application info -APPNAME = tcpecho -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = tcpecho +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = tcpecho_main.c +ASRCS = +CSRCS = +MAINSRC = tcpecho_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -79,11 +80,11 @@ endif CONFIG_XYZ_PROGNAME ?= tcpecho$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/telnetd/Makefile b/apps/examples/telnetd/Makefile index 7519a9244..74933e709 100644 --- a/apps/examples/telnetd/Makefile +++ b/apps/examples/telnetd/Makefile @@ -37,29 +37,30 @@ -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs -# Hello, World! Example +# Telnetd Example -ASRCS = -CSRCS = telnetd.c +ASRCS = +CSRCS = +MAINSRC = telnetd.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= telnetd$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Buttons built-in application info -APPNAME = telnetd -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = telnetd +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/thttpd/Makefile b/apps/examples/thttpd/Makefile index 2b51a86b9..eb979a7f8 100644 --- a/apps/examples/thttpd/Makefile +++ b/apps/examples/thttpd/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # THTTPD Web Server Example -ASRCS = -CSRCS = thttpd_main.c +ASRCS = +CSRCS = +MAINSRC = thttpd_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= thttpd$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: headers clean depend distclean diff --git a/apps/examples/tiff/Makefile b/apps/examples/tiff/Makefile index 2a23c384e..31cbc9dac 100644 --- a/apps/examples/tiff/Makefile +++ b/apps/examples/tiff/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # TIFF Unit Test -ASRCS = -CSRCS = tiff_main.c +ASRCS = +CSRCS = +MAINSRC = tiff_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= tiff$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # TIFF built-in application info -APPNAME = tiff -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = tiff +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/touchscreen/Makefile b/apps/examples/touchscreen/Makefile index 1a39981e9..e10980aa8 100644 --- a/apps/examples/touchscreen/Makefile +++ b/apps/examples/touchscreen/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # NuttX NX Graphics Example. -ASRCS = -CSRCS = tc_main.c +ASRCS = +CSRCS = +MAINSRC = tc_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= touchscreen$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Touchscreen built-in application info -APPNAME = tc -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = tc +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/udp/Makefile b/apps/examples/udp/Makefile index e56e800a9..360cfd8c2 100644 --- a/apps/examples/udp/Makefile +++ b/apps/examples/udp/Makefile @@ -39,46 +39,52 @@ include $(APPDIR)/Make.defs # UDP Test -TARG_ASRCS = +TARG_ASRCS = -TARG_CSRCS = target.c +TARG_CSRCS = ifeq ($(CONFIG_EXAMPLES_UDP_SERVER),y) -TARG_CSRCS += udp-server.c +TARG_CSRCS += udp-server.c else -TARG_CSRCS += udp-client.c +TARG_CSRCS += udp-client.c endif +TARG_MAINSRC = target.c -TARG_AOBJS = $(TARG_ASRCS:.S=$(OBJEXT)) -TARG_COBJS = $(TARG_CSRCS:.c=$(OBJEXT)) +TARG_AOBJS = $(TARG_ASRCS:.S=$(OBJEXT)) +TARG_COBJS = $(TARG_CSRCS:.c=$(OBJEXT)) +TARG_MAINOBJ = $(TARG_MAINSRC:.c=$(OBJEXT)) -TARG_SRCS = $(TARG_ASRCS) $(TARG_CSRCS) -TARG_OBJS = $(TARG_AOBJS) $(TARG_COBJS) +TARG_SRCS = $(TARG_ASRCS) $(TARG_CSRCS) $(TARG_CSRCS) +TARG_OBJS = $(TARG_AOBJS) $(TARG_COBJS) + +ifneq ($(CONFIG_BUILD_KERNEL),y) + TARG_OBJS += $(TARG_MAINOBJ) +endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - TARG_BIN = ..\..\libapps$(LIBEXT) + TARG_BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - TARG_BIN = ..\\..\\libapps$(LIBEXT) + TARG_BIN = ..\\..\\libapps$(LIBEXT) else - TARG_BIN = ../../libapps$(LIBEXT) + TARG_BIN = ../../libapps$(LIBEXT) endif endif -HOSTCFLAGS += -DCONFIG_EXAMPLES_UDP_HOST=1 +HOSTCFLAGS += -DCONFIG_EXAMPLES_UDP_HOST=1 ifeq ($(CONFIG_EXAMPLES_UDP_SERVER),y) -HOSTCFLAGS += -DCONFIG_EXAMPLES_UDP_SERVER=1 \ - -DCONFIG_EXAMPLES_UDP_SERVERIP="$(CONFIG_EXAMPLES_UDP_SERVERIP)" +HOSTCFLAGS += -DCONFIG_EXAMPLES_UDP_SERVER=1 \ + -DCONFIG_EXAMPLES_UDP_SERVERIP="$(CONFIG_EXAMPLES_UDP_SERVERIP)" endif -HOST_SRCS = host.c +HOST_SRCS = host.c ifeq ($(CONFIG_EXAMPLES_UDP_SERVER),y) -HOST_SRCS += udp-client.c +HOST_SRCS += udp-client.c else -HOST_SRCS += udp-server.c +HOST_SRCS += udp-server.c endif -HOST_OBJS = $(HOST_SRCS:.c=.o) -HOST_BIN = host +HOST_OBJS = $(HOST_SRCS:.c=.o) +HOST_BIN = host ifeq ($(WINTOOL),y) INSTALL_DIR = "${shell cygpath -w $(BIN_DIR)}" @@ -89,14 +95,14 @@ endif CONFIG_XYZ_PROGNAME ?= udp$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built -.PHONY: clean depend distclean +.PHONY: clean depend distclean $(TARG_AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -117,9 +123,10 @@ $(HOST_BIN): $(HOST_OBJS) @touch .built ifeq ($(CONFIG_BUILD_KERNEL),y) -$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) +$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(TARG_MAINOBJ) @echo "LD: $(PROGNAME)" - $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(LDLIBS) + $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(TARG_MAINOBJ) $(LDLIBS) + $(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME) install: $(BIN_DIR)$(DELIM)$(PROGNAME) diff --git a/apps/examples/usbserial/Makefile b/apps/examples/usbserial/Makefile index 25c45547d..811b4e38e 100644 --- a/apps/examples/usbserial/Makefile +++ b/apps/examples/usbserial/Makefile @@ -38,27 +38,28 @@ include $(APPDIR)/Make.defs # USB serial device example -ASRCS = -CSRCS = usbserial_main.c +ASRCS = +CSRCS = +MAINSRC = usbserial_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -71,11 +72,11 @@ endif CONFIG_XYZ_PROGNAME ?= usbserial$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/usbterm/Makefile b/apps/examples/usbterm/Makefile index 51276d203..c9c1add69 100644 --- a/apps/examples/usbterm/Makefile +++ b/apps/examples/usbterm/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # USB terminal example -ASRCS = -CSRCS = usbterm_main.c +ASRCS = +CSRCS = +MAINSRC = usbterm_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= usbterm$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Built-in application info -APPNAME = usbterm -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = usbterm +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/watchdog/Makefile b/apps/examples/watchdog/Makefile index ee0142938..95ad82b48 100644 --- a/apps/examples/watchdog/Makefile +++ b/apps/examples/watchdog/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # Watchdog Timer Example. -ASRCS = -CSRCS = watchdog_main.c +ASRCS = +CSRCS = +MAINSRC = watchdog_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= watchdog$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Touchscreen built-in application info -APPNAME = wdog -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = wdog +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/webserver/Makefile b/apps/examples/webserver/Makefile index 61fcbec1f..bb8702561 100644 --- a/apps/examples/webserver/Makefile +++ b/apps/examples/webserver/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # uIP very tiny web server example -ASRCS = -CSRCS = webserver_main.c cgi.c httpd_fsdata.c +ASRCS = +CSRCS = cgi.c httpd_fsdata.c +MAINSRC = webserver_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= webserver$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/wget/Makefile b/apps/examples/wget/Makefile index 3af7eb352..fd98c4610 100644 --- a/apps/examples/wget/Makefile +++ b/apps/examples/wget/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # wget webclient example -ASRCS = -CSRCS = target.c +ASRCS = +CSRCS = +MAINSRC = target.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,11 +73,11 @@ endif CONFIG_XYZ_PROGNAME ?= wget$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/wgetjson/Makefile b/apps/examples/wgetjson/Makefile index a0d613b2d..a0e2989be 100644 --- a/apps/examples/wgetjson/Makefile +++ b/apps/examples/wgetjson/Makefile @@ -39,27 +39,28 @@ include $(APPDIR)/Make.defs # Hello, World! Example -ASRCS = -CSRCS = wgetjson_main.c +ASRCS = +CSRCS = +MAINSRC = wgetjson_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -72,17 +73,17 @@ endif CONFIG_XYZ_PROGNAME ?= wgetjson$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Buttons built-in application info -APPNAME = wgetjson -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = wgetjson +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/xmlrpc/Makefile b/apps/examples/xmlrpc/Makefile index ec4e0c1a6..4c591c328 100644 --- a/apps/examples/xmlrpc/Makefile +++ b/apps/examples/xmlrpc/Makefile @@ -42,31 +42,32 @@ include $(APPDIR)/Make.defs # XML RPC built-in application info -APPNAME = xmlrpc -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +APPNAME = xmlrpc +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = xmlrpc_main.c calls.c +ASRCS = +CSRCS = calls.c +MAINSRC = xmlrpc_main.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif @@ -79,11 +80,11 @@ endif CONFIG_XYZ_PROGNAME ?= xmlrpc$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean |