Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
BitchX
GitHub Repository: BitchX/BitchX1.3
Path: blob/master/dll/abot/abot.sh
1072 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 autobot.c
13
14
echo EXPORTS > autobot.def
15
$NM autobot.o ../init.o ../fixup.o | grep '^........ [T] _' | sed 's/[^_]*_//' >> autobot.def
16
17
# Link DLL.
18
$LD --base-file autobot.base --dll -o autobot.dll autobot.o ../init.o ../fixup.o\
19
$LIBPATH/libcygwin.a $LIBPATH/libkernel32.a -e _dll_entry@12
20
$DLLTOOL --as=$AS --dllname autobot.dll --def autobot.def --base-file\
21
autobot.base --output-exp autobot.exp
22
$LD --base-file autobot.base autobot.exp --dll -o autobot.dll autobot.o\
23
../init.o ../fixup.o $LIBPATH/libcygwin.a $LIBPATH/libkernel32.a -e _dll_entry@12
24
$DLLTOOL --as=$AS --dllname autobot.dll --def autobot.def --base-file\
25
autobot.base --output-exp autobot.exp
26
$LD autobot.exp --dll -o autobot.dll autobot.o ../init.o ../fixup.o\
27
$LIBPATH/libcygwin.a $LIBPATH/libkernel32.a -e _dll_entry@12
28
29
# Build the autobotB.a lib to link to:
30
$DLLTOOL --as=$AS --dllname autobot.dll --def autobot.def --output-lib autobot.a
31
32
$RM *.base *.exp *.def
33
$CP *.dll ..
34
35