Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-12-31 06:19:29 +0300
committerChristopher Faylor <me@cgf.cx>2001-12-31 06:19:29 +0300
commite56f4d7fc4f734d1f784e898a4f4ace33eb019b3 (patch)
treeaced68c440f17e74b6e6ef10ca510da5b390cbc1
parentcdd3a8bd6792b7e6f1101ec0c2495e5472c58044 (diff)
* speclib: New file.
* Makefile.in: Create library versions of automode.o, textmode.o, and binmode.o for easier use on command line. Create libpthread.a, libm.a, and libc.a with subsets of exports found in libcygwin.a.
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/Makefile.in23
-rwxr-xr-xwinsup/cygwin/speclib12
3 files changed, 40 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 38635d3b7..78253117f 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,11 @@
+2001-12-30 Christopher Faylor <cgf@redhat.com>
+ Ralf Habacker <Ralf.Habacker@freenet.de>
+
+ * speclib: New file.
+ * Makefile.in: Create library versions of automode.o, textmode.o, and
+ binmode.o for easier use on command line. Create libpthread.a, libm.a,
+ and libc.a with subsets of exports found in libcygwin.a.
+
2001-12-30 Ralf Habacker <Ralf.Habacker@freenet.de>
* cygmagic: Eliminate unneeded use of 'tr' and 'bc'.
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index 05867dccc..3de9b1922 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -141,6 +141,11 @@ NEW_FUNCTIONS:=regcomp posix_regcomp \
regexec posix_regexec \
regfree posix_regfree
+PWD:=${shell pwd}
+SUBLIBS:=libpthread.a $(PWD)/libm.a libc.a
+EXTRALIBS:=libautomode.a libbinmode.a libtextmode.a
+INSTOBJS:=automode.o binmode.o textmode.o
+TARGET_LIBS:=$(LIB_NAME) $(SUBLIBS) $(GMON_START) $(LIBGMON_A) $(SUBLIBS) $(INSTOBJS) $(EXTRALIBS)
.PHONY: all force dll_ofiles install all_target install_target all_host install_host \
install install_target install-libs install-headers
@@ -152,7 +157,7 @@ install_host=@install_host@
all: all_target $(all_host)
-all_target: $(LIB_NAME) automode.o binmode.o textmode.o $(LIBGMON_A)
+all_target: $(TARGET_LIBS)
all_host: new-$(LIB_NAME) cygrun.exe
@@ -160,9 +165,9 @@ force:
install: install-libs install-headers install-man $(install_host) $(install_target)
-install-libs: $(LIB_NAME)
+install-libs: $(TARGET_LIBS)
$(INSTALL_DATA) new-$(DLL_NAME) $(bindir)/$(DLL_NAME); \
- for i in $(LIB_NAME) $(GMON_START) $(LIBGMON_A) automode.o binmode.o textmode.o ; do \
+ for i in $^; do \
$(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \
done
@@ -240,6 +245,18 @@ dcrt0.o sigproc.o: child_info_magic.h
shared.o: shared_info_magic.h
+libpthread.a: speclib cygwin.def pthread.o thread.o
+ /bin/sh ${word 1, $^} $@ "${NM}" "${DLLTOOL}" ${wordlist 2, 99, $^}
+
+$(PWD)/libm.a: speclib cygwin.def $(LIBM)
+ /bin/sh ${word 1, $^} $@ "${NM}" "${DLLTOOL}" ${wordlist 2, 99, $^}
+
+$(PWD)/libc.a: speclib cygwin.def $(PWD)/libm.a libpthread.a
+ /bin/sh ${word 1, $^} -v $@ "${NM}" "${DLLTOOL}" ${wordlist 2, 99, $^}
+
+lib%.a: %.o
+ $(AR) cru $@ $?
+
winver_stamp: mkvers.sh include/cygwin/version.h winver.rc $(DLL_OFILES)
@echo "Making version.o and winver.o";\
$(SHELL) ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES) && \
diff --git a/winsup/cygwin/speclib b/winsup/cygwin/speclib
new file mode 100755
index 000000000..63c2f20fc
--- /dev/null
+++ b/winsup/cygwin/speclib
@@ -0,0 +1,12 @@
+#!/bin/sh
+case "$1" in
+ -v) v="-v"; shift
+esac
+lib=$1; shift
+nm=$1; shift
+dlltool=$1; shift
+def=$1; shift
+# trap "rm /tmp/$$.def" 0 1 2 15
+(echo "LIBRARY cygwin1.dll
+EXPORTS"; $nm --extern-only --defined-only $* | sed -e '/^[ ]*$/d' -e '/:$/d' -e 's/^.* _\(.*\)/\1/' | grep $v -f - -w $def |egrep -vi '^library|exports|^$' | sort) > /tmp/$$.def
+exec $dlltool -d /tmp/$$.def -l "$lib" -D /dev/null