Provide library names and paths in apps/import/Make.defs
This commit is contained in:
parent
60d1c63803
commit
5cd3325f7e
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -149,6 +149,7 @@ endef
|
||||
endif
|
||||
|
||||
# Tool related definitions
|
||||
# Compiler
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
# Windows-native toolchains
|
||||
@ -166,5 +167,19 @@ CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
|
||||
# C Pre-processor
|
||||
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
# Linker
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
# Windows-native toolchains
|
||||
LDLIBPATH = -L "${shell cygpath -w ${APPDIR}}" -L "${shell cygpath -w $(TOPDIR)$(DELIM)libs}"
|
||||
else
|
||||
# Linux/Cygwin-native toolchain
|
||||
LDLIBPATH = -L ${APPDIR} -L $(TOPDIR)$(DELIM)libs
|
||||
endif
|
||||
|
||||
LDLIBS = -lnuttx
|
||||
|
Loading…
Reference in New Issue
Block a user