View Single Post
Re: compile GNU/Linux binaries in Windows
Old
  (#13)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: compile GNU/Linux binaries in Windows - 23-02-2005

"Can someone explain me how to compile with this EPB. It will be good to have a linux version."
just create a file named "Makefile" in your source directory, like this one:
PHP Code:
 CPP g++
TARGET epb
BASEFLAGS 
= -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp
OPTFLAGS 
= -DNDEBUG
CPPFLAGS 
= ${BASEFLAGS} ${OPTFLAGS} -O2 --I"./hlsdk"

OBJ =     bot.o
    bot_chat
.o
    bot_client
.o
    bot_combat
.o
    bot_globals
.o
    bot_sounds
.o
    compress
.o
    dll
.o
    engine
.o
    util
.o
    waypoint
.o

${TARGET}_i386.so: ${OBJ}
    ${
CPP} -fPIC -shared -static -$@ ${OBJ} -ldl -lm

clean
:
    
rm -*.o
    rm 
-*.map

%.o:    %.cpp
    
${CPP} ${CPPFLAGS} -$< -$@

%.
o:    %.c
    
${CPP} ${CPPFLAGS} -$< -$@ 
(note that you MUST have a backslash after each ".o" file; the forum has bugs which ate up all backslashes)

write all your .cpp files in the list, change all .cpp to .o.

Then install the compiler, start a DOS prompt, run the setvars.bat file first and change into your source dir. Then run "make" and it should produce a epb_i386.so file and that's it.
  
Reply With Quote