HPB_bot2_i486.so, HPBot2 ver 0.5 release 106 |
HPB_bot2_i486.so, HPBot2 ver 0.5 release 106 |
bir3yk |
Jul 21 2009, 12:03 PM
Post
#1
|
RCBot Fan Group: Members Posts: 107 Joined: 4-June 09 Member No.: 1,566 |
I compiled a linux RCBot2 0.5
1. Folder Structure : .../hl2 .../orangebox <-- srcds_run is here (for TF2 and Orange-Box games) .../orangebox/bin <-- HPB_bot2_i486.so files copied here .../rcbot2/ .../rcbot2/config/ .../rcbot2/profiles/ .../rcbot2/waypoints/ .../rcbot2/waypoints/orangebox/tf/ <-- waypoint and scripts files copied here .../steam 2. Edit .../rcbot2/config/bot_mods.ini mod = TF2 steamdir = orangebox gamedir = tf bot = TF2 3. Add ./srcds_run ..............+plugin_load ../bin/HPB_bot2 146 SVN revisions 119 SVN revisions RCbot2 0.52 121 SVN revisions 121 SVN revisions RCbot2 0.53 122 SVN revisions 122 SVN revisions 124 SVN revisions 124 SVN revisions 126 SVN revisions 126 SVN revisions 146 SVN revisions 146 SVN revisions |
bir3yk |
May 31 2010, 03:27 PM
Post
#2
|
RCBot Fan Group: Members Posts: 107 Joined: 4-June 09 Member No.: 1,566 |
Makefile
CODE # # SDK Makefile for x86 Linux # # ############################################################################# # Developer configurable items ############################################################################# # the name of the mod binary (_i486.so is appended to the end) #NAME=server NAME=HPB_bot2 # the location of the vcproj that builds the mod #MOD_PROJ=../game/server/server_hl2mp-2005.vcproj MOD_PROJ=../utils/RCBot2/HPB_Bot2.vcproj # the name of the mod configuration (typically <proj name>_<build type><build target>) #MOD_CONFIG=ServerHL2MP_ReleaseWin32 MOD_CONFIG=HPB_bot2_ReleaseWin32 # the directory the base binaries (tier0_i486.so, etc) are located # this should point to your orange box subfolder of where you have srcds installed. #GAME_DIR=~/srcds/orangebox GAME_DIR=/home/hlds/steam/orangebox # the path to your mods directory # set this so that 'make install' or 'make installrelease' will copy your binary over automatically. #MOD_DIR=$(GAME_DIR)/SampleMod MOD_DIR=$(GAME_DIR)/ # compiler options (gcc 3.4.1 will work - 4.2.2 recommended) #CC=/usr/local/bin/gcc #CPLUS=/usr/local/bin/g++ #CLINK=/usr/local/bin/gcc #CPP_LIB="/usr/local/lib/libstdc++.a /usr/local/lib/gcc/i686-pc-linux-gnu/4.2.2/libgcc_eh.a" #CC=/usr/bin/gcc #CPLUS=/usr/bin/g++-4.1 #CLINK=/usr/bin/gcc-4.1 CPP_LIB=" /usr/lib/gcc/i486-linux-gnu/4.1.3/libstdc++.a /usr/lib/gcc/i486-linux-gnu/4.1.3/libgcc_eh.a" CC = /usr/bin/gcc-4.1 CPLUS = /usr/bin/g++-4.1 CLINK = /usr/bin/gcc-4.1 #CPP_LIB = "libstdc++.a libgcc_eh.a" # GCC 4.2.2 optimization flags, if you're using anything below, don't use these! #OPTFLAGS=-O1 -fomit-frame-pointer -ffast-math -fforce-addr -funroll-loops -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm -fexpensive-optimizations -frerun-cse-after-loop -fcaller-saves -fpeephole2 -fschedule-insns2 -fsched-interblock -fsched-spec -fregmove -fstrict-overflow -fdelete-null-pointer-checks -freorder-blocks -freorder-functions -falign-functions -falign-jumps -falign-loops -falign-labels -ftree-vrp -ftree-pre -finline-functions -funswitch-loops -fgcse-after-reload OPTFLAGS=-O1 -fomit-frame-pointer -ffast-math -fforce-addr -funroll-loops -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm -fexpensive-optimizations -frerun-cse-after-loop -fcaller-saves -fpeephole2 -fschedule-insns2 -fsched-interblock -fsched-spec -fregmove -fdelete-null-pointer-checks -freorder-blocks -freorder-functions -falign-functions -falign-jumps -falign-loops -falign-labels -ftree-vrp -ftree-pre -finline-functions -funswitch-loops -fgcse-after-reload #OPTFLAGS= # put any compiler flags you want passed here USER_CFLAGS= # Link Libraries #LIBFILES= \ # $(LIB_DIR)/lib/linux/tier1_486.a \ # $(LIB_DIR)/lib/linux/choreoobjects_486.a \ # $(LIB_DIR)/lib/linux/particles_486.a \ # $(LIB_DIR)/lib/linux/dmxloader_486.a \ # libtier0.so \ # libvstdlib.so \ # libsteam_api.so \ # $(LIB_DIR)/lib/linux/tier3_486.a \ # $(LIB_DIR)/lib/linux/tier2_486.a \ # $(LIB_DIR)/lib/linux/tier1_486.a \ # $(LIB_DIR)/lib/linux/mathlib_486.a \ # link flags for your mod, make sure to include any special libraries here #NOTE: YES we want to include the lib files 2 times. We've run into problems with the 1-pass linker not bringing in symbols it should. #LDFLAGS="-lm -ldl $(LIBFILES) $(LIBFILES)" LIB_DIR = $(SOURCE_DIR)/lib/linux LDFLAGS = "-lm -ldl $(LIB_DIR)/mathlib_i486.a libtier0.so libvstdlib.so $(LIB_DIR)/tier1_i486.a $(LIB_DIR)/tier2_i486.a $(LIB_DIR)/tier3_i486.a " # XERCES 2.6.0 or above ( [url=http://xml.apache.org/xerces-c/]http://xml.apache.org/xerces-c/[/url] ) is used by the vcproj to makefile converter # it must be installed before being able to run this makefile # if you have xerces installed already you should be able to use the two lines below #XERCES_INC_DIR=/usr/include #XERCES_LIB_DIR=/usr/lib XERCES_INC_DIR=/opt/include XERCES_LIB_DIR=/opt/lib ############################################################################# # Things below here shouldn't need to be altered ############################################################################# MAKE=make # the dir we want to put binaries we build into BUILD_DIR=. # the place to put object files BUILD_OBJ_DIR=$(BUILD_DIR)/obj # the location of the source code SOURCE_DIR=.. # the CPU target for the build, must be i486 for now ARCH=i486 ARCH_CFLAGS=-mtune=i686 -march=pentium -mmmx -msse -pipe # -fpermissive is so gcc 3.4.x doesn't complain about some template stuff BASE_CFLAGS=-DVPROF_LEVEL=1 -DSWDS -D_LINUX -DLINUX -DNDEBUG -fpermissive -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp SHLIBEXT=so SHLIBCFLAGS=-fPIC SHLIBLDFLAGS=-shared -Wl,-Map,$@_map.txt -Wl #flags passed to the compiler CFLAGS="$(USER_CFLAGS) $(DEFINES) $(ARCH_CFLAGS) $(OPTFLAGS) $(BASE_CFLAGS) -Usprintf=use_Q_snprintf_instead_of_sprintf -Ustrncpy=use_Q_strncpy_instead -Ufopen=dont_use_fopen -UPROTECTED_THINGS_ENABLE" # define list passed to make for the sub makefile BASE_DEFINES=CC=$(CC) CPLUS=$(CPLUS) CPP_LIB=$(CPP_LIB) \ BUILD_DIR=$(BUILD_DIR) BUILD_OBJ_DIR=$(BUILD_OBJ_DIR) \ SOURCE_DIR=$(SOURCE_DIR) SHLIBLDFLAGS=$(SHLIBLDFLAGS) SHLIBEXT=$(SHLIBEXT) \ CLINK=$(CLINK) CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) \ ARCH=$(ARCH) GAME_DIR=$(GAME_DIR) MOD_CONFIG=$(MOD_CONFIG) NAME=$(NAME) \ XERCES_INC_DIR=$(XERCES_INC_DIR) XERCES_LIB_DIR=$(XERCES_LIB_DIR) # Project Makefile MAKE_MOD=Makefile.server MAKE_VCPM=Makefile.vcpm MAKE_PLUGIN=Makefile.plugin all: check vcpm server check: if [ -z "$(CC)" ]; then echo "Compiler not defined."; exit; fi if [ ! -d $(BUILD_DIR) ];then mkdir $(BUILD_DIR);fi cd $(BUILD_DIR) vcpm: $(MAKE) -f $(MAKE_VCPM) $(BASE_DEFINES) server: vcpm if [ ! -f "libtier0.so" ]; then ln -s $(GAME_DIR)/bin/libtier0.so .; fi if [ ! -f "libvstdlib.so" ]; then ln -s $(GAME_DIR)/bin/libvstdlib.so .; fi # if [ ! -f "libsteam_api.so" ]; then ln -s $(GAME_DIR)/bin/libsteam_api.so .; fi # When running over samba we need to copy the files because symlinking isn't possible. # cp -f $(GAME_DIR)/bin/tier0_i486.so . # cp -f $(GAME_DIR)/bin/vstdlib_i486.so . # cp -f $(GAME_DIR)/bin/steam_api_i486.so . ./vcpm $(MOD_PROJ) $(MAKE) -f $(MAKE_MOD) $(BASE_DEFINES) plugin: $(MAKE) -f $(MAKE_PLUGIN) $(BASE_DEFINES) clean: $(MAKE) -f $(MAKE_VCPM) $(BASE_DEFINES) clean $(MAKE) -f $(MAKE_PLUGIN) $(BASE_DEFINES) clean $(MAKE) -f $(MAKE_MOD) $(BASE_DEFINES) clean install: cp -f $(NAME)_$(ARCH).so $(MOD_DIR)/bin/$(NAME)_$(ARCH).so installrelease: cp -f $(NAME)_$(ARCH).so $(MOD_DIR)/bin/$(NAME)_$(ARCH).so strip $(MOD_DIR)/bin/$(NAME)_$(ARCH).so |
xomp |
Jun 18 2010, 09:03 PM
Post
#3
|
Member Group: Members Posts: 26 Joined: 23-April 10 Member No.: 1,812 |
Makefile CODE # # SDK Makefile for x86 Linux # # ############################################################################# # Developer configurable items ############################################################################# # the name of the mod binary (_i486.so is appended to the end) #NAME=server NAME=HPB_bot2 # the location of the vcproj that builds the mod #MOD_PROJ=../game/server/server_hl2mp-2005.vcproj MOD_PROJ=../utils/RCBot2/HPB_Bot2.vcproj # the name of the mod configuration (typically <proj name>_<build type><build target>) #MOD_CONFIG=ServerHL2MP_ReleaseWin32 MOD_CONFIG=HPB_bot2_ReleaseWin32 # the directory the base binaries (tier0_i486.so, etc) are located # this should point to your orange box subfolder of where you have srcds installed. #GAME_DIR=~/srcds/orangebox GAME_DIR=/home/hlds/steam/orangebox # the path to your mods directory # set this so that 'make install' or 'make installrelease' will copy your binary over automatically. #MOD_DIR=$(GAME_DIR)/SampleMod MOD_DIR=$(GAME_DIR)/ # compiler options (gcc 3.4.1 will work - 4.2.2 recommended) #CC=/usr/local/bin/gcc #CPLUS=/usr/local/bin/g++ #CLINK=/usr/local/bin/gcc #CPP_LIB="/usr/local/lib/libstdc++.a /usr/local/lib/gcc/i686-pc-linux-gnu/4.2.2/libgcc_eh.a" #CC=/usr/bin/gcc #CPLUS=/usr/bin/g++-4.1 #CLINK=/usr/bin/gcc-4.1 CPP_LIB=" /usr/lib/gcc/i486-linux-gnu/4.1.3/libstdc++.a /usr/lib/gcc/i486-linux-gnu/4.1.3/libgcc_eh.a" CC = /usr/bin/gcc-4.1 CPLUS = /usr/bin/g++-4.1 CLINK = /usr/bin/gcc-4.1 #CPP_LIB = "libstdc++.a libgcc_eh.a" # GCC 4.2.2 optimization flags, if you're using anything below, don't use these! #OPTFLAGS=-O1 -fomit-frame-pointer -ffast-math -fforce-addr -funroll-loops -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm -fexpensive-optimizations -frerun-cse-after-loop -fcaller-saves -fpeephole2 -fschedule-insns2 -fsched-interblock -fsched-spec -fregmove -fstrict-overflow -fdelete-null-pointer-checks -freorder-blocks -freorder-functions -falign-functions -falign-jumps -falign-loops -falign-labels -ftree-vrp -ftree-pre -finline-functions -funswitch-loops -fgcse-after-reload OPTFLAGS=-O1 -fomit-frame-pointer -ffast-math -fforce-addr -funroll-loops -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm -fexpensive-optimizations -frerun-cse-after-loop -fcaller-saves -fpeephole2 -fschedule-insns2 -fsched-interblock -fsched-spec -fregmove -fdelete-null-pointer-checks -freorder-blocks -freorder-functions -falign-functions -falign-jumps -falign-loops -falign-labels -ftree-vrp -ftree-pre -finline-functions -funswitch-loops -fgcse-after-reload #OPTFLAGS= # put any compiler flags you want passed here USER_CFLAGS= # Link Libraries #LIBFILES= \ # $(LIB_DIR)/lib/linux/tier1_486.a \ # $(LIB_DIR)/lib/linux/choreoobjects_486.a \ # $(LIB_DIR)/lib/linux/particles_486.a \ # $(LIB_DIR)/lib/linux/dmxloader_486.a \ # libtier0.so \ # libvstdlib.so \ # libsteam_api.so \ # $(LIB_DIR)/lib/linux/tier3_486.a \ # $(LIB_DIR)/lib/linux/tier2_486.a \ # $(LIB_DIR)/lib/linux/tier1_486.a \ # $(LIB_DIR)/lib/linux/mathlib_486.a \ # link flags for your mod, make sure to include any special libraries here #NOTE: YES we want to include the lib files 2 times. We've run into problems with the 1-pass linker not bringing in symbols it should. #LDFLAGS="-lm -ldl $(LIBFILES) $(LIBFILES)" LIB_DIR = $(SOURCE_DIR)/lib/linux LDFLAGS = "-lm -ldl $(LIB_DIR)/mathlib_i486.a libtier0.so libvstdlib.so $(LIB_DIR)/tier1_i486.a $(LIB_DIR)/tier2_i486.a $(LIB_DIR)/tier3_i486.a " # XERCES 2.6.0 or above ( [url=http://xml.apache.org/xerces-c/]http://xml.apache.org/xerces-c/[/url] ) is used by the vcproj to makefile converter # it must be installed before being able to run this makefile # if you have xerces installed already you should be able to use the two lines below #XERCES_INC_DIR=/usr/include #XERCES_LIB_DIR=/usr/lib XERCES_INC_DIR=/opt/include XERCES_LIB_DIR=/opt/lib ############################################################################# # Things below here shouldn't need to be altered ############################################################################# MAKE=make # the dir we want to put binaries we build into BUILD_DIR=. # the place to put object files BUILD_OBJ_DIR=$(BUILD_DIR)/obj # the location of the source code SOURCE_DIR=.. # the CPU target for the build, must be i486 for now ARCH=i486 ARCH_CFLAGS=-mtune=i686 -march=pentium -mmmx -msse -pipe # -fpermissive is so gcc 3.4.x doesn't complain about some template stuff BASE_CFLAGS=-DVPROF_LEVEL=1 -DSWDS -D_LINUX -DLINUX -DNDEBUG -fpermissive -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp SHLIBEXT=so SHLIBCFLAGS=-fPIC SHLIBLDFLAGS=-shared -Wl,-Map,$@_map.txt -Wl #flags passed to the compiler CFLAGS="$(USER_CFLAGS) $(DEFINES) $(ARCH_CFLAGS) $(OPTFLAGS) $(BASE_CFLAGS) -Usprintf=use_Q_snprintf_instead_of_sprintf -Ustrncpy=use_Q_strncpy_instead -Ufopen=dont_use_fopen -UPROTECTED_THINGS_ENABLE" # define list passed to make for the sub makefile BASE_DEFINES=CC=$(CC) CPLUS=$(CPLUS) CPP_LIB=$(CPP_LIB) \ BUILD_DIR=$(BUILD_DIR) BUILD_OBJ_DIR=$(BUILD_OBJ_DIR) \ SOURCE_DIR=$(SOURCE_DIR) SHLIBLDFLAGS=$(SHLIBLDFLAGS) SHLIBEXT=$(SHLIBEXT) \ CLINK=$(CLINK) CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) \ ARCH=$(ARCH) GAME_DIR=$(GAME_DIR) MOD_CONFIG=$(MOD_CONFIG) NAME=$(NAME) \ XERCES_INC_DIR=$(XERCES_INC_DIR) XERCES_LIB_DIR=$(XERCES_LIB_DIR) # Project Makefile MAKE_MOD=Makefile.server MAKE_VCPM=Makefile.vcpm MAKE_PLUGIN=Makefile.plugin all: check vcpm server check: if [ -z "$(CC)" ]; then echo "Compiler not defined."; exit; fi if [ ! -d $(BUILD_DIR) ];then mkdir $(BUILD_DIR);fi cd $(BUILD_DIR) vcpm: $(MAKE) -f $(MAKE_VCPM) $(BASE_DEFINES) server: vcpm if [ ! -f "libtier0.so" ]; then ln -s $(GAME_DIR)/bin/libtier0.so .; fi if [ ! -f "libvstdlib.so" ]; then ln -s $(GAME_DIR)/bin/libvstdlib.so .; fi # if [ ! -f "libsteam_api.so" ]; then ln -s $(GAME_DIR)/bin/libsteam_api.so .; fi # When running over samba we need to copy the files because symlinking isn't possible. # cp -f $(GAME_DIR)/bin/tier0_i486.so . # cp -f $(GAME_DIR)/bin/vstdlib_i486.so . # cp -f $(GAME_DIR)/bin/steam_api_i486.so . ./vcpm $(MOD_PROJ) $(MAKE) -f $(MAKE_MOD) $(BASE_DEFINES) plugin: $(MAKE) -f $(MAKE_PLUGIN) $(BASE_DEFINES) clean: $(MAKE) -f $(MAKE_VCPM) $(BASE_DEFINES) clean $(MAKE) -f $(MAKE_PLUGIN) $(BASE_DEFINES) clean $(MAKE) -f $(MAKE_MOD) $(BASE_DEFINES) clean install: cp -f $(NAME)_$(ARCH).so $(MOD_DIR)/bin/$(NAME)_$(ARCH).so installrelease: cp -f $(NAME)_$(ARCH).so $(MOD_DIR)/bin/$(NAME)_$(ARCH).so strip $(MOD_DIR)/bin/$(NAME)_$(ARCH).so YAY A MAKEFILE FOR LINUX!!! |
Lo-Fi Version | Time is now: 4th November 2024 - 09:59 PM |