diff -Naur src.old/daemon/Makefile src/daemon/Makefile
--- src.old/daemon/Makefile	2010-04-01 00:36:46.000000000 +0800
+++ src/daemon/Makefile	2011-07-10 00:09:15.352396143 +0800
@@ -28,7 +28,7 @@
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -fomit-frame-pointer -Wunused -I../include" LDFLAGS="-s -L../lib -ldao" $(EXE)
 
 linux:
-	@$(MAKE) CC=gcc CFLAGS="-DLINUX -O2 -pipe -I../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../lib -ldao -lcrypt -lresolv" $(EXE)
+	@$(MAKE) CC=gcc CFLAGS="-m32 -DLINUX -O2 -pipe -I../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../lib -ldao -lcrypt -lresolv" $(EXE)
 
 solaris:
 	@$(MAKE) CC=gcc CFLAGS="-DSOLARIS -O2 -pipe -I../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../lib -ldao -lsocket -lresolv -lnsl -L/usr/ucblib -lucb -R/usr/ucblib" $(EXE)
diff -Naur src.old/game/Makefile src/game/Makefile
--- src.old/game/Makefile	2010-04-01 00:36:46.000000000 +0800
+++ src/game/Makefile	2011-07-10 00:17:30.647396277 +0800
@@ -22,7 +22,7 @@
 .SUFFIXES: .c .o .so
 
 .c.o:	;  $(CC) $(CFLAGS) -c $*.c
-.o.so:	;  ld -s -G $*.o -o $*.so -L../lib -ldao
+.o.so:	;  ld -s -G $*.o -o $*.so -L../lib -ldao -melf_i386
 
 
 all: 
@@ -39,7 +39,7 @@
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -fomit-frame-pointer -Wunused -I../include" $(SO)
 
 linux:
-	@$(MAKE) CC=gcc CFLAGS="-DLINUX -O2 -pipe -fomit-frame-pointer -Wunused -I../include" $(SO)
+	@$(MAKE) CC=gcc CFLAGS="-m32 -DLINUX -O2 -pipe -fomit-frame-pointer -Wunused -I../include" $(SO)
 
 solaris:
 	@$(MAKE) CC=gcc CFLAGS="-DSOLARIS -DSYSV -O2 -pipe -fomit-frame-pointer -Wunused -I../include" $(SO)
diff -Naur src.old/innbbsd/Makefile src/innbbsd/Makefile
--- src.old/innbbsd/Makefile	2010-04-01 00:36:47.000000000 +0800
+++ src/innbbsd/Makefile	2011-07-10 00:15:19.002396245 +0800
@@ -35,7 +35,7 @@
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -fomit-frame-pointer -Wunused -I../include" LDFLAGS="-s -L../lib -ldao" $(EXE)
 
 linux:
-	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -I../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../lib -ldao" $(EXE)
+	@$(MAKE) CC=gcc CFLAGS="-m32 -O2 -pipe -I../include -fomit-frame-pointer -Wunused" LDFLAGS="-m32 -melf_i386 -s -L../lib -ldao" $(EXE)
 
 solaris:
 	@$(MAKE) CC=gcc CFLAGS="-DSOLARIS -O2 -pipe -I../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../lib -ldao -lsocket -lnsl -L/usr/ucblib -lucb" $(EXE)
diff -Naur src.old/innbbsd.new/Makefile src/innbbsd.new/Makefile
--- src.old/innbbsd.new/Makefile	2010-04-01 00:36:48.000000000 +0800
+++ src/innbbsd.new/Makefile	2011-07-10 00:12:46.315396204 +0800
@@ -35,7 +35,7 @@
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -fomit-frame-pointer -Wunused -I../include" LDFLAGS="-s -L../lib -ldao" $(EXE)
 
 linux:
-	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -I../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../lib -ldao" $(EXE)
+	@$(MAKE) CC=gcc CFLAGS="-m32 -O2 -pipe -I../include -fomit-frame-pointer -Wunused" LDFLAGS="-melf_i386 -s -L../lib -ldao" $(EXE)
 
 solaris:
 	@$(MAKE) CC=gcc CFLAGS="-DSOLARIS -O2 -pipe -I../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../lib -ldao -lsocket -lnsl -L/usr/ucblib -lucb" $(EXE)
diff -Naur src.old/lib/Makefile src/lib/Makefile
--- src.old/lib/Makefile	2010-04-01 00:36:48.000000000 +0800
+++ src/lib/Makefile	2011-07-10 00:12:46.443396201 +0800
@@ -11,7 +11,7 @@
 CC	= gcc
 RANLIB	= ranlib
 CPROTO	= cproto -E"gcc -pipe -E" -I../include # -s -v
-CFLAGS	= -O2 -s -pipe -fomit-frame-pointer -Wunused -I../include
+CFLAGS	= -O2 -s -pipe -fomit-frame-pointer -Wunused -I../include -m32
 
 
 # ------------------------------------------------------ #
diff -Naur src.old/maple/Makefile src/maple/Makefile
--- src.old/maple/Makefile	2010-04-01 00:36:45.000000000 +0800
+++ src/maple/Makefile	2011-07-10 00:16:03.754396252 +0800
@@ -37,7 +37,7 @@
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -fomit-frame-pointer -Wunused -I../include" LDFLAGS="-s -L../lib -ldao" $(EXE)
 
 linux:
-	@$(MAKE) CC=gcc CFLAGS="-DLINUX -O2 -pipe -fomit-frame-pointer -Wunused -I../include" LDFLAGS="-s -L../lib -ldao -lcrypt -lresolv -ldl -rdynamic" $(EXE)
+	@$(MAKE) CC=gcc CFLAGS="-m32 -DLINUX -O2 -pipe -fomit-frame-pointer -Wunused -I../include" LDFLAGS="-m32 -melf_i386 -s -L../lib -ldao -lcrypt -lresolv -ldl -rdynamic" $(EXE)
 
 solaris:
 	@$(MAKE) CC=gcc CFLAGS="-DSOLARIS -DSYSV -O2 -pipe -fomit-frame-pointer -Wunused -I../include" LDFLAGS="-s -L../lib -ldao -ltermcap -lsocket -lnsl -lresolv -lelf -ldl" $(EXE)
diff -Naur src.old/pip/Makefile src/pip/Makefile
--- src.old/pip/Makefile	2010-04-01 00:36:52.000000000 +0800
+++ src/pip/Makefile	2011-07-10 00:18:12.699396295 +0800
@@ -35,7 +35,7 @@
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -fomit-frame-pointer -Wunused -I../include" $(SO)
 
 linux:
-	@$(MAKE) CC=gcc CFLAGS="-DLINUX -O2 -pipe -fomit-frame-pointer -Wunused -I../include" $(SO)
+	@$(MAKE) CC=gcc CFLAGS="-m32 -DLINUX -O2 -pipe -fomit-frame-pointer -Wunused -I../include" $(SO)
 
 solaris:
 	@$(MAKE) CC=gcc CFLAGS="-DSOLARIS -DSYSV -O2 -pipe -fomit-frame-pointer -Wunused -I../include" $(SO)
@@ -54,7 +54,7 @@
 
 
 pip.so: $(OBJ)
-	ld -s -G $(OBJ) -o pip.so -L../lib -ldao
+	ld -s -G $(OBJ) -o pip.so -L../lib -ldao -melf_i386
 
 
 install: $(SO)
diff -Naur src.old/so/Makefile src/so/Makefile
--- src.old/so/Makefile	2010-04-01 00:36:48.000000000 +0800
+++ src/so/Makefile	2011-07-10 00:17:02.133396268 +0800
@@ -22,7 +22,7 @@
 .SUFFIXES: .c .o .so
 
 .c.o:	;  $(CC) $(CFLAGS) -c $*.c
-.o.so:	;  ld -s -G $*.o -o $*.so -L../lib -ldao
+.o.so:	;  ld -s -G $*.o -o $*.so -L../lib -ldao -melf_i386
 
 
 all: 
@@ -39,7 +39,7 @@
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -fomit-frame-pointer -Wunused -I../include" $(SO)
 
 linux:
-	@$(MAKE) CC=gcc CFLAGS="-DLINUX -O2 -pipe -fomit-frame-pointer -Wunused -I../include" $(SO)
+	@$(MAKE) CC=gcc CFLAGS="-m32 -DLINUX -O2 -pipe -fomit-frame-pointer -Wunused -I../include" $(SO)
 
 solaris:
 	@$(MAKE) CC=gcc CFLAGS="-DSOLARIS -DSYSV -O2 -pipe -fomit-frame-pointer -Wunused -I../include" $(SO)
diff -Naur src.old/util/backup/Makefile src/util/backup/Makefile
--- src.old/util/backup/Makefile	2010-04-01 00:36:49.000000000 +0800
+++ src/util/backup/Makefile	2011-07-10 00:19:36.007396313 +0800
@@ -29,7 +29,7 @@
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -fomit-frame-pointer -Wunused -I../../include" LDFLAGS="-s -L../../lib -ldao" $(EXE)
 
 linux:
-	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -I../../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../../lib -ldao" $(EXE)
+	@$(MAKE) CC=gcc CFLAGS="-m32 -O2 -pipe -I../../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../../lib -ldao" $(EXE)
 
 solaris:
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -I../../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../../lib -ldao -lsocket -lnsl -L/usr/ucblib -lucb" $(EXE)
diff -Naur src.old/util/Makefile src/util/Makefile
--- src.old/util/Makefile	2010-04-01 00:36:49.000000000 +0800
+++ src/util/Makefile	2011-07-10 00:19:07.303396304 +0800
@@ -31,7 +31,7 @@
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -fomit-frame-pointer -Wunused -I../include" LDFLAGS="-s -L../lib -ldao" $(EXE)
 
 linux:
-	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -I../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../lib -ldao -lcrypt -lresolv" $(EXE)
+	@$(MAKE) CC=gcc CFLAGS="-m32 -O2 -pipe -I../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../lib -ldao -lcrypt -lresolv" $(EXE)
 
 solaris:
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -I../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../lib -ldao -lsocket -lresolv -lnsl -L/usr/ucblib -lucb -R/usr/ucblib" $(EXE)
diff -Naur src.old/util/tran/Makefile src/util/tran/Makefile
--- src.old/util/tran/Makefile	2010-04-01 00:36:49.000000000 +0800
+++ src/util/tran/Makefile	2011-07-10 00:19:56.979396320 +0800
@@ -36,7 +36,7 @@
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -fomit-frame-pointer -Wunused -I../../include" LDFLAGS="-s -L../../lib -ldao" $(EXE)
 
 linux:
-	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -I../../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../../lib -ldao" $(EXE)
+	@$(MAKE) CC=gcc CFLAGS="-m32 -O2 -pipe -I../../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../../lib -ldao" $(EXE)
 
 solaris:
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -I../../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../../lib -ldao -lsocket -lnsl -L/usr/ucblib -lucb" $(EXE)
diff -Naur src.old/util/uno/Makefile src/util/uno/Makefile
--- src.old/util/uno/Makefile	2010-04-01 00:36:49.000000000 +0800
+++ src/util/uno/Makefile	2011-07-10 00:20:22.469396327 +0800
@@ -29,7 +29,7 @@
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -fomit-frame-pointer -Wunused -I../../include" LDFLAGS="-s -L../../lib -ldao" $(EXE)
 
 linux:
-	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -I../../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../../lib -ldao" $(EXE)
+	@$(MAKE) CC=gcc CFLAGS="-m32 -O2 -pipe -I../../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../../lib -ldao" $(EXE)
 
 solaris:
 	@$(MAKE) CC=gcc CFLAGS="-O2 -pipe -I../../include -fomit-frame-pointer -Wunused" LDFLAGS="-s -L../../lib -ldao -lsocket -lnsl -L/usr/ucblib -lucb" $(EXE)
