Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
BitchX
GitHub Repository: BitchX/BitchX1.3
Path: blob/master/dll/identd/identd.sh
1074 views
1
#!/bin/sh
2
# Make .def file:
3
export LIBPATH=/usr/local/cygwin-new/i586-pc-cygwin/lib
4
export LD=/usr/local/cygwin-new/bin/i586-pc-cygwin-ld
5
export NM=/usr/local/cygwin-new/bin/i586-pc-cygwin-nm
6
export DLLTOOL=/usr/local/cygwin-new/bin/i586-pc-cygwin-dlltool
7
export AS=/usr/local/cygwin-new/bin/i586-pc-cygwin-as
8
export GCC=/usr/local/cygwin-new/bin/i586-pc-cygwin-gcc
9
CP=cp
10
RM=rm
11
12
$GCC -I../../include -c identd.c
13
14
echo EXPORTS > identd.def
15
$NM identd.o ../init.o ../fixup.o | grep '^........ [T] _' | sed 's/[^_]*_//' >> identd.def
16
17
# Link DLL.
18
$LD --base-file identd.base --dll -o identd.dll identd.o ../init.o ../fixup.o\
19
$LIBPATH/libcygwin.a $LIBPATH/libkernel32.a -e _dll_entry@12
20
$DLLTOOL --as=$AS --dllname identd.dll --def identd.def --base-file\
21
identd.base --output-exp identd.exp
22
$LD --base-file identd.base identd.exp --dll -o identd.dll identd.o\
23
../init.o ../fixup.o $LIBPATH/libcygwin.a $LIBPATH/libkernel32.a -e _dll_entry@12
24
$DLLTOOL --as=$AS --dllname identd.dll --def identd.def --base-file\
25
identd.base --output-exp identd.exp
26
$LD identd.exp --dll -o identd.dll identd.o ../init.o ../fixup.o\
27
$LIBPATH/libcygwin.a $LIBPATH/libkernel32.a -e _dll_entry@12
28
29
# Build the identdB.a lib to link to:
30
$DLLTOOL --as=$AS --dllname identd.dll --def identd.def --output-lib identd.a
31
32
$RM *.base *.exp *.def
33
$CP *.dll ..
34
35