]> Git Repo - uclibc-ng.git/blob - ldso/util/Makefile
Some more soft float fixes... for arm in particular (libfloat).
[uclibc-ng.git] / ldso / util / Makefile
1 # Makefile for uClibc
2 #
3 # Copyright (C) 2000,2001 Erik Andersen <[email protected]>
4 #
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
8 # later version.
9 #
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
13 # details.
14 #
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
18 #
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.
22
23 TOPDIR=../../
24 include $(TOPDIR)Rules.mak
25 TARGET_CC = $(TOPDIR)extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc
26
27 TARGETS = ldd ldconfig
28 ifeq ($(OSTYPE),linux)
29 TARGETS += readelf
30 endif
31 #ifneq ($(strip $(LIBRARY_CACHE)),)
32 #TARGETS += ldconfig
33 #endif
34
35 ifeq ($(strip $(LDSO_LDD_SUPPORT)),y)
36 XXFLAGS = -D__LDSO_LDD_SUPPORT
37 endif
38
39 all:    $(TARGETS)
40
41 headers:
42         $(LN) -fs $(TOPDIR)include/elf.h
43
44 readelf:        readelf.c
45         $(HOSTCC) $(HOSTCFLAGS) -I. -I../include $^ -o $@
46         strip -x -R .note -R .comment $@
47
48 readelf.target: readelf.c
49         $(TARGET_CC) $(CFLAGS) -Wl,-s $^ -o $@ $(LDADD_LIBFLOAT)
50         $(STRIPTOOL) -x -R .note -R .comment $@
51
52 readsoname.o:   readsoname.c readsoname2.c
53         $(HOSTCC) $(HOSTCFLAGS) -I. -I../include -c $< -o $@
54         strip -x -R .note -R .comment $*.o
55
56 #ldconfig.o:    ldconfig.c
57 #       $(HOSTCC) $(HOSTCFLAGS) -I. -I../include \
58 #               -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" -c $< -o $@
59 #       strip -x -R .note -R .comment $*.o
60
61 #ldconfig:      ldconfig.o readsoname.o
62 #       $(HOSTCC) $(HOSTCFLAGS) $^ -o $@
63 #       strip -x -R .note -R .comment $@
64
65 ldconfig:       ldconfig.c readsoname.c
66         $(HOSTCC) $(HOSTCFLAGS) $(XXFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \
67                 -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \
68                 -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \
69                 -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" -I. -I../include \
70                 $^ -o $@
71         strip -x -R .note -R .comment $@
72
73 ldconfig.target:        ldconfig.c readsoname.c
74         $(TARGET_CC) $(CFLAGS) $(XXFLAGS) -Wl,-s -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \
75                 -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \
76                 -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \
77                 -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" -I. -I../include \
78                 $^ -o $@ $(LDADD_LIBFLOAT)
79         $(STRIPTOOL) -x -R .note -R .comment $@
80
81 ldd:    ldd.c
82         $(HOSTCC) $(HOSTCFLAGS) $(XXFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \
83                 -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \
84                 -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \
85                 -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" -I. -I../include \
86                 $^ -o $@
87         strip -x -R .note -R .comment $@
88
89 ldd.target:     ldd.c
90         $(TARGET_CC) $(CFLAGS) $(XXFLAGS) -Wl,-s -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \
91                 -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \
92                 -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \
93                 -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \
94                 $^ -o $@ $(LDADD_LIBFLOAT)
95         $(STRIPTOOL) -x -R .note -R .comment $@
96
97 clean:
98         $(RM) $(TARGETS) *.o *~ core *.target elf.h
99
100 readelf.c readsoname.c ldconfig.c ldd.c:        headers
This page took 0.026103 seconds and 4 git commands to generate.