Jump to content


Compiler optimization


Recommended Posts

this is my CmakeLists.txt. this addlibrary bit was all on one line but i formmated it better. i also got this from hex a few years ago and have been using it fine ever since, but you may want to tweak the makefile that gets generated by this script

ADD_LIBRARY(jampgamei386 SHARED NPC.c ai_main.c bg_saber.c g_bot.c g_mem.c g_spawn.c 
g_turret_G2.c NPC_AI_Grenadier.c NPC_AI_Remote.c NPC_combat.c NPC_utils.c ai_util.c 
bg_saberLoad.c g_client.c g_misc.c g_strap.c g_utils.c NPC_AI_Howler.c NPC_AI_Seeker.c 
NPC_goal.c q_math.c ai_wpnav.c bg_saga.c g_cmds.c g_missile.c  g_svcmds.c g_vehicles.c       
NPC_AI_ImperialProbe.c NPC_AI_Sentry.c NPC_misc.c q_shared.c AnimalNPC.c bg_slidemove.c 
g_combat.c g_mover.c g_syscalls.c g_vehicleTurret.c NPC_AI_Interrogator.c NPC_AI_Sniper.c
 NPC_move.c SpeederNPC.c bg_g2_utils.c bg_vehicleLoad.c g_exphysics.c g_nav.c g_target.c g_weapon.c 
 NPC_AI_Jedi.c NPC_AI_Stormtrooper.c NPC_reactions.c  tri_coll_test.c bg_lib.c bg_weapons.c
  g_ICARUScb.c g_navnew.c g_team.c NPC_AI_Atst.c NPC_AI_Mark1.c NPC_AI_Utils.c NPC_senses.c WalkerNPC.c 
  bg_misc.c FighterNPC.c g_items.c g_object.c g_timer.c NPC_AI_Default.c NPC_AI_Mark2.c NPC_AI_Wampa.c 
  NPC_sounds.c w_force.c bg_panimate.c g_active.c g_log.c g_saga.c g_trigger.c NPC_AI_Droid.c
   NPC_AI_MineMonster.c NPC_behavior.c NPC_spawn.c w_saber.c bg_pmove.c g_arenas.c g_main.c 
g_session.c  g_turret.c NPC_AI_GalakMech.c NPC_AI_Rancor.c NPC_stats.c  g_jk2pp.c)

Link to comment
Share on other sites

ps. if you use the universal source from lucasfiles, there is a problem with a few lines on the client side .dll, if you need to i can post the fix for that too which lets you use the same tree on linux and windows, but you need to change some stuff for mac

Link to comment
Share on other sites

Quick question, why would you want to compile client side code for Linux? It wouldn't work anyways right? Linux can only support the server portion of the game I thought.


when you run windows binarys in WINE it automatically wraps windows system calls to linux ones. As a boon to this you can also manually specify what windows librarys correspond to what linux librarys


so, if you compile a cgamex86.so and specify that all calls to jampcgamex86.dll should wrap directly to cgamex86.so you will probably get a decent speed increase since the library isn't being run on top of wine but the .exe still is

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...