Skip to content

Commit aff3507

Browse files
committed
Fixed compile scripts
1 parent aeb37ec commit aff3507

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

build_unix.sh

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
cd bin
1+
cd bin/unix
22
#!/bin/bash
3-
NAME='mysql'
3+
LIBNAME='cod4x_mysql.so'
44

5-
#Compiling: release
6-
echo `gcc -m32 -Wall -O1 -s -fvisibility=hidden -mtune=core2 -I../mysql/unix/include -c ../*.c`
5+
echo Compiling...
6+
gcc -m32 -O3 -Wall -Wattributes -fPIC -s -fvisibility=hidden -I../../mysql/unix/include -c ../../*.c
77

8-
#Linking
9-
echo `gcc -m32 -s -shared -fvisibility=hidden -L../mysql/unix/lib -lmysqlclient -o $NAME''.so *.o`
8+
echo Linking...
9+
gcc -m32 -O3 -s -shared -fvisibility=hidden -o $LIBNAME *.o ../../mysql/unix/lib/libmysqlclient.a
1010

11-
#Cleaning up
12-
echo `rm *.o`
11+
echo Cleaning up...
12+
rm *.o
13+
14+
echo Done.
15+
16+
cd ../..

build_win32.bat

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
cd bin/win32
33
set LIBNAME="cod4x_mysql.dll"
44

5-
echo Compile...
6-
gcc -O3 -Wall -I../../mysql/windows/include -c ../../*.c
5+
echo Compiling...
6+
gcc -O3 -Wall -s -fvisibility=hidden -I../../mysql/windows/include -c ../../*.c
77

8-
echo Link...
9-
gcc -O3 -shared -o %LIBNAME% *.o ../../mysql/windows/lib/libmysql.lib ../../../libcom_plugin.a
8+
echo Linking...
9+
gcc -O3 -s -shared -fvisibility=hidden -o %LIBNAME% *.o ../../mysql/windows/lib/libmysql.lib ../../../libcom_plugin.a
1010

11-
echo Cleanup...
11+
echo Cleaning up...
1212
del *.o
1313

1414
echo Done.
1515

16-
cd ..
16+
cd ../..

0 commit comments

Comments
 (0)