]>
Commit | Line | Data |
---|---|---|
5a653498 EA |
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 | ||
66f269d2 | 23 | TOPDIR=../../ |
2a115f6c | 24 | include $(TOPDIR)Rules.mak |
66f269d2 | 25 | |
c872d905 EA |
26 | TARGETS=ldd.uclibc ldd readelf ldconfig |
27 | all: $(TARGETS) | |
66f269d2 | 28 | |
2a115f6c | 29 | readsoname.o: readsoname.c readsoname2.c |
d7147f92 | 30 | $(CC) $(CFLAGS) -c $< -o $@ |
66f269d2 | 31 | $(STRIPTOOL) -x -R .note -R .comment $*.o |
b5675ab4 | 32 | |
2a115f6c | 33 | ldconfig.o: ldconfig.c |
d7147f92 | 34 | $(CC) $(CFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ |
b5675ab4 | 35 | -c $< -o $@ |
2a115f6c EA |
36 | $(STRIPTOOL) -x -R .note -R .comment $*.o |
37 | ||
38 | readelf: readelf.c | |
d7147f92 | 39 | $(CC) $(CFLAGS) -static readelf.c -o $@ |
b5675ab4 | 40 | $(STRIPTOOL) -x -R .note -R .comment $@ |
66f269d2 | 41 | |
c3bbc0ea EA |
42 | ifeq ($(strip $(LIBRARY_CACHE)),) |
43 | ldconfig: | |
44 | echo "LIBRARY_CACHE disabled -- not building ldconfig" | |
45 | else | |
f68eb8d5 | 46 | ldconfig: ldconfig.o readsoname.o |
d7147f92 | 47 | $(CC) $(CFLAGS) -static $^ -o $@ |
b5675ab4 | 48 | $(STRIPTOOL) -x -R .note -R .comment $@ |
c3bbc0ea | 49 | endif |
f68eb8d5 | 50 | |
b5675ab4 | 51 | ldd: ldd.c |
d7147f92 | 52 | $(CC) $(CFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ |
df6add62 | 53 | -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ |
4643b181 | 54 | -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \ |
c3bbc0ea | 55 | -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \ |
b5675ab4 EA |
56 | -static ldd.c -o $@ |
57 | $(STRIPTOOL) -x -R .note -R .comment $@ | |
66f269d2 | 58 | |
c872d905 | 59 | ldd.uclibc: ldd.c |
f1429771 | 60 | $(NATIVE_CC) $(NATIVE_CFLAGS) -s -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ |
c872d905 EA |
61 | -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ |
62 | -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \ | |
63 | -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \ | |
64 | ldd.c -o $@ | |
c872d905 | 65 | |
66f269d2 | 66 | clean: |
c872d905 | 67 | rm -f $(TARGETS) *.o *~ core |
66f269d2 | 68 |