summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorrpj <rpj>2002-02-08 01:51:17 +0000
committerrpj <rpj>2002-02-08 01:51:17 +0000
commitb29903300adc22ed277bbaa356aca8ed0c245957 (patch)
tree02921a99a145dda1e78a315cc75016443839f2e0 /GNUmakefile
parent14118935d2d6863a4746223d8e22c2e58ffebab5 (diff)
Copyright notice updates; module splitting; POSIX version
conditional compilation; refinements; bug fixes. See the ChangeLog.
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile200
1 files changed, 172 insertions, 28 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 047e62e..5887ea2 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,23 +1,39 @@
#
-# Pthreads-win32 - POSIX Threads Library for Win32
-# Copyright (C) 1998
+# --------------------------------------------------------------------------
#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-# MA 02111-1307, USA
+# Pthreads-win32 - POSIX Threads Library for Win32
+# Copyright(C) 1998 John E. Bossom
+# Copyright(C) 1999,2002 Pthreads-win32 contributors
+#
+# Contact Email: rpj@ise.canberra.edu.au
+#
+# The current list of contributors is contained
+# in the file CONTRIBUTORS included with the source
+# code distribution. The list can also be seen at the
+# following World Wide Web location:
+# http://sources.redhat.com/pthreads-win32/contributors.html
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
#
+DEVROOT = C:\PTHREADS
+
+DLLDEST = $(DEVROOT)\DLL
+LIBDEST = $(DEVROOT)\DLL
+
#RM = rm
#MV = mv
#CP = cp
@@ -41,23 +57,148 @@ GC_CFLAGS = -D__CLEANUP_C
GCE_CFLAGS = -D__CLEANUP_CXX -x c++ -mthreads
## Mingw32
-MAKE = make
-CFLAGS = $(OPT) -I. -D_WIN32_WINNT=0x400 -DHAVE_CONFIG_H -DPTW32_BUILD -Wall
+MAKE = make
+CFLAGS = $(OPT) -I. -D_WIN32_WINNT=0x400 -DHAVE_CONFIG_H -Wall
## Cygwin G++
-#CFLAGS = $(OPT) -x $(GLANG) -fhandle-exceptions -D_WIN32_WINNT=0x400 -I. -DHAVE_CONFIG_H -DPTW32_BUILD -Wall
+#CFLAGS = $(OPT) -x $(GLANG) -fhandle-exceptions -D_WIN32_WINNT=0x400 -I. -DHAVE_CONFIG_H -Wall
+
+# Agregate modules for inlinability
+DLL_OBJS = \
+ attr.o \
+ barrier.o \
+ cancel.o \
+ cleanup.o \
+ condvar.o \
+ create.o \
+ dll.o \
+ errno.o \
+ exit.o \
+ fork.o \
+ global.o \
+ misc.o \
+ mutex.o \
+ nonportable.o \
+ private.o \
+ rwlock.o \
+ sched.o \
+ semaphore.o \
+ signal.o \
+ spin.o \
+ sync.o \
+ tsd.o
-OBJS = attr.o barrier.o cancel.o cleanup.o condvar.o create.o dll.o errno.o \
- exit.o fork.o global.o misc.o mutex.o nonportable.o \
- private.o rwlock.o sched.o semaphore.o signal.o spin.o sync.o tsd.o
+# Separate modules for minimum size statically linked images
+SMALL_STATIC_OBJS = \
+ attr_is_attr.o \
+ attr_init.o \
+ attr_destroy.o \
+ attr_getdetachstate.o \
+ attr_setdetachstate.o \
+ attr_getstackaddr.o \
+ attr_setstackaddr.o \
+ attr_getstacksize.o \
+ attr_setstacksize.o \
+ attr_getscope.o \
+ attr_setscope.o \
+ barrier_init.o \
+ barrier_destroy.o \
+ barrier_wait.o \
+ barrier_attr_init.o \
+ barrier_attr_destroy.o \
+ barrier_attr_setpshared.o \
+ barrier_attr_getpshared.o \
+ cancel_setcancelstate.o \
+ cancel_setcanceltype.o \
+ cancel_testcancel.o \
+ cancel_cancel.o \
+ cleanup.o \
+ condvar.o \
+ create.o \
+ dll.o \
+ errno.o \
+ exit.o \
+ fork.o \
+ global.o \
+ misc.o \
+ mutex.o \
+ nonportable.o \
+ private.o \
+ rwlock.o \
+ sched.o \
+ semaphore_init.o \
+ semaphore_destroy.o \
+ semaphore_trywait.o \
+ semaphore_timedwait.o \
+ semaphore_wait.o \
+ semaphore_post.o \
+ semaphore_postmultiple.o \
+ semaphore_getvalue.o \
+ semaphore_increase.o \
+ semaphore_decrease.o \
+ semaphore_open.o \
+ semaphore_close.o \
+ semaphore_unlink.o \
+ signal.o \
+ spin.o \
+ sync.o \
+ tsd.o
-INCL = implement.h semaphore.h pthread.h windows.h
+INCL = \
+ config.h \
+ implement.h \
+ semaphore.h \
+ pthread.h \
+ need_errno.h
+
+ATTR_SRCS = \
+ attr_is_attr.c \
+ attr_init.c \
+ attr_destroy.c \
+ attr_getdetachstate.c \
+ attr_setdetachstate.c \
+ attr_getstackaddr.c \
+ attr_setstackaddr.c \
+ attr_getstacksize.c \
+ attr_setstacksize.c \
+ attr_getscope.c \
+ attr_setscope.c
+
+BARRIER_SRCS = \
+ barrier_init.c \
+ barrier_destroy.c \
+ barrier_wait.c \
+ barrier_attr_init.c \
+ barrier_attr_destroy.c \
+ barrier_attr_setpshared.c \
+ barrier_attr_getpshared.c
+
+CANCEL_SRCS = \
+ cancel_setcancelstate.c \
+ cancel_setcanceltype.c \
+ cancel_testcancel.c \
+ cancel_cancel.c
+
+SEMAPHORE_SRCS = \
+ semaphore_init.c \
+ semaphore_destroy.c \
+ semaphore_trywait.c \
+ semaphore_timedwait.c \
+ semaphore_wait.c \
+ semaphore_post.c \
+ semaphore_postmultiple.c \
+ semaphore_getvalue.c \
+ semaphore_increase.c \
+ semaphore_decrease.c \
+ semaphore_open.c \
+ semaphore_close.c \
+ semaphore_unlink.c
GC_DLL = pthreadGC.dll
-GCE_DLL = pthreadGCE.dll
+GCE_DLL = pthreadGCE.dll
GC_LIB = libpthreadGC.a
-GCE_LIB = libpthreadGCE.a
+GCE_LIB = libpthreadGCE.a
all:
@@ -90,11 +231,11 @@ tests:
.c.o:; $(CC) -c -o $@ $(CFLAGS) $(CLEANUP_FLAGS) $<
-$(GC_DLL): $(OBJS)
+$(GC_DLL): $(DLL_OBJS)
$(CC) $(OPT) -shared -o $@ $^ $(LFLAGS)
dlltool -k --dllname $@ --output-lib $(GC_LIB) --def pthread.def
-$(GCE_DLL): $(OBJS)
+$(GCE_DLL): $(DLL_OBJS)
$(CXX) $(OPT) -mthreads -shared -o $@ $^ $(LFLAGS)
dlltool -k --dllname $@ --output-lib $(GCE_LIB) --def pthread.def
@@ -110,4 +251,7 @@ realclean: clean
-$(RM) $(GC_DLL)
-$(RM) $(GCE_DLL)
-
+attr.o: attr.c $(ATTR_SRCS) $(INCL)
+barrier.o: barrier.c $(BARRIER_SRCS) $(INCL)
+cancel.o: cancel.c $(CANCEL_SRCS) $(INCL)
+semaphore.o: semaphore.c $(SEMAPHORE_SRCS) $(INCL)