summaryrefslogtreecommitdiff
path: root/apps/examples
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-05 13:59:20 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-05 13:59:20 -0600
commit294d526ed22c1aafa8b419f51632f31a673657aa (patch)
treefa22364c86bce9c8bc3c2e592d1d34ebed294fbe /apps/examples
parent59c6dda4d3d206130ca23542e2b812724196986c (diff)
downloadnuttx-294d526ed22c1aafa8b419f51632f31a673657aa.tar.gz
nuttx-294d526ed22c1aafa8b419f51632f31a673657aa.tar.bz2
nuttx-294d526ed22c1aafa8b419f51632f31a673657aa.zip
Provide library names and paths in apps/import/Make.defs
Diffstat (limited to 'apps/examples')
-rw-r--r--apps/examples/elf/tests/errno/Makefile14
-rw-r--r--apps/examples/elf/tests/hello/Makefile14
-rw-r--r--apps/examples/elf/tests/helloxx/Makefile28
-rw-r--r--apps/examples/elf/tests/longjmp/Makefile14
-rw-r--r--apps/examples/elf/tests/mutex/Makefile14
-rw-r--r--apps/examples/elf/tests/pthread/Makefile14
-rw-r--r--apps/examples/elf/tests/signal/Makefile14
-rw-r--r--apps/examples/elf/tests/struct/Makefile14
-rw-r--r--apps/examples/elf/tests/task/Makefile14
9 files changed, 61 insertions, 79 deletions
diff --git a/apps/examples/elf/tests/errno/Makefile b/apps/examples/elf/tests/errno/Makefile
index d0f6f8256..b9029e163 100644
--- a/apps/examples/elf/tests/errno/Makefile
+++ b/apps/examples/elf/tests/errno/Makefile
@@ -41,28 +41,26 @@ else
NUTTXLIB = "$(TOPDIR)$(DELIM)lib"
endif
-LIBPATH =
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
else
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
endif
endif
-LIBS =
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-LIBS += -luc
+LDLIBS += -luc
else
-LIBS += -lc
+LDLIBS += -lc
endif
endif
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
-LIBS += -lproxies
+LDLIBS += -lproxies
endif
BIN = errno
@@ -78,7 +76,7 @@ $(OBJS): %.o: %.c
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))
diff --git a/apps/examples/elf/tests/hello/Makefile b/apps/examples/elf/tests/hello/Makefile
index bcb227979..2fb1fdce4 100644
--- a/apps/examples/elf/tests/hello/Makefile
+++ b/apps/examples/elf/tests/hello/Makefile
@@ -41,28 +41,26 @@ else
NUTTXLIB = "$(TOPDIR)$(DELIM)lib"
endif
-LIBPATH =
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
else
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
endif
endif
-LIBS =
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-LIBS += -luc
+LDLIBS += -luc
else
-LIBS += -lc
+LDLIBS += -lc
endif
endif
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
-LIBS += -lproxies
+LDLIBS += -lproxies
endif
BIN = hello
@@ -78,7 +76,7 @@ $(OBJS): %.o: %.c
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))
diff --git a/apps/examples/elf/tests/helloxx/Makefile b/apps/examples/elf/tests/helloxx/Makefile
index 8882e21a5..f16ef7e6f 100644
--- a/apps/examples/elf/tests/helloxx/Makefile
+++ b/apps/examples/elf/tests/helloxx/Makefile
@@ -41,28 +41,26 @@ else
NUTTXLIB = "$(TOPDIR)$(DELIM)lib"
endif
-LIBPATH =
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
else
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
endif
endif
-LIBS =
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-LIBS += -luc
+LDLIBS += -luc
else
-LIBS += -lc
+LDLIBS += -lc
endif
endif
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
-LIBS += -lproxies
+LDLIBS += -lproxies
endif
BIN1 = hello++1
@@ -90,8 +88,8 @@ endif
SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4)
OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4)
-LIBSTDC_STUBS_DIR = $(TOPDIR)/libxx
-LIBSTDC_STUBS_LIB = $(LIBSTDC_STUBS_DIR)/liblibxx.a
+LDLIBSTDC_STUBS_DIR = $(TOPDIR)/libxx
+LDLIBSTDC_STUBS_LIB = $(LDLIBSTDC_STUBS_DIR)/liblibxx.a
all: $(BIN1) $(BIN2) $(BIN3) $(BIN4)
@@ -102,8 +100,8 @@ $(OBJS): %.o: %.cpp
# This contains libstdc++ stubs to that you can build C++ code
# without actually having libstdc++
-$(LIBSTDC_STUBS_LIB):
- $(Q) $(MAKE) -C $(LIBSTDC_STUBS_DIR) TOPDIR=$(TOPDIR)
+$(LDLIBSTDC_STUBS_LIB):
+ $(Q) $(MAKE) -C $(LDLIBSTDC_STUBS_DIR) TOPDIR=$(TOPDIR)
# BIN1 and BIN2 link just like C code because they contain no
# static constructors. BIN1 is equivalent to a C hello world;
@@ -112,18 +110,18 @@ $(LIBSTDC_STUBS_LIB):
$(BIN1): $(OBJS1)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
$(BIN2): $(OBJS2)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
# BIN3 is equivalent to BIN2 except that is uses static initializers
ifeq ($(CONFIG_BINFMT_CONSTRUCTORS),y)
$(BIN3): $(OBJS3)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
endif
# BIN4 is similar to BIN3 except that it uses the streams code from libstdc++
@@ -132,7 +130,7 @@ endif
#
#$(BIN4): $(OBJS4)
# @echo "LD: $<"
-# $(Q) $(LD) $(LDELFFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
+# $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN1))
diff --git a/apps/examples/elf/tests/longjmp/Makefile b/apps/examples/elf/tests/longjmp/Makefile
index 802d84df1..9cc3a9922 100644
--- a/apps/examples/elf/tests/longjmp/Makefile
+++ b/apps/examples/elf/tests/longjmp/Makefile
@@ -41,28 +41,26 @@ else
NUTTXLIB = "$(TOPDIR)$(DELIM)lib"
endif
-LIBPATH =
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
else
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
endif
endif
-LIBS =
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-LIBS += -luc
+LDLIBS += -luc
else
-LIBS += -lc
+LDLIBS += -lc
endif
endif
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
-LIBS += -lproxies
+LDLIBS += -lproxies
endif
BIN = longjmp
@@ -78,7 +76,7 @@ $(OBJS): %.o: %.c
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))
diff --git a/apps/examples/elf/tests/mutex/Makefile b/apps/examples/elf/tests/mutex/Makefile
index 197bb41a9..d7ce09041 100644
--- a/apps/examples/elf/tests/mutex/Makefile
+++ b/apps/examples/elf/tests/mutex/Makefile
@@ -41,28 +41,26 @@ else
NUTTXLIB = "$(TOPDIR)$(DELIM)lib"
endif
-LIBPATH =
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
else
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
endif
endif
-LIBS =
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-LIBS += -luc
+LDLIBS += -luc
else
-LIBS += -lc
+LDLIBS += -lc
endif
endif
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
-LIBS += -lproxies
+LDLIBS += -lproxies
endif
BIN = mutex
@@ -78,7 +76,7 @@ $(OBJS): %.o: %.c
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))
diff --git a/apps/examples/elf/tests/pthread/Makefile b/apps/examples/elf/tests/pthread/Makefile
index 0aa524506..0b34c8f8a 100644
--- a/apps/examples/elf/tests/pthread/Makefile
+++ b/apps/examples/elf/tests/pthread/Makefile
@@ -41,28 +41,26 @@ else
NUTTXLIB = "$(TOPDIR)$(DELIM)lib"
endif
-LIBPATH =
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
else
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
endif
endif
-LIBS =
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-LIBS += -luc
+LDLIBS += -luc
else
-LIBS += -lc
+LDLIBS += -lc
endif
endif
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
-LIBS += -lproxies
+LDLIBS += -lproxies
endif
BIN = pthread
@@ -78,7 +76,7 @@ $(OBJS): %.o: %.c
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))
diff --git a/apps/examples/elf/tests/signal/Makefile b/apps/examples/elf/tests/signal/Makefile
index 80b843e32..93f7bc183 100644
--- a/apps/examples/elf/tests/signal/Makefile
+++ b/apps/examples/elf/tests/signal/Makefile
@@ -41,28 +41,26 @@ else
NUTTXLIB = "$(TOPDIR)$(DELIM)lib"
endif
-LIBPATH =
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
else
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
endif
endif
-LIBS =
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-LIBS += -luc
+LDLIBS += -luc
else
-LIBS += -lc
+LDLIBS += -lc
endif
endif
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
-LIBS += -lproxies
+LDLIBS += -lproxies
endif
BIN = signal
@@ -78,7 +76,7 @@ $(OBJS): %.o: %.c
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))
diff --git a/apps/examples/elf/tests/struct/Makefile b/apps/examples/elf/tests/struct/Makefile
index 27595dfaa..4dec5e51e 100644
--- a/apps/examples/elf/tests/struct/Makefile
+++ b/apps/examples/elf/tests/struct/Makefile
@@ -43,28 +43,26 @@ else
NUTTXLIB = "$(TOPDIR)$(DELIM)lib"
endif
-LIBPATH =
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
else
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
endif
endif
-LIBS =
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-LIBS += -luc
+LDLIBS += -luc
else
-LIBS += -lc
+LDLIBS += -lc
endif
endif
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
-LIBS += -lproxies
+LDLIBS += -lproxies
endif
BIN = struct
@@ -79,7 +77,7 @@ $(OBJS): %.o: %.c
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))
diff --git a/apps/examples/elf/tests/task/Makefile b/apps/examples/elf/tests/task/Makefile
index 6a93da9e3..13d07e18a 100644
--- a/apps/examples/elf/tests/task/Makefile
+++ b/apps/examples/elf/tests/task/Makefile
@@ -41,28 +41,26 @@ else
NUTTXLIB = "$(TOPDIR)$(DELIM)lib"
endif
-LIBPATH =
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
else
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
LDELFFLAGS += -Bstatic
-LIBPATH += -L $(NUTTXLIB)
+LDLIBPATH += -L $(NUTTXLIB)
endif
endif
-LIBS =
ifeq ($(CONFIG_EXAMPLES_ELF_LIBC),y)
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-LIBS += -luc
+LDLIBS += -luc
else
-LIBS += -lc
+LDLIBS += -lc
endif
endif
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
-LIBS += -lproxies
+LDLIBS += -lproxies
endif
BIN = task
@@ -78,7 +76,7 @@ $(OBJS): %.o: %.c
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))