OSDN Git Service

Fix regex support to be compatible with 4.2 BSD regex library. This is
[uclinux-h8/uClibc.git] / Rules.mak
index 887933d..e26a75a 100644 (file)
--- a/Rules.mak
+++ b/Rules.mak
 
 include $(TOPDIR)Config
 
+MAJOR_VERSION=0
+MINOR_VERSION=9.5
+
+LIBNAME=libc.a
+SHARED_FULLNAME=libuClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so
+SHARED_MAJORNAME=libc.so.$(MAJOR_VERSION)
+UCLIBC_LDSO=ld-uclibc.so.$(MAJOR_VERSION)
+LIBC=$(TOPDIR)libc/libc.a
+
+BUILDTIME = $(shell TZ=UTC date --utc "+%Y.%m.%d-%H:%M%z")
+
 GCCINCDIR = $(shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
 
 # use '-Os' optimization if available, else use -O2, allow Config to override
@@ -51,7 +62,29 @@ ifndef $(PREFIX)
     PREFIX = `pwd`/_install
 endif
 
-NATIVE_ARCH = $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/')
+NATIVE_ARCH = $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/' -e 's/ppc/powerpc/g')
+
+ifeq ($(strip $(HAS_MMU)),true)
+       DO_SHARED=shared
+endif
+
+LDSO_PRESENT=$(strip $(shell cd $(TOPDIR)/ldso/d-link; ls -d $(TARGET_ARCH) 2>/dev/null))
+
+# NOTE: This may need to be modified for your system
+ifeq ($(NATIVE_ARCH), $(TARGET_ARCH))
+       SYSTEM_LDSO=$(strip $(shell ldd `which $(CC)` | sed -ne /ld/p | sed -e s/\ =.*//g))
+else
+       SYSTEM_LDSO=/lib/ld-linux.so.2
+endif
+
+ifeq ($(LDSO_PRESENT), $(TARGET_ARCH))
+       LDSO=$(TOPDIR)lib/$(UCLIBC_LDSO)
+       DYNAMIC_LINKER=/lib/$(UCLIBC_LDSO)
+else
+       LDSO=$(SYSTEM_LDSO)
+       DYNAMIC_LINKER=$(SYSTEM_LDSO)
+endif
+
 
 # It turns out the currently, function-sections causes ldelf2flt to segfault.
 # So till further notice, this is disabled by default....
@@ -65,4 +98,3 @@ NATIVE_ARCH = $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' -e
 #    LDFLAGS += --gc-sections
 #endif
 
-