diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-09-05 13:59:20 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-09-05 13:59:20 -0600 |
commit | 294d526ed22c1aafa8b419f51632f31a673657aa (patch) | |
tree | fa22364c86bce9c8bc3c2e592d1d34ebed294fbe /apps/examples/elf/tests/helloxx | |
parent | 59c6dda4d3d206130ca23542e2b812724196986c (diff) | |
download | nuttx-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/elf/tests/helloxx')
-rw-r--r-- | apps/examples/elf/tests/helloxx/Makefile | 28 |
1 files changed, 13 insertions, 15 deletions
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)) |