summaryrefslogtreecommitdiff
path: root/build-dll
diff options
context:
space:
mode:
authorTor Lillqvist <tml@src.gnome.org>1999-04-25 20:52:42 +0000
committerTor Lillqvist <tml@src.gnome.org>1999-04-25 20:52:42 +0000
commitd6c6eb3d92e857a296134c68c2cd590636b1fb63 (patch)
tree03a00c8ee55919e9f12066b1cce42e78fafe686a /build-dll
parent2aa1277d60f63d283a955d40cc681f1d30a067e8 (diff)
downloadglib-d6c6eb3d92e857a296134c68c2cd590636b1fb63.tar.gz
More editing. Use gcc, not ld to link. On native Win32 use _unlink(). Use
* README.win32: More editing. * build-dll: Use gcc, not ld to link. * glib.h: On native Win32 use _unlink(). * gscanner.c: Use corrent NATIVE_WIN32 feature test macro, not _MSC_VER. * gstring.c: Include <io.h> on Win32 for _read prototype. * gutils.c: Remove old IO channel code (was in #if 0). * makefile.cygwin: Don't need to link with kernel32 and msvcrt explicitly, they are included anyway.
Diffstat (limited to 'build-dll')
-rw-r--r--build-dll19
1 files changed, 11 insertions, 8 deletions
diff --git a/build-dll b/build-dll
index a02d644b8..ff41e1106 100644
--- a/build-dll
+++ b/build-dll
@@ -1,8 +1,10 @@
#!/bin/sh
-# Temporary hack until building dlls with gcc -mno-cygwin is easier
+# Temporary hack until building dlls or executables with exported
+# entry points is easier with gcc -mno-cygwin.
-LD=ld
+#LD=ld
+GCC=gcc
DLLTOOL=dlltool
AS=as
@@ -24,10 +26,11 @@ for F in $ldargs; do
esac
done
-$LD -s --base-file $library.base --dll -o $dllfile $ldargs -e _DllMain@12 -lmingw32
-$DLLTOOL --as=$AS --dllname $dllfile $defswitch --base-file $library.base --output-exp $library.exp $objs
-$LD -s --base-file $library.base $library.exp --dll -o $dllfile $ldargs -e _DllMain@12 -lmingw32
-$DLLTOOL --as=$AS --dllname $dllfile $defswitch --base-file $library.base --output-exp $library.exp $objs
-$LD $library.exp --dll -o $dllfile $ldargs -e _DllMain@12 -lmingw32
+$GCC -s -mdll -mno-cygwin -Wl,--base-file,$library.base -o $dllfile $ldargs
+$DLLTOOL --as=$AS --dllname $dllfile $defswitch --base-file $library.base --output-exp $library.exp $objs &&
+$GCC -s -mdll -mno-cygwin -Wl,--base-file,$library.base,$library.exp -o $dllfile $ldargs
+$DLLTOOL --as=$AS --dllname $dllfile $defswitch --base-file $library.base --output-exp $library.exp $objs &&
+$GCC -mdll -mno-cygwin -Wl,$library.exp -o $dllfile $ldargs
$DLLTOOL --as=$AS --dllname $dllfile $defswitch --output-lib lib$libname.a $objs
-rm $library.base $library.exp
+
+rm $library.base $library.exp 2>/dev/null