summaryrefslogtreecommitdiff
path: root/apps/examples/elf
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-05 16:05:29 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-05 16:05:29 -0600
commit2dc9308e9154086f30ad320f67be5bf6ecbd310b (patch)
tree02d2f3b453d54e3f9ed5e9dbf6e6b084d02eca1f /apps/examples/elf
parent5c571020f21f0127929621ed1c7afc290f1d5077 (diff)
downloadnuttx-2dc9308e9154086f30ad320f67be5bf6ecbd310b.tar.gz
nuttx-2dc9308e9154086f30ad320f67be5bf6ecbd310b.tar.bz2
nuttx-2dc9308e9154086f30ad320f67be5bf6ecbd310b.zip
Need to add CRT0 to every Makefile in apps/examples/tests
Diffstat (limited to 'apps/examples/elf')
-rw-r--r--apps/examples/elf/tests/errno/Makefile7
-rw-r--r--apps/examples/elf/tests/hello/Makefile6
-rw-r--r--apps/examples/elf/tests/helloxx/Makefile18
-rw-r--r--apps/examples/elf/tests/longjmp/Makefile6
-rw-r--r--apps/examples/elf/tests/mutex/Makefile6
-rw-r--r--apps/examples/elf/tests/pthread/Makefile6
-rw-r--r--apps/examples/elf/tests/signal/Makefile6
-rw-r--r--apps/examples/elf/tests/struct/Makefile6
-rw-r--r--apps/examples/elf/tests/task/Makefile6
9 files changed, 33 insertions, 34 deletions
diff --git a/apps/examples/elf/tests/errno/Makefile b/apps/examples/elf/tests/errno/Makefile
index b9029e163..89e3f2bfd 100644
--- a/apps/examples/elf/tests/errno/Makefile
+++ b/apps/examples/elf/tests/errno/Makefile
@@ -66,17 +66,17 @@ endif
BIN = errno
SRCS = $(BIN).c
-OBJS = $(SRCS:.c=.o)
+OBJS = $(SRCS:.c=$(OBJEXT))
all: $(BIN)
-$(OBJS): %.o: %.c
+$(OBJS): %$(OBJEXT): %.c
@echo "CC: $<"
$(Q) $(CC) -c $(CELFFLAGS) $< -o $@
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))
@@ -85,4 +85,3 @@ clean:
install:
$(Q) mkdir -p $(ROMFS_DIR)
$(Q) install $(BIN) $(ROMFS_DIR)/$(BIN)
-
diff --git a/apps/examples/elf/tests/hello/Makefile b/apps/examples/elf/tests/hello/Makefile
index 2fb1fdce4..f89759a66 100644
--- a/apps/examples/elf/tests/hello/Makefile
+++ b/apps/examples/elf/tests/hello/Makefile
@@ -66,17 +66,17 @@ endif
BIN = hello
SRCS = $(BIN).c
-OBJS = $(SRCS:.c=.o)
+OBJS = $(SRCS:.c=$(OBJEXT))
all: $(BIN)
-$(OBJS): %.o: %.c
+$(OBJS): %$(OBJEXT): %.c
@echo "CC: $<"
$(Q) $(CC) -c $(CELFFLAGS) $< -o $@
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))
diff --git a/apps/examples/elf/tests/helloxx/Makefile b/apps/examples/elf/tests/helloxx/Makefile
index f16ef7e6f..cd153bd52 100644
--- a/apps/examples/elf/tests/helloxx/Makefile
+++ b/apps/examples/elf/tests/helloxx/Makefile
@@ -72,18 +72,18 @@ endif
ALL_BIN = $(BIN1) $(BIN2) $(BIN3) $(BIN4)
SRCS1 = $(BIN1).c
-OBJS1 = $(SRCS1:.c=.o)
+OBJS1 = $(SRCS1:.c=$(OBJEXT))
SRCS2 = $(BIN2).c
-OBJS2 = $(SRCS2:.c=.o)
+OBJS2 = $(SRCS2:.c=$(OBJEXT))
ifeq ($(CONFIG_BINFMT_CONSTRUCTORS),y)
SRCS3 = $(BIN3).c
-OBJS3 = $(SRCS3:.c=.o)
+OBJS3 = $(SRCS3:.c=$(OBJEXT))
endif
#SRCS4 = $(BIN4).c
-#OBJS4 = $(SRCS4:.c=.o)
+#OBJS4 = $(SRCS4:.c=$(OBJEXT))
SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4)
OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4)
@@ -93,7 +93,7 @@ LDLIBSTDC_STUBS_LIB = $(LDLIBSTDC_STUBS_DIR)/liblibxx.a
all: $(BIN1) $(BIN2) $(BIN3) $(BIN4)
-$(OBJS): %.o: %.cpp
+$(OBJS): %$(OBJEXT): %.cpp
@echo "CC: $<"
$(Q) $(CXX) -c $(CXXELFFLAGS) $< -o $@
@@ -110,18 +110,18 @@ $(LDLIBSTDC_STUBS_LIB):
$(BIN1): $(OBJS1)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
$(BIN2): $(OBJS2)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
# BIN3 is equivalent to BIN2 except that is uses static initializers
ifeq ($(CONFIG_BINFMT_CONSTRUCTORS),y)
$(BIN3): $(OBJS3)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
endif
# BIN4 is similar to BIN3 except that it uses the streams code from libstdc++
@@ -130,7 +130,7 @@ endif
#
#$(BIN4): $(OBJS4)
# @echo "LD: $<"
-# $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
+# $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN1))
diff --git a/apps/examples/elf/tests/longjmp/Makefile b/apps/examples/elf/tests/longjmp/Makefile
index 9cc3a9922..26fa393bd 100644
--- a/apps/examples/elf/tests/longjmp/Makefile
+++ b/apps/examples/elf/tests/longjmp/Makefile
@@ -66,17 +66,17 @@ endif
BIN = longjmp
SRCS = $(BIN).c
-OBJS = $(SRCS:.c=.o)
+OBJS = $(SRCS:.c=$(OBJEXT))
all: $(BIN)
-$(OBJS): %.o: %.c
+$(OBJS): %$(OBJEXT): %.c
@echo "CC: $<"
$(Q) $(CC) -c $(CELFFLAGS) $< -o $@
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))
diff --git a/apps/examples/elf/tests/mutex/Makefile b/apps/examples/elf/tests/mutex/Makefile
index d7ce09041..f8ce4f613 100644
--- a/apps/examples/elf/tests/mutex/Makefile
+++ b/apps/examples/elf/tests/mutex/Makefile
@@ -66,17 +66,17 @@ endif
BIN = mutex
SRCS = $(BIN).c
-OBJS = $(SRCS:.c=.o)
+OBJS = $(SRCS:.c=$(OBJEXT))
all: $(BIN)
-$(OBJS): %.o: %.c
+$(OBJS): %$(OBJEXT): %.c
@echo "CC: $<"
$(Q) $(CC) -c $(CELFFLAGS) $< -o $@
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))
diff --git a/apps/examples/elf/tests/pthread/Makefile b/apps/examples/elf/tests/pthread/Makefile
index 0b34c8f8a..9d4ce496b 100644
--- a/apps/examples/elf/tests/pthread/Makefile
+++ b/apps/examples/elf/tests/pthread/Makefile
@@ -66,17 +66,17 @@ endif
BIN = pthread
SRCS = $(BIN).c
-OBJS = $(SRCS:.c=.o)
+OBJS = $(SRCS:.c=$(OBJEXT))
all: $(BIN)
-$(OBJS): %.o: %.c
+$(OBJS): %$(OBJEXT): %.c
@echo "CC: $<"
$(Q) $(CC) -c $(CELFFLAGS) $< -o $@
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))
diff --git a/apps/examples/elf/tests/signal/Makefile b/apps/examples/elf/tests/signal/Makefile
index 93f7bc183..c442ae9c6 100644
--- a/apps/examples/elf/tests/signal/Makefile
+++ b/apps/examples/elf/tests/signal/Makefile
@@ -66,17 +66,17 @@ endif
BIN = signal
SRCS = $(BIN).c
-OBJS = $(SRCS:.c=.o)
+OBJS = $(SRCS:.c=$(OBJEXT))
all: $(BIN)
-$(OBJS): %.o: %.c
+$(OBJS): %$(OBJEXT): %.c
@echo "CC: $<"
$(Q) $(CC) -c $(CELFFLAGS) $< -o $@
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))
diff --git a/apps/examples/elf/tests/struct/Makefile b/apps/examples/elf/tests/struct/Makefile
index 4dec5e51e..8fe7cf710 100644
--- a/apps/examples/elf/tests/struct/Makefile
+++ b/apps/examples/elf/tests/struct/Makefile
@@ -67,17 +67,17 @@ endif
BIN = struct
SRCS = struct_main.c struct_dummy.c
-OBJS = $(SRCS:.c=.o)
+OBJS = $(SRCS:.c=$(OBJEXT))
all: $(BIN)
-$(OBJS): %.o: %.c
+$(OBJS): %$(OBJEXT): %.c
@echo "CC: $<"
$(Q) $(CC) -c $(CELFFLAGS) $< -o $@
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))
diff --git a/apps/examples/elf/tests/task/Makefile b/apps/examples/elf/tests/task/Makefile
index 13d07e18a..572d1072e 100644
--- a/apps/examples/elf/tests/task/Makefile
+++ b/apps/examples/elf/tests/task/Makefile
@@ -66,17 +66,17 @@ endif
BIN = task
SRCS = $(BIN).c
-OBJS = $(SRCS:.c=.o)
+OBJS = $(SRCS:.c=$(OBJEXT))
all: $(BIN)
-$(OBJS): %.o: %.c
+$(OBJS): %$(OBJEXT): %.c
@echo "CC: $<"
$(Q) $(CC) -c $(CELFFLAGS) $< -o $@
$(BIN): $(OBJS)
@echo "LD: $<"
- $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
+ $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
clean:
$(call DELFILE, $(BIN))