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