diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-11-17 22:56:02 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-11-17 22:56:02 +0000 |
commit | 0a7b9d5d57021e616dc5e4b5dfaa3b93131381af (patch) | |
tree | c8f59bd3d11749d7512393e5e34e17a7270c5bc6 /libpthread/linuxthreads.old | |
parent | c24e561a344c12f829ffffbf1b5b7b179409b0da (diff) |
Include all lib*/Makefile.in in top_srcdir/Makefile.in, allows adding foreign objects to a lib
Diffstat (limited to 'libpthread/linuxthreads.old')
-rw-r--r-- | libpthread/linuxthreads.old/Makefile.in | 95 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/sysdeps/sh64/Makefile.arch | 20 |
2 files changed, 78 insertions, 37 deletions
diff --git a/libpthread/linuxthreads.old/Makefile.in b/libpthread/linuxthreads.old/Makefile.in index ca3ded8f6..98ef6307b 100644 --- a/libpthread/linuxthreads.old/Makefile.in +++ b/libpthread/linuxthreads.old/Makefile.in @@ -6,57 +6,94 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -CFLAGS+=$(SSP_ALL_CFLAGS) +CFLAGS-linuxthreads.old := -DNOT_IN_libc $(SSP_ALL_CFLAGS) -# This stuff will not compile without at least -O1 -CFLAGS:=$(CFLAGS:-O0=-O1) - -LDFLAGS:=$(LDFLAGS_NOSTRIP) -z defs +CFLAGS-libpthread/linuxthreads.old/sysdeps/$(TARGET_ARCH)/ := $(CFLAGS-linuxthreads.old) -ifeq ($(UCLIBC_CTOR_DTOR),y) -SHARED_START_FILES:=$(top_builddir)lib/crti.o $(LIBGCC_DIR)crtbeginS.o -SHARED_END_FILES:=$(LIBGCC_DIR)crtendS.o $(top_builddir)lib/crtn.o -endif +# This stuff will not compile without at least -O1 +# psm: can't handle this here, could maybe search for -O0 in CFLAGS +# and append -O1 if found +#CFLAGS:=$(CFLAGS:-O0=-O1) ifeq ($(PTHREADS_DEBUG_SUPPORT),y) -STRIP_FLAGS:=-X --strip-debug -R .note -R .comment +LDFLAGS-libpthread.so := $(LDFLAGS_NOSTRIP) -z defs +else +LDFLAGS-libpthread.so := $(LDFLAGS) endif -DOMULTI=n +LIBS-libpthread.so := $(LIBS) -LIB_NAME:=libpthread +START_FILE-libpthread.so := $(SHARED_START_FILES) +END_FILE-libpthread.so := $(SHARED_END_FILES) -libpthread_DIR:=$(top_srcdir)libpthread/linuxthreads.old -libpthread_OUT:=$(top_builddir)libpthread/linuxthreads.old +libpthread_FULL_NAME := libpthread-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so + +libpthread_DIR := $(top_srcdir)libpthread/linuxthreads.old +libpthread_OUT := $(top_builddir)libpthread/linuxthreads.old -ARCH_CFLAGS:=$(CFLAGS) -include $(libpthread_DIR)/sysdeps/$(TARGET_ARCH)/Makefile.arch -CFLAGS:=$(ARCH_CFLAGS) -libpthread_SRC:=$(wildcard $(libpthread_DIR)/*.c) +libpthread_SRC := $(wildcard $(libpthread_DIR)/*.c) ifneq ($(UCLIBC_HAS_XLOCALE),y) -libpthread_SRC:=$(filter-out $(libpthread_DIR)/locale.c,$(libpthread_SRC)) +libpthread_SRC := $(filter-out $(libpthread_DIR)/locale.c,$(libpthread_SRC)) endif ifneq ($(DOMULTI),n) -libpthread_NO_MULTI:=manager.c pt-machine.c -libpthread_SRC:=$(filter-out $(patsubst %.c,$(libpthread_DIR)/%.c,$(libpthread_NO_MULTI)),$(libpthread_SRC)) +libpthread_NO_MULTI := manager.c pt-machine.c +libpthread_SRC := $(filter-out $(patsubst %.c,$(libpthread_DIR)/%.c,$(libpthread_NO_MULTI)),$(libpthread_SRC)) endif # remove generic sources, if arch specific version is present ifneq ($(strip $(libpthread_ARCH_SRC)),) -libpthread_SRC:=$(filter-out $(patsubst %.c,$(libpthread_DIR)/%.c,$(notdir $(libpthread_ARCH_SRC))),$(libpthread_SRC)) +libpthread_SRC := $(filter-out $(patsubst %.c,$(libpthread_DIR)/%.c,$(notdir $(libpthread_ARCH_SRC))),$(libpthread_SRC)) +endif + +libpthread_OBJ := $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.o,$(libpthread_SRC)) + +libpthread-a-y += $(libpthread_OBJ) +libpthread-so-y += $(libpthread_OBJ:.o=.os) + +libpthread-multi-y += $(libpthread_SRC) +libpthread-nomulti-y += $(patsubst %.c,$(libpthread_OUT)/%.o,$(libpthread_NO_MULTI)) + +lib-a-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.a +lib-so-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.so +objclean-y += libpthread_clean +headers-$(UCLIBC_HAS_THREADS) += linuxthreads_headers +headers_clean-y += linuxthreads_headers_clean + +$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a libc-y + $(call link.so,$(libpthread_FULL_NAME),$(MAJOR_VERSION)) + +$(libpthread_OUT)/libpthread_so.a: $(libpthread-so-y) + $(Q)$(RM) $@ +ifeq ($(PTHREADS_DEBUG_SUPPORT),y) + $(do_strip:-x=-X --strip-debug) +else + $(do_strip) endif + $(do_ar) -libpthread_OBJ:=$(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.o,$(libpthread_SRC)) +ifeq ($(DOPIC),y) +$(top_builddir)lib/libpthread.a: $(libpthread-a-y:.o=.os) +else +$(top_builddir)lib/libpthread.a: $(libpthread-a-y) +endif + $(Q)$(INSTALL) -d $(dir $@) + $(Q)$(RM) $@ + $(do_strip) + $(do_ar) -libpthread-a-$(UCLIBC_HAS_THREADS)+=$(libpthread_OBJ) -libpthread-so-$(UCLIBC_HAS_THREADS)+=$(libpthread_OBJ:.o=.os) +linuxthreads_headers: + $(LN) -sf ../$(PTDIR)/sysdeps/pthread/pthread.h $(top_builddir)include/ + $(LN) -sf ../$(PTDIR)/semaphore.h $(top_builddir)include/ + $(INSTALL) -d $(top_builddir)include/bits + $(LN) -sf ../../$(PTDIR)/sysdeps/pthread/bits/pthreadtypes.h $(top_builddir)include/bits/ -libpthread-multi-$(UCLIBC_HAS_THREADS)+=$(libpthread_SRC) -libpthread-nomulti-$(UCLIBC_HAS_THREADS)+=$(patsubst %.c,$(libpthread_OUT)/%.o,$(libpthread_NO_MULTI)) -objclean-y+=libpthread_clean +linuxthreads_headers_clean: + $(RM) $(top_builddir)include/pthread.h $(top_builddir)include/semaphore.h \ + $(top_builddir)include/bits/pthreadtypes.h -lib-a-$(UCLIBC_HAS_THREADS)+=$(top_builddir)lib/libpthread.a -lib-so-$(UCLIBC_HAS_THREADS)+=$(top_builddir)lib/libpthread.so +libpthread_clean: + $(RM) $(libpthread_OUT)/*.{o,os,a} diff --git a/libpthread/linuxthreads.old/sysdeps/sh64/Makefile.arch b/libpthread/linuxthreads.old/sysdeps/sh64/Makefile.arch index 38cd12db6..e4cb95b76 100644 --- a/libpthread/linuxthreads.old/sysdeps/sh64/Makefile.arch +++ b/libpthread/linuxthreads.old/sysdeps/sh64/Makefile.arch @@ -6,21 +6,25 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -# We need to build as SHcompact for tas.. -ARCH_CFLAGS:=$(subst 32media,compact,$(ARCH_CFLAGS)) - -libpthread_ARCH_DIR:=$(top_srcdir)libpthread/linuxthreads/sysdeps/sh64 -libpthread_ARCH_OUT:=$(top_builddir)libpthread/linuxthreads/sysdeps/sh64 +libpthread_ARCH_DIR:=$(top_srcdir)libpthread/linuxthreads.old/sysdeps/sh64 +libpthread_ARCH_OUT:=$(top_builddir)libpthread/linuxthreads.old/sysdeps/sh64 libpthread_ARCH_SRC:=$(wildcard $(libpthread_ARCH_DIR)/*.c) libpthread_ARCH_OBJ:=$(patsubst $(libpthread_ARCH_DIR)/%.c,$(libpthread_ARCH_OUT)/%.o,$(libpthread_ARCH_SRC)) -libpthread-a-$(UCLIBC_HAS_THREADS)+=$(libpthread_ARCH_OBJ) -libpthread-so-$(UCLIBC_HAS_THREADS)+=$(libpthread_ARCH_OBJ:.o=.os) +libpthread-a-y+=$(libpthread_ARCH_OBJ) +libpthread-so-y+=$(libpthread_ARCH_OBJ:.o=.os) -libpthread-multi-$(UCLIBC_HAS_THREADS)+=$(libpthread_ARCH_SRC) +libpthread-multi-y+=$(libpthread_ARCH_SRC) objclean-y+=libpthread_arch_objclean +# We need to build as SHcompact for tas.. +$(libpthread_ARCH_OBJ): %.o : %.c + $(compile.c:32media=compact) + +$(libpthread_ARCH_OBJ:.o=.os): %.os : %.c + $(compile.c:32media=compact) + libpthread_arch_objclean: $(RM) $(libpthread_ARCH_OUT)/*.{o,os} |