OSDN Git Service

Yet another large update to ld.so. In this iteration I finally got
[uclinux-h8/uClibc.git] / ldso / ldso / Makefile
1 TOPDIR=../../
2 include $(TOPDIR)/ld.so-1/Rules.mak
3
4 CFLAGS += -DUSE_CACHE -fPIC -D__PIC__ #-funroll-loops
5
6 CSRC= boot1.c hash.c readelflib1.c vsprintf.c $(TARGET_ARCH)/elfinterp.c
7 COBJS=$(patsubst %.c,%.o, $(CSRC))
8 ASRC=$(shell ls $(TARGET_ARCH)/*.S)
9 AOBJS=$(patsubst %.S,%.o, $(ASRC))
10 OBJS=$(AOBJS) $(COBJS)
11
12 ELF_LDFLAGS=--shared # using GNU ld
13
14 all: lib
15
16 lib:: $(OBJS) $(DLINK_OBJS)
17         $(LD) -e _dl_boot $(ELF_LDFLAGS) -o $(DLINKER).$(LDSO_VMAJOR) \
18           -soname $(DLINKER).$(LDSO_VMAJOR) $(OBJS)
19
20 $(COBJS): %.o : %.c
21         $(CC) -I. -I./$(TARGET_ARCH) -I../libdl $(CFLAGS) -c $< -o $@
22         $(STRIPTOOL) -x -R .note -R .comment $*.o
23
24 realclean::
25         $(RM) -f .depend $(DLINKER) core *.o *.a *.s *.i tmp_make foo *~
26
27 clean::
28         $(RM) -f $(DLINKER)* $(OBJS) core *.o *.a *.s *.i tmp_make foo *~
29