]> granicus.if.org Git - gc/commitdiff
Remove obsolete Makefile.DLL (superseded by cygwin/mingw configure)
authorIvan Maidanski <ivmai@mail.ru>
Thu, 22 Sep 2011 08:58:56 +0000 (12:58 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 22 Sep 2011 08:58:56 +0000 (12:58 +0400)
* Makefile.DLL: Remove.
* Makefile.am (EXTRA_DIST): Remove Makefile.DLL entry.
* Makefile.direct (OTHER_MAKEFILES): Likewise.
* Makefile.dj (OTHER_FILES): Likewise.
* Makefile.direct: Remove comment about Makefile.DLL.

Makefile.DLLs [deleted file]
Makefile.am
Makefile.direct
Makefile.dj

diff --git a/Makefile.DLLs b/Makefile.DLLs
deleted file mode 100644 (file)
index 011f49d..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-#-----------------------------------------------------------------------------#
-
-# Makefile.DLLs, version 0.4.
-
-# Contributed by Fergus Henderson.
-
-# This Makefile contains rules for creating DLLs on Windows using gnu-win32.
-
-#-----------------------------------------------------------------------------#
-
-# This rule creates a `.def' file, which lists the symbols that are exported
-# from the DLL.  We use `nm' to get a list of all the exported text (`T')
-# symbols and data symbols -- including uninitialized data (`B'),
-# initialized data (`D'), read-only data (`R'), and common blocks (`C').
-%.def: %.a
-       echo EXPORTS > $@
-       nm $< | grep '^........ [BCDRT] _' | sed 's/[^_]*_//' >> $@
-
-# We need to use macros to access global data:
-# the user of the DLL must refer to `foo' as `(*__imp_foo)'.
-# This rule creates a `_globals.h' file, which contains macros
-# for doing this.
-
-SYM_PREFIX = $(firstword $(SYM_PREFIX-$*) $*)
-DLL_MACRO = $(SYM_PREFIX)_USE_DLL
-IMP_MACRO = $(SYM_PREFIX)_IMP
-GLOBAL_MACRO = $(SYM_PREFIX)_GLOBAL
-
-%_globals.h: %.a
-       echo "/* automatically generated by Makefile.DLLs */"   > $@
-       echo "#if defined(__GNUC__) && defined(_WIN32) \\"      >> $@
-       echo "  && defined($(DLL_MACRO))"                       >> $@
-       echo "#  define $(IMP_MACRO)(name)      __imp_##name"   >> $@
-       echo "#  define $(GLOBAL_MACRO)(name)   (*$(IMP_MACRO)(name))" >> $@
-       echo "#else"                                            >> $@
-       echo "#  define $(GLOBAL_MACRO)(name)   name"           >> $@
-       echo "#endif"                                           >> $@
-       echo ""                                                 >> $@
-       for sym in `nm $< | grep '^........ [BCDR] _' | sed 's/[^_]*_//'`; do \
-               echo "#define $$sym     $(GLOBAL_MACRO)($$sym)" >> $@; \
-       done
-
-# This rule creates the export object file (`foo.exp') which contains the
-# jump table array; this export object file becomes part of the DLL. 
-# This rule also creates the import library (`foo_dll.a') which contains small
-# stubs for all the functions exported by the DLL which jump to them via the
-# jump table.  Executables that will use the DLL must be linked against this
-# stub library.
-%.exp %_dll.a : %.def
-       dlltool $(DLLTOOLFLAGS) $(DLLTOOLFLAGS-$*)              \
-               --def $<                                        \
-               --dllname $*.dll                                \
-               --output-exp $*.exp                             \
-               --output-lib $*_dll.a
-
-# The `sed' commands below are to convert DOS-style `C:\foo\bar'
-# pathnames into Unix-style `//c/foo/bar' pathnames.
-CYGWIN32_LIBS = $(shell echo                                   \
-       -L`dirname \`gcc -print-file-name=libgcc.a |            \
-       sed -e 's@^\\\\([A-Za-z]\\\\):@//\\\\1@g' -e 's@\\\\\\\\@/@g' \` ` \
-       -L`dirname \`gcc -print-file-name=libcygwin.a | \
-       sed -e 's@^\\\\([A-Za-z]\\\\):@//\\\\1@g' -e 's@\\\\\\\\@/@g' \` ` \
-       -L`dirname \`gcc -print-file-name=libkernel32.a | \
-       sed -e 's@^\\\\([A-Za-z]\\\\):@//\\\\1@g' -e 's@\\\\\\\\@/@g' \` ` \
-       -lgcc -lcygwin -lkernel32 -lgcc)
-
-RELOCATABLE=yes
-
-ifeq "$(strip $(RELOCATABLE))" "yes"
-
-# to create relocatable DLLs, we need to do two passes
-%.dll: %.exp %.a dll_fixup.o dll_init.o
-       $(LD) $(LDFLAGS) $(LDFLAGS-$*) --dll -o $*.base                 \
-               -e _dll_entry@12 dll_init.o                             \
-               dll_fixup.o $*.exp $*.a                                 \
-               $(LDLIBS) $(LDLIBS-$*)                                  \
-               $(CYGWIN32_LIBS)
-       $(LD) $(LDFLAGS) $(LDFLAGS-$*) --dll --base-file $*.base -o $@  \
-               -e _dll_entry@12 dll_init.o                             \
-               dll_fixup.o $*.exp $*.a                                 \
-               $(LDLIBS) $(LDLIBS-$*)                                  \
-               $(CYGWIN32_LIBS)
-       rm -f $*.base
-else
-
-%.dll: %.exp %.a dll_fixup.o dll_init.o
-       $(LD) $(LDFLAGS) $(LDFLAGS-$*) --dll -o $@                      \
-               -e _dll_entry@12 dll_init.o                             \
-               dll_fixup.o $*.exp $*.a                                 \
-               $(LDLIBS) $(LDLIBS-$*)                                  \
-               $(CYGWIN32_LIBS)
-
-endif
-
-# This black magic piece of assembler needs to be linked in in order to
-# properly terminate the list of imported DLLs.
-dll_fixup.s:
-       echo '.section .idata$$3'       > dll_fixup.s
-       echo '.long 0,0,0,0, 0,0,0,0'   >> dll_fixup.s
-
-# This bit is necessary to provide an initialization function for the DLL.
-dll_init.c:
-       echo '__attribute__((stdcall))' > dll_init.c
-       echo 'int dll_entry(int handle, int reason, void *ptr)' >> dll_init.c
-       echo '{return 1; }' >> dll_init.c
-
-dont_throw_away: dll_fixup.o dll_init.o
index dce0941c24fbc0513ad234acd850c419fbce2541..940b8bce7ea14e07a55e326f5a9fd52acb549e5a 100644 (file)
@@ -158,7 +158,7 @@ EXTRA_DIST += README.QUICK TODO
 # :GOTCHA: deliberately we do not include 'Makefile'
 EXTRA_DIST += BCC_MAKEFILE NT_MAKEFILE \
     OS2_MAKEFILE PCR-Makefile digimars.mak EMX_MAKEFILE \
-    Makefile.direct Makefile.dj Makefile.DLLs SMakefile.amiga \
+    Makefile.direct Makefile.dj SMakefile.amiga \
     WCC_MAKEFILE autogen.sh build_atomic_ops.sh build_atomic_ops.sh.cygwin \
     NT_STATIC_THREADS_MAKEFILE NT_X64_STATIC_THREADS_MAKEFILE \
     NT_X64_THREADS_MAKEFILE CMakeLists.txt tests/CMakeLists.txt
index ae778b37d028f6a446a275ff1c19ec3423ba43d5..0cf9426c904749c654f1af5b5d7c6532ae1543fc 100644 (file)
@@ -134,7 +134,7 @@ GNU_BUILD_FILES= configure.ac Makefile.am configure install-sh Makefile.in \
 
 OTHER_MAKEFILES= OS2_MAKEFILE NT_MAKEFILE gc.mak \
   BCC_MAKEFILE EMX_MAKEFILE WCC_MAKEFILE Makefile.dj \
-  PCR-Makefile SMakefile.amiga Makefile.DLLs \
+  PCR-Makefile SMakefile.amiga \
   digimars.mak Makefile.direct NT_STATIC_THREADS_MAKEFILE \
   NT_X64_STATIC_THREADS_MAKEFILE NT_X64_THREADS_MAKEFILE \
   build_atomic_ops.sh build_atomic_ops.sh.cygwin
@@ -462,9 +462,6 @@ test_dll: test_dll.o libgc_dll.a libgc.dll
 
 SYM_PREFIX-libgc=GC
 
-# Uncomment the following line to build a GNU win32 DLL
-# include Makefile.DLLs
-
 reserved_namespace: $(SRCS)
        for file in $(SRCS) tests/test.c tests/test_cpp.cc; do \
                sed s/GC_/_GC_/g < $$file > tmp; \
index 07758490127bf3682c417c579d6d2f22818d7525..4fcf9a5fff2a8f02a7990d29bcde0badb1a1e9f8 100644 (file)
@@ -72,7 +72,7 @@ OTHER_FILES= PCR-Makefile OS2_MAKEFILE NT_MAKEFILE BCC_MAKEFILE \
            tools/add_gc_prefix.c doc/README.solaris2 doc/README.sgi \
            doc/README.hp doc/README.uts win32_threads.c gc.mak doc/README.dj \
            Makefile.dj doc/README.alpha doc/README.linux doc/README.MacOSX \
-          Makefile.DLLs WCC_MAKEFILE
+          WCC_MAKEFILE
 
 CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
        $(srcdir)/include/ec.h $(srcdir)/include/private/cord_pos.h