3 # Copyright (C) 2000 by Lineo, inc.
5 # This program is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU Library General Public License as published by the Free
7 # Software Foundation; either version 2 of the License, or (at your option) any
10 # This program is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
15 # You should have received a copy of the GNU Library General Public License
16 # along with this program; if not, write to the Free Software Foundation, Inc.,
17 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 # Derived in part from the Linux-8086 C library, the GNU C Library, and several
20 # other sundry sources. Files within this library are copyright by their
21 # respective copyright holders.
25 include $(TOPDIR)/ldso/Rules.mak
29 LIBDL_SHARED_FULLNAME=libdl-$(MAJOR_VERSION).$(MINOR_VERSION).so
30 TARGET_CC= $(TOPDIR)extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc
33 OBJS=$(patsubst %.c,%.o, $(CSRC))
35 CFLAGS += -DUSE_CACHE #-fPIC -D__PIC__ #-funroll-loops
37 all: $(OBJS) $(LIBDL) shared
42 $(AR) $(ARFLAGS) $(LIBDL) $(OBJS)
43 #install -d $(TOPDIR)lib
44 #rm -f $(TOPDIR)lib/$(LIBDL)
45 #install -m 644 $(LIBDL) $(TOPDIR)lib
48 $(TARGET_CC) -I../d-link -I../d-link/$(TARGET_ARCH) $(CFLAGS) -c $< -o $@
49 $(STRIPTOOL) -x -R .note -R .comment $*.o
54 $(TARGET_CC) $(LDFLAGS) -shared -o $(LIBDL_SHARED_FULLNAME) \
55 -Wl,-soname,$(LIBDL_SHARED).$(MAJOR_VERSION) -Wl,--whole-archive \
56 $(LIBDL) $(TOPDIR)lib/$(SHARED_FULLNAME)
57 install -d $(TOPDIR)lib
58 rm -f $(TOPDIR)lib/$(LIBDL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBDL_SHARED).$(MAJOR_VERSION)
59 install -m 644 $(LIBDL_SHARED_FULLNAME) $(TOPDIR)lib;
60 (cd $(TOPDIR)lib; ln -sf $(LIBDL_SHARED_FULLNAME) $(LIBDL_SHARED));
61 (cd $(TOPDIR)lib; ln -sf $(LIBDL_SHARED_FULLNAME) $(LIBDL_SHARED).$(MAJOR_VERSION));
64 $(RM) -f .depend $(LIBDL_SHARED)* $(LIBDL_SHARED_FULLNAME) core *.o *.a *.s *.i tmp_make foo *~