From 16cb1bf22f72db0ac47080e364ffbc79a3ec174a Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 14 Aug 2000 03:43:09 +0000 Subject: 2000-08-13 Ross Johnson * errno.c: Add _MD precompile condition; thus far had no effect when using /MD compile option but I thnk it should be there. * exit.c: Add __cplusplus to various #if lines; was compiling SEH code even when VC++ had C++ compile options. * private.c: ditto. * create.c (pthread_create): Add PT_STDCALL macro to function pointer arg in _beginthread(). * pthread.h: PT_STDCALL really does need to be defined in both this and impliment.h; don't set it to __cdecl - this macro is only used to extend function pointer casting for functions that will be passed as parameters. (~PThreadCleanup): add cast and group expression. (_errno): Add _MD compile conditional. (PtW32NoCatchWarn): Change pragma message. * implement.h: Move and change PT_STDCALL define. * need_errno.h: Add _MD to compilation conditional. * GNUmakefile: Substantial rewrite for new naming convention; set for nil optimisation (turn it up when we have a working library build; add target "fake.a" to build a libpthreadw32.a from the VC++ built DLL pthreadVCE.dll. * pthread.def (LIBRARY): Don't specify in the .def file - it is specified on the linker command line since we now use the same .def file for variously named .dlls. * Makefile: Substantial rewrite for new naming convention; default nmake target only issues a help message; run nmake with specific target corresponding to the EH scheme being used. * README: Update information; add naming convention explanation. * ANNOUNCE: Update information. 2000-08-12 Ross Johnson * pthread.h: Add compile-time message when using MSC_VER compiler and C++ EH to warn application programmers to use PtW32Catch instead of catch(...) if they want cancelation and pthread_exit to work. * implement.h: Remove #include ; we use our own local semaphore.h. tests/ChangeLog: 2000-08-13 Ross Johnson * condvar3.c: Minor change to eliminate compiler warning. * condvar4.c: ditto. * condvar5.c: ditto. * condvar6.c: ditto. * condvar7.c: ditto. * condvar8.c: ditto. * condvar9.c: ditto. * exit1.c: Function needed return statement. * cleanup1.c: Remove unnecessary printf arg. * cleanup2.c: Fix cast. * rwlock6.c: Fix casts. * exception1.c (PtW32CatchAll): Had the wrong name; fix casts. * cancel3.c: Remove unused waitLock variable. * GNUmakefile: Change library/dll naming; add new tests; general minor changes. * Makefile: Change library/dll naming; add targets for testing each of the two VC++ EH scheme versions; default target now issues help message; compile warnings now interpreted as errors to stop the make; add new tests; restructure to remove prerequisites needed otherwise. * README: Updated. --- GNUmakefile | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index b10e358..c91a782 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -21,6 +21,8 @@ GLANG = c++ RM = erase +MV = rename +CP = copy CC = gcc @@ -28,7 +30,7 @@ AR = ar LD = gcc -mdll -OPT = -g -O2 -x $(GLANG) +OPT = -g -O0 -x $(GLANG) ## Mingw32 CFLAGS = $(OPT) -I. -mthreads -DHAVE_CONFIG_H -Wall @@ -42,19 +44,21 @@ OBJS = attr.o cancel.o cleanup.o condvar.o create.o dll.o errno.o \ INCL = implement.h semaphore.h pthread.h windows.h -DLL = pthread.dll +DLL = pthreadGCE.dll -LIB = libpthread32.a +LIBS = libpthreadw32.a -all: $(LIB) +all: $(LIBS) -pthread.a: - dlltool --def $(DLL:.dll=.def) --output-lib $@ --dllname $(DLL) - rename pthread.a $(LIB) +fake.a: + @ $(CP) pthreadVCE.dll $(DLL) + dlltool --def pthread.def --output-lib $@ --dllname $(DLL) + @-$(RM) $(LIBS) + $(MV) fake.a $(LIBS) -$(LIB): $(DLL) - dlltool --def $(DLL:.dll=.def) --output-lib $@ --dllname $(DLL) +$(LIBS): $(DLL) + dlltool --def pthread.def --output-lib $@ --dllname $(DLL) %.pre: %.c $(CC) -E -o $@ $(CFLAGS) $^ @@ -66,16 +70,17 @@ $(LIB): $(DLL) $(DLL): $(OBJS) $(LD) -o $@ $^ -Wl,--base-file,$*.base - dlltool --base-file=$*.base --def $*.def --output-exp $*.exp --dllname $@ + dlltool --base-file=$*.base --def pthread.def --output-exp $*.exp --dllname $@ $(LD) -o $@ $^ -Wl,--base-file,$*.base,$*.exp - dlltool --base-file=$*.base --def $*.def --output-exp $*.exp --dllname $@ + dlltool --base-file=$*.base --def pthread.def --output-exp $*.exp --dllname $@ $(LD) -o $@ $^ -Wl,$*.exp clean: -$(RM) *~ - -$(RM) $(LIB) + -$(RM) $(LIBS) -$(RM) *.o -$(RM) *.exe -$(RM) $(DLL) -$(RM) $(DLL:.dll=.base) -$(RM) $(DLL:.dll=.exp) + -$(RM) fake.a -- cgit v1.2.3