summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/i386/Makefile
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-01-15 13:31:18 +0000
committerEric Andersen <andersen@codepoet.org>2001-01-15 13:31:18 +0000
commita4258c4f7ed6293f6557b34d5b21138ef43ba901 (patch)
tree3691a527cf938c5d1e01fb85f664f26a627255e0 /libc/sysdeps/linux/i386/Makefile
parent0a3e7b0f16865e89a8ee8dc1761e2658338559f8 (diff)
Use the name crt0.o, and cp it to $(TOPDIR)/libcrt0.o
Diffstat (limited to 'libc/sysdeps/linux/i386/Makefile')
-rw-r--r--libc/sysdeps/linux/i386/Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/i386/Makefile b/libc/sysdeps/linux/i386/Makefile
index 9c487bfd1..a6b185c21 100644
--- a/libc/sysdeps/linux/i386/Makefile
+++ b/libc/sysdeps/linux/i386/Makefile
@@ -25,7 +25,10 @@ include $(TOPDIR)Rules.mak
LIBC=$(TOPDIR)libc.a
ASFLAGS=$(CFLAGS)
-SSRC=_start.S longjmp.S setjmp.S #_start.S #clone.S
+CRT0=crt0.S
+CRT0_OBJ=$(patsubst %.S,%.o, $(CRT0))
+
+SSRC=longjmp.S setjmp.S #_start.S #clone.S
ifeq ($(UNIFIED_SYSCALL),true)
SSRC += __uClibc_syscall.S
endif
@@ -37,13 +40,18 @@ COBJS=$(patsubst %.c,%.o, $(CSRC))
OBJS=$(SOBJS) $(COBJS)
-all: $(OBJS) $(LIBC)
+all: $(OBJS) $(CRT0_OBJ) $(LIBC)
$(LIBC): ar-target
ar-target: $(OBJS)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
+$(CRT0_OBJ): %.o : %.S
+ $(CC) $(CFLAGS) -c $< -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $*.o
+ cp $*.o $(TOPDIR)/libcrt0.o
+
$(SOBJS): %.o : %.S
$(CC) $(CFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o