makepanda.py 190 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808
  1. #!/usr/bin/python
  2. ########################################################################
  3. #
  4. # Caution: there are two separate, independent build systems:
  5. # 'makepanda', and 'ppremake'. Use one or the other, do not attempt
  6. # to use both. This file is part of the 'makepanda' system.
  7. #
  8. # To build panda using this script, type 'makepanda.py' on unix
  9. # or 'makepanda.bat' on windows, and examine the help-text.
  10. # Then run the script again with the appropriate options to compile
  11. # panda3d.
  12. #
  13. ########################################################################
  14. import sys,os,time,stat,string,re,getopt,cPickle,fnmatch,threading,Queue
  15. from glob import glob
  16. ########################################################################
  17. ##
  18. ## PARSING THE COMMAND LINE OPTIONS
  19. ##
  20. ## You might be tempted to change the defaults by editing them
  21. ## here. Don't do it. Instead, create a script that compiles
  22. ## panda with your preferred options. Or, create
  23. ## a 'makepandaPreferences' file and put it into your python path.
  24. ##
  25. ########################################################################
  26. if (sys.platform == "win32"): COMPILERS=["MSVC7"]
  27. if (sys.platform == "linux2"): COMPILERS=["LINUXA"]
  28. COMPILER=COMPILERS[0]
  29. OPTIMIZE="3"
  30. INSTALLER=0
  31. GENMAN=0
  32. VERSION=0
  33. VERBOSE=1
  34. COMPRESSOR="zlib"
  35. PACKAGES=["PYTHON","ZLIB","PNG","JPEG","TIFF","VRPN","FMOD","NVIDIACG","HELIX","NSPR",
  36. "OPENSSL","FREETYPE","FFTW","MILES","MAYA6","MAYA65","MAYA7","MAX6","MAX7","MAX8",
  37. "BISON","FLEX","OPENCV","PANDATOOL","PANDAAPP","DX8","DX9"]
  38. OMIT=PACKAGES[:]
  39. WARNINGS=[]
  40. DIRECTXSDK = {}
  41. MAYASDK = {}
  42. MAXSDK = {}
  43. MAXSDKCS = {}
  44. PYTHONSDK=0
  45. STARTTIME=time.time()
  46. SLAVEFILE=0
  47. DEPENDENCYQUEUE=[]
  48. FILEDATECACHE = {}
  49. CXXINCLUDECACHE = {}
  50. SLAVEBUILD=0
  51. THREADCOUNT=0
  52. DXVERSIONS=["8","9"]
  53. MAYAVERSIONS=["6","65","7"]
  54. MAXVERSIONS=["6","7","8"]
  55. ##########################################################################################
  56. #
  57. # If there is a makepandaPreferences.py, import it
  58. #
  59. ##########################################################################################
  60. try:
  61. from makepandaPreferences import *
  62. except ImportError:
  63. pass
  64. ########################################################################
  65. ##
  66. ## Utility Routines
  67. ##
  68. ########################################################################
  69. def exit(msg):
  70. print "Elapsed Time: "+PrettyTime(time.time() - STARTTIME)
  71. print msg
  72. sys.stdout.flush()
  73. sys.stderr.flush()
  74. os._exit(1)
  75. def filedate(path):
  76. if FILEDATECACHE.has_key(path):
  77. return FILEDATECACHE[path]
  78. try: date = os.path.getmtime(path)
  79. except: date = 0
  80. FILEDATECACHE[path] = date
  81. return date
  82. def updatefiledate(path):
  83. try: date = os.path.getmtime(path)
  84. except: date = 0
  85. FILEDATECACHE[path] = date
  86. def chkolder(file,date,files):
  87. if type(files) == str:
  88. source = filedate(files)
  89. if (source==0):
  90. exit("Error: source file not readable: "+files)
  91. if (date < source):
  92. return 1
  93. return 0
  94. for sfile in files:
  95. if (chkolder(file,date,sfile)):
  96. return 1
  97. return 0
  98. def older(files,others):
  99. for file in files:
  100. date = filedate(file)
  101. if (date == 0):
  102. return 1
  103. elif (chkolder(file, date, others)):
  104. return 1
  105. return 0
  106. def xpaths(prefix,base,suffix):
  107. if type(base) == str:
  108. return prefix + base + suffix
  109. result = []
  110. for x in base:
  111. result.append(xpaths(prefix,x,suffix))
  112. return result
  113. if sys.platform == "win32":
  114. import _winreg
  115. def ListRegistryKeys(path):
  116. result=[]
  117. index=0
  118. try:
  119. key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, path, 0, _winreg.KEY_READ)
  120. while (1):
  121. result.append(_winreg.EnumKey(key, index))
  122. index = index + 1
  123. except: pass
  124. if (key!=0): _winreg.CloseKey(key)
  125. return result
  126. def GetRegistryKey(path, subkey):
  127. k1=0
  128. key=0
  129. try:
  130. key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, path, 0, _winreg.KEY_READ)
  131. k1, k2 = _winreg.QueryValueEx(key, subkey)
  132. except: pass
  133. if (key!=0): _winreg.CloseKey(key)
  134. return k1
  135. def oscmd(cmd):
  136. print cmd
  137. sys.stdout.flush()
  138. if sys.platform == "win32":
  139. exe = cmd.split()[0]+".exe"
  140. if os.path.isfile(exe)==0:
  141. for i in os.environ["PATH"].split(";"):
  142. if os.path.isfile(os.path.join(i, exe)):
  143. exe = os.path.join(i, exe)
  144. break
  145. if os.path.isfile(exe)==0:
  146. exit("Cannot find "+exe+" on search path")
  147. res = os.spawnl(os.P_WAIT, exe, cmd)
  148. else:
  149. res = os.system(cmd)
  150. if res != 0:
  151. exit("")
  152. def getbuilding(opts):
  153. building = 0
  154. for x in opts:
  155. if (x[:9]=="BUILDING_"): building = x[9:]
  156. return building
  157. def getoptlevel(opts,defval):
  158. for x in opts:
  159. if (x[:3]=="OPT"):
  160. n = int(x[3:])
  161. if (n > defval): defval = n
  162. return defval
  163. def PrettyTime(t):
  164. t = int(t)
  165. hours = t/3600
  166. t -= hours*3600
  167. minutes = t/60
  168. t -= minutes*60
  169. seconds = t
  170. if (hours): return str(hours)+" hours "+str(minutes)+" min"
  171. if (minutes): return str(minutes)+" min "+str(seconds)+" sec"
  172. return str(seconds)+" sec"
  173. def MakeDirectory(path):
  174. if os.path.isdir(path): return 0
  175. os.mkdir(path)
  176. def ReadFile(wfile):
  177. try:
  178. srchandle = open(wfile, "rb")
  179. data = srchandle.read()
  180. srchandle.close()
  181. return data
  182. except: exit("Cannot read "+wfile)
  183. def WriteFile(wfile,data):
  184. try:
  185. dsthandle = open(wfile, "wb")
  186. dsthandle.write(data)
  187. dsthandle.close()
  188. updatefiledate(wfile)
  189. except: exit("Cannot write "+wfile)
  190. def ConditionalWriteFile(dest,desiredcontents):
  191. try:
  192. rfile = open(dest, 'rb')
  193. contents = rfile.read(-1)
  194. rfile.close()
  195. except:
  196. contents=0
  197. if contents != desiredcontents:
  198. if VERBOSE:
  199. print "Regenerating file: "+dest
  200. sys.stdout.flush()
  201. WriteFile(dest,desiredcontents)
  202. def SetDifference(add, sub):
  203. set = {}
  204. for x in add: set[x]=1
  205. for x in sub:
  206. if (set.has_key(x)):
  207. del set[x]
  208. return set.keys()
  209. def PkgSelected(pkglist, pkg):
  210. if (pkglist.count(pkg)==0): return 0
  211. if (OMIT.count(pkg)): return 0
  212. return 1
  213. def DependencyQueue(fn, args, targets, sources, altsrc):
  214. DEPENDENCYQUEUE.append([fn,args,targets,sources, altsrc])
  215. ########################################################################
  216. ##
  217. ## Help with packages.
  218. ##
  219. ## Output some brief information to help someone understand what the
  220. ## package options are.
  221. ##
  222. ########################################################################
  223. def packageInfo():
  224. print """
  225. See panda3d/doc/INSTALL-PP for more detailed information.
  226. 3D modeling an painting packages:
  227. MAX6 3D Studio Max version 6
  228. MAX7 3D Studio Max version 7
  229. MAX8 3D Studio Max version 8
  230. MAYA6 Maya version 6
  231. MAYA65 Maya version 6.5
  232. MAYA7 Maya version 7
  233. Audio playback:
  234. FMOD f mod
  235. "http://www.fmod.org/"
  236. A music and sound effects library (including playback).
  237. (for .wav, .mp3 and other files)
  238. MILES Miles Sound System from RAD Game Tools
  239. "http://www.radgametools.com/default.htm"
  240. A proprietary (non-opensource) audio library.
  241. (for .wav, .mp3, and other files).
  242. Compression/decompression:
  243. ZLIB z lib
  244. "http://www.gzip.org/zlib"
  245. A commression/decomression library.
  246. (for .zip and similar files and data)
  247. Font manipulation:
  248. FREETYPE free type
  249. "http://www.freetype.org/"
  250. A font manipulation library.
  251. (for .ttf files).
  252. Image support libraries:
  253. JPEG Join Photographic Experts Group
  254. "http://www.ijg.org"
  255. An image library.
  256. (.jpg and .jpeg files)
  257. PNG Portable Network Graphics
  258. "http://www.libpng.org"
  259. An image library.
  260. (.png files)
  261. TIFF Tagged Image File Format
  262. "ftp://ftp.sgi.com/graphics/tiff"
  263. An image library.
  264. (.tiff files)
  265. Misc libraries:
  266. FFTW Fast Fourier Transform (in the West)
  267. "http://www.fftw.org/"
  268. A library for computing DFT in one or more dimensions.
  269. NVIDIACG nVidia cg
  270. "http://developer.nvidia.com/page/cg_main.html"
  271. (for .??? files)
  272. A library for gpu programming (shaders and such).
  273. Network communication:
  274. SSL Open Secure Socket Layer
  275. "http://www.openssl.org/"
  276. A network encryption library.
  277. NSPR Netscape Portable Runtime
  278. "http://www.mozilla.org/projects/nspr/"
  279. Used for network sockets and threading.
  280. User input:
  281. VRPN Virtual Reality Peripheral Network
  282. "http://www.cs.unc.edu/Research/vrpn/"
  283. A controller/peripheral input library.
  284. """
  285. exit("")
  286. ########################################################################
  287. ##
  288. ## Command-line parser.
  289. ##
  290. ## You can type "makepanda --help" to see all the options.
  291. ##
  292. ########################################################################
  293. def usage(problem):
  294. if (problem):
  295. print ""
  296. print problem
  297. print ""
  298. print "Makepanda generates a 'built' subdirectory containing a"
  299. print "compiled copy of Panda3D. Command-line arguments are:"
  300. print ""
  301. print " --help (print the help message you're reading now)"
  302. print " --package-info (help info about the optional packages)"
  303. print " --compiler X (currently, compiler can only be MSVC7,LINUXA)"
  304. print " --optimize X (optimization level can be 1,2,3,4)"
  305. print " --installer (build an installer)"
  306. print " --v1 X (set the major version number)"
  307. print " --v2 X (set the minor version number)"
  308. print " --v3 X (set the sequence version number)"
  309. print " --lzma (use lzma compression when building installer)"
  310. print " --slaves X (use the distributed build system. see manual)"
  311. print " --threads N (use the multithreaded build system. see manual)"
  312. print ""
  313. for pkg in PACKAGES:
  314. p = pkg.lower()
  315. print " --use-%-9s --no-%-9s (enable/disable use of %s)"%(p, p, pkg)
  316. print ""
  317. print " --nothing (disable every third-party lib)"
  318. print " --everything (enable every third-party lib)"
  319. print ""
  320. print " --quiet (print less output)"
  321. print " --verbose (print more output and debugging info)"
  322. print ""
  323. print "The simplest way to compile panda is to just type:"
  324. print ""
  325. print " makepanda --everything"
  326. print ""
  327. exit("")
  328. def parseopts(args):
  329. global COMPILER,OPTIMIZE,OMIT,INSTALLER,GENMAN,SLAVEBUILD
  330. global VERSION,COMPRESSOR,VERBOSE,SLAVEFILE,THREADCOUNT
  331. longopts = [
  332. "help","package-info","compiler=","slavebuild=",
  333. "optimize=","everything","nothing","installer","quiet","verbose",
  334. "version=","lzma","no-python","slaves=","threads="]
  335. anything = 0
  336. for pkg in PACKAGES: longopts.append("no-"+pkg.lower())
  337. for pkg in PACKAGES: longopts.append("use-"+pkg.lower())
  338. try:
  339. opts, extras = getopt.getopt(args, "", longopts)
  340. for option,value in opts:
  341. if (option=="--help"): raise "usage"
  342. elif (option=="--package-info"): raise "package-info"
  343. elif (option=="--compiler"): COMPILER=value
  344. elif (option=="--optimize"): OPTIMIZE=value
  345. elif (option=="--quiet"): VERBOSE-=1
  346. elif (option=="--verbose"): VERBOSE+=1
  347. elif (option=="--installer"): INSTALLER=1
  348. elif (option=="--genman"): GENMAN=1
  349. elif (option=="--everything"): OMIT=[]
  350. elif (option=="--nothing"): OMIT=PACKAGES[:]
  351. elif (option=="--slaves"): SLAVEFILE=value
  352. elif (option=="--threads"): THREADCOUNT=int(value)
  353. elif (option=="--slavebuild"): SLAVEBUILD=value
  354. elif (option=="--version"):
  355. VERSION=value
  356. if (len(VERSION.split(".")) != 3): raise "usage"
  357. elif (option=="--lzma"): COMPRESSOR="lzma"
  358. else:
  359. for pkg in PACKAGES:
  360. if (option=="--use-"+pkg.lower()):
  361. if (OMIT.count(pkg)): OMIT.remove(pkg)
  362. break
  363. for pkg in PACKAGES:
  364. if (option=="--no-"+pkg.lower()):
  365. if (OMIT.count(pkg)==0): OMIT.append(pkg)
  366. break
  367. anything = 1
  368. except "package-info": packageInfo()
  369. except: usage(0)
  370. if (anything==0): usage(0)
  371. if (OPTIMIZE=="1"): OPTIMIZE=1
  372. elif (OPTIMIZE=="2"): OPTIMIZE=2
  373. elif (OPTIMIZE=="3"): OPTIMIZE=3
  374. elif (OPTIMIZE=="4"): OPTIMIZE=4
  375. else: usage("Invalid setting for OPTIMIZE")
  376. if (COMPILERS.count(COMPILER)==0): usage("Invalid setting for COMPILER: "+COMPILER)
  377. parseopts(sys.argv[1:])
  378. ########################################################################
  379. #
  380. # Locate the root of the panda tree
  381. #
  382. ########################################################################
  383. PANDASOURCE=os.path.dirname(os.path.abspath(sys.path[0]))
  384. if ((os.path.exists(os.path.join(PANDASOURCE,"makepanda/makepanda.py"))==0) or
  385. (os.path.exists(os.path.join(PANDASOURCE,"dtool","src","dtoolbase","dtoolbase.h"))==0) or
  386. (os.path.exists(os.path.join(PANDASOURCE,"panda","src","pandabase","pandabase.h"))==0)):
  387. exit("I am unable to locate the root of the panda source tree.")
  388. os.chdir(PANDASOURCE)
  389. ########################################################################
  390. ##
  391. ## If you have the "sdks" directory, supply all sdks
  392. ##
  393. ## This is a temporary hack, it may go away.
  394. ##
  395. ########################################################################
  396. if (os.path.isdir("sdks")):
  397. DIRECTXSDK["DX8"] = "sdks/directx8"
  398. DIRECTXSDK["DX9"] = "sdks/directx9"
  399. MAXSDKCS["MAX6"] = "sdks/maxsdk6"
  400. MAXSDKCS["MAX7"] = "sdks/maxsdk7"
  401. MAXSDKCS["MAX8"] = "sdks/maxsdk8"
  402. MAXSDK["MAX6"] = "sdks/maxsdk6"
  403. MAXSDK["MAX7"] = "sdks/maxsdk7"
  404. MAXSDK["MAX8"] = "sdks/maxsdk8"
  405. MAYASDK["MAYA6"] = "sdks/maya6"
  406. MAYASDK["MAYA65"] = "sdks/maya65"
  407. MAYASDK["MAYA7"] = "sdks/maya7"
  408. ########################################################################
  409. ##
  410. ## Locate the DirectX SDK
  411. ##
  412. ## Microsoft keeps changing the &*#$*& registry key for the DirectX SDK.
  413. ## The only way to reliably find it is to search through the installer's
  414. ## uninstall-directories, look in each one, and see if it contains the
  415. ## relevant files.
  416. ##
  417. ########################################################################
  418. if sys.platform == "win32":
  419. uninstaller = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
  420. for subdir in ListRegistryKeys(uninstaller):
  421. if (subdir[0]=="{"):
  422. dir = GetRegistryKey(uninstaller+"\\"+subdir, "InstallLocation")
  423. if (dir != 0):
  424. if ((DIRECTXSDK.has_key("DX8")==0) and
  425. (os.path.isfile(dir+"\\Include\\d3d8.h")) and
  426. (os.path.isfile(dir+"\\Include\\d3dx8.h")) and
  427. (os.path.isfile(dir+"\\Lib\\d3d8.lib")) and
  428. (os.path.isfile(dir+"\\Lib\\d3dx8.lib"))):
  429. DIRECTXSDK["DX8"] = dir.replace("\\", "/").rstrip("/")
  430. if ((DIRECTXSDK.has_key("DX9")==0) and
  431. (os.path.isfile(dir+"\\Include\\d3d9.h")) and
  432. (os.path.isfile(dir+"\\Include\\d3dx9.h")) and
  433. (os.path.isfile(dir+"\\Include\\dxsdkver.h")) and
  434. (os.path.isfile(dir+"\\Lib\\x86\\d3d9.lib")) and
  435. (os.path.isfile(dir+"\\Lib\\x86\\d3dx9.lib"))):
  436. DIRECTXSDK["DX9"] = dir.replace("\\", "/").rstrip("/")
  437. for ver in DXVERSIONS:
  438. if (OMIT.count("DX"+ver)==0):
  439. if (DIRECTXSDK.has_key("DX"+ver)==0):
  440. WARNINGS.append("I cannot locate SDK for DX"+ver)
  441. WARNINGS.append("I have automatically added this command-line option: --no-dx"+ver)
  442. OMIT.append("DX"+ver)
  443. else:
  444. WARNINGS.append("Using DX"+ver+" sdk: "+DIRECTXSDK["DX"+ver])
  445. ########################################################################
  446. ##
  447. ## Locate the Maya SDK
  448. ##
  449. ########################################################################
  450. MAYAVERSIONINFO=[("MAYA6", "SOFTWARE\\Alias|Wavefront\\Maya\\6.0\\Setup\\InstallPath"),
  451. ("MAYA65", "SOFTWARE\\Alias|Wavefront\\Maya\\6.5\\Setup\\InstallPath"),
  452. ("MAYA7", "SOFTWARE\\Alias|Wavefront\\Maya\\7.0\\Setup\\InstallPath")
  453. ]
  454. for (ver,key) in MAYAVERSIONINFO:
  455. print "Checking for "+ver
  456. if (OMIT.count(ver)==0):
  457. if (sys.platform == "win32"):
  458. if (MAYASDK.has_key(ver)==0):
  459. MAYASDK[ver]=GetRegistryKey(key, "MAYA_INSTALL_LOCATION")
  460. if (MAYASDK[ver] == 0):
  461. WARNINGS.append("The registry does not appear to contain a pointer to the "+ver+" SDK.")
  462. WARNINGS.append("I have automatically added this command-line option: --no-"+ver.lower())
  463. OMIT.append(ver)
  464. else:
  465. MAYASDK[ver] = MAYASDK[ver].replace("\\", "/").rstrip("/")
  466. else:
  467. WARNINGS.append(ver+" not yet supported under linux")
  468. WARNINGS.append("I have automatically added this command-line option: --no-"+ver.lower())
  469. OMIT.append(ver)
  470. ########################################################################
  471. ##
  472. ## Locate the 3D Studio Max and Character Studio SDKs
  473. ##
  474. ########################################################################
  475. MAXVERSIONINFO = [("MAX6", "SOFTWARE\\Autodesk\\3DSMAX\\6.0", "installdir", "maxsdk\\cssdk\\include"),
  476. ("MAX7", "SOFTWARE\\Autodesk\\3DSMAX\\7.0", "Installdir", "maxsdk\\include\\CS"),
  477. ("MAX8", "SOFTWARE\\Autodesk\\3DSMAX\\8.0", "Installdir", "maxsdk\\include\\CS"),
  478. ]
  479. for version,key1,key2,subdir in MAXVERSIONINFO:
  480. if (OMIT.count(version)==0):
  481. if (sys.platform == "win32"):
  482. if (MAXSDK.has_key(version)==0):
  483. top = GetRegistryKey(key1,key2)
  484. if (top == 0):
  485. WARNINGS.append("The registry does not appear to contain a pointer to "+version)
  486. WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
  487. OMIT.append(version)
  488. else:
  489. if (os.path.isdir(top + "\\" + subdir)==0):
  490. WARNINGS.append("Your copy of "+version+" does not include the character studio SDK")
  491. WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
  492. OMIT.append(version)
  493. else:
  494. MAXSDK[version] = top + "maxsdk"
  495. MAXSDKCS[version] = top + subdir
  496. else:
  497. WARNINGS.append(version+" not yet supported under linux")
  498. WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
  499. OMIT.append(version)
  500. ########################################################################
  501. ##
  502. ## Locate the Python SDK
  503. ##
  504. ########################################################################
  505. if (OMIT.count("PYTHON")==0):
  506. if (sys.platform == "win32"):
  507. PYTHONSDK="thirdparty/win-python"
  508. else:
  509. if (os.path.isdir("/usr/include/python2.5")): PYTHONSDK = "/usr/include/python2.5"
  510. elif (os.path.isdir("/usr/include/python2.4")): PYTHONSDK = "/usr/include/python2.4"
  511. elif (os.path.isdir("/usr/include/python2.3")): PYTHONSDK = "/usr/include/python2.3"
  512. elif (os.path.isdir("/usr/include/python2.2")): PYTHONSDK = "/usr/include/python2.2"
  513. else: exit("Cannot find the python SDK")
  514. ########################################################################
  515. ##
  516. ## Locate Visual Studio 7.0 or 7.1 or the Visual Toolkit 2003
  517. ##
  518. ## The visual studio compiler doesn't work unless you set up a
  519. ## couple of environment variables to point at the compiler.
  520. ##
  521. ########################################################################
  522. def AddToVisualStudioPath(path,add):
  523. if (os.environ.has_key(path)):
  524. os.environ[path] = add + ";" + os.environ[path]
  525. else:
  526. os.environ[path] = add
  527. def LocateVisualStudio():
  528. # Try to use Visual Studio
  529. vcdir = GetRegistryKey("SOFTWARE\\Microsoft\\VisualStudio\\7.1", "InstallDir")
  530. if (vcdir == 0):
  531. vcdir = GetRegistryKey("SOFTWARE\\Microsoft\\VisualStudio\\7.0", "InstallDir")
  532. if (vcdir != 0) and (vcdir[-13:] == "\\Common7\\IDE\\"):
  533. vcdir = vcdir[:-12]
  534. WARNINGS.append("Using visual studio: "+vcdir)
  535. AddToVisualStudioPath("PATH", vcdir + "vc7\\bin")
  536. AddToVisualStudioPath("PATH", vcdir + "Common7\\IDE")
  537. AddToVisualStudioPath("PATH", vcdir + "Common7\\Tools")
  538. AddToVisualStudioPath("PATH", vcdir + "Common7\\Tools\\bin\\prerelease")
  539. AddToVisualStudioPath("PATH", vcdir + "Common7\\Tools\\bin")
  540. AddToVisualStudioPath("INCLUDE", vcdir + "vc7\\ATLMFC\\INCLUDE")
  541. AddToVisualStudioPath("INCLUDE", vcdir + "vc7\\include")
  542. AddToVisualStudioPath("INCLUDE", vcdir + "vc7\\PlatformSDK\\include\\prerelease")
  543. AddToVisualStudioPath("INCLUDE", vcdir + "vc7\\PlatformSDK\\include")
  544. AddToVisualStudioPath("LIB", vcdir + "vc7\\ATLMFC\\LIB")
  545. AddToVisualStudioPath("LIB", vcdir + "vc7\\LIB")
  546. AddToVisualStudioPath("LIB", vcdir + "vc7\\PlatformSDK\\lib\\prerelease")
  547. AddToVisualStudioPath("LIB", vcdir + "vc7\\PlatformSDK\\lib")
  548. return
  549. # Try to use the Visual Toolkit 2003
  550. vcdir = GetRegistryKey("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment","VCToolkitInstallDir")
  551. if (vcdir != 0) or (os.environ.has_key("VCTOOLKITINSTALLDIR")):
  552. if (vcdir == 0): vcdir = os.environ["VCTOOLKITINSTALLDIR"]
  553. platsdk=GetRegistryKey("SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3",
  554. "Install Dir")
  555. if (platsdk == 0): exit("Found VC Toolkit, but cannot locate MS Platform SDK")
  556. WARNINGS.append("Using visual toolkit: "+vcdir)
  557. WARNINGS.append("Using MS Platform SDK: "+platsdk)
  558. AddToVisualStudioPath("PATH", vcdir + "\\bin")
  559. AddToVisualStudioPath("INCLUDE", platsdk + "\\include")
  560. AddToVisualStudioPath("INCLUDE", vcdir + "\\include")
  561. AddToVisualStudioPath("LIB", platsdk + "\\lib")
  562. AddToVisualStudioPath("LIB", vcdir + "\\lib")
  563. AddToVisualStudioPath("LIB", "thirdparty\\win-libs-vc7\\extras\\lib")
  564. return
  565. # Give up
  566. exit("Cannot locate Microsoft Visual Studio 7.0, 7.1, or the Visual Toolkit 2003")
  567. if (COMPILER == "MSVC7"):
  568. LocateVisualStudio()
  569. ##########################################################################################
  570. #
  571. # Disable packages that are currently broken or not supported.
  572. #
  573. ##########################################################################################
  574. if (OMIT.count("HELIX")==0):
  575. WARNINGS.append("HELIX is currently nonoperational")
  576. WARNINGS.append("I have automatically added this command-line option: --no-helix")
  577. OMIT.append("HELIX")
  578. if (sys.platform != "win32") and (OMIT.count("OPENCV")==0):
  579. WARNINGS.append("OPENCV currently only works under windows.")
  580. WARNINGS.append("I have automatically added this command-line option: --no-opencv")
  581. OMIT.append("OPENCV")
  582. if (OMIT.count("MILES")==0):
  583. WARNINGS.append("makepanda currently does not support miles sound system")
  584. WARNINGS.append("I have automatically added this command-line option: --no-miles")
  585. OMIT.append("MILES")
  586. if (sys.platform != "win32"):
  587. if (OMIT.count("DX8")==0): OMIT.append("DX8")
  588. if (OMIT.count("DX9")==0): OMIT.append("DX9")
  589. ##########################################################################################
  590. #
  591. # Verify that LD_LIBRARY_PATH contains the built/lib directory.
  592. #
  593. # If not, add it on a temporary basis, and issue a warning.
  594. #
  595. ##########################################################################################
  596. if (sys.platform != "win32"):
  597. BUILTLIB = os.path.abspath("built/lib")
  598. try:
  599. LDPATH = []
  600. f = file("/etc/ld.so.conf","r")
  601. for line in f: LDPATH.append(line.rstrip())
  602. f.close()
  603. except: LDPATH = []
  604. if (os.environ.has_key("LD_LIBRARY_PATH")):
  605. LDPATH = LDPATH + os.environ["LD_LIBRARY_PATH"].split(":")
  606. if (LDPATH.count(BUILTLIB)==0):
  607. WARNINGS.append("Caution: the built/lib directory is not in LD_LIBRARY_PATH")
  608. WARNINGS.append("or /etc/ld.so.conf. You must add it before using panda.")
  609. if (os.environ.has_key("LD_LIBRARY_PATH")):
  610. os.environ["LD_LIBRARY_PATH"] = BUILTLIB + ":" + os.environ["LD_LIBRARY_PATH"]
  611. else:
  612. os.environ["LD_LIBRARY_PATH"] = BUILTLIB
  613. #######################################################################
  614. #
  615. # Ensure that bison can find its skeleton file
  616. #
  617. #######################################################################
  618. if (sys.platform == "win32"):
  619. os.environ["BISON_SIMPLE"] = "thirdparty/win-util/bison.simple"
  620. ########################################################################
  621. ##
  622. ## Choose a version number for the installer
  623. ##
  624. ########################################################################
  625. if (VERSION == 0):
  626. try:
  627. f = file("dtool/PandaVersion.pp","r")
  628. pattern = re.compile('^[ \t]*[#][ \t]*define[ \t]+PANDA_VERSION[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)')
  629. for line in f:
  630. match = pattern.match(line,0)
  631. if (match):
  632. VERSION = match.group(1)+"."+match.group(2)+"."+match.group(3)
  633. break
  634. f.close()
  635. except: VERSION="0.0.0"
  636. ########################################################################
  637. #
  638. # Sanity check some command-line arguments.
  639. #
  640. ########################################################################
  641. if (INSTALLER) and (OMIT.count("PYTHON")):
  642. exit("Cannot build installer without python")
  643. ########################################################################
  644. ##
  645. ## Give a Status Report on Command-Line Options
  646. ##
  647. ########################################################################
  648. def printStatus(header,warnings):
  649. global VERBOSE
  650. if VERBOSE >= -2:
  651. print ""
  652. print "-------------------------------------------------------------------"
  653. print header
  654. tkeep = ""
  655. tomit = ""
  656. for x in PACKAGES:
  657. if (OMIT.count(x)==0): tkeep = tkeep + x + " "
  658. else: tomit = tomit + x + " "
  659. print "Makepanda: Compiler:",COMPILER
  660. print "Makepanda: Optimize:",OPTIMIZE
  661. print "Makepanda: Keep Pkg:",tkeep
  662. print "Makepanda: Omit Pkg:",tomit
  663. print "Makepanda: Verbose vs. Quiet Level:",VERBOSE
  664. if (GENMAN): print "Makepanda: Generate API reference manual"
  665. else : print "Makepanda: Don't generate API reference manual"
  666. if (sys.platform == "win32"):
  667. if INSTALLER: print "Makepanda: Build installer, using",COMPRESSOR
  668. else : print "Makepanda: Don't build installer"
  669. print "Makepanda: Version ID: "+VERSION
  670. for x in warnings: print "Makepanda: "+x
  671. print "-------------------------------------------------------------------"
  672. print ""
  673. sys.stdout.flush()
  674. if (SLAVEBUILD==0):
  675. printStatus("Makepanda Initial Status Report", WARNINGS)
  676. ########################################################################
  677. ##
  678. ## The CXX include-cache.
  679. ##
  680. ## Dictionary: for each CXX source file, a list of all the
  681. ## include-directives inside that file.
  682. ##
  683. ## Makepanda analyzes include-directives to determine the dependencies
  684. ## of C source files. This requires us to read the C source files,
  685. ## a time-consuming process. This means that doing a 'makepanda'
  686. ## takes quite a bit of time, even if there's nothing to compile.
  687. ##
  688. ## To accelerate this process, we store the list of include-directives
  689. ## in each source file in the "CXX include-cache". This cache is
  690. ## preserved (using the 'cPickle' module) from execution to execution
  691. ## of makepanda. The use of file dates in the cache makes it very
  692. ## unlikely for the cache to get out-of-sync with the source tree.
  693. ##
  694. ########################################################################
  695. iCachePath="built/tmp/makepanda-icache"
  696. try: icache = open(iCachePath,'rb')
  697. except: icache = 0
  698. if (icache!=0):
  699. CXXINCLUDECACHE = cPickle.load(icache)
  700. icache.close()
  701. ########################################################################
  702. ##
  703. ## CxxGetIncludes
  704. ##
  705. ## return a list of the include-directives in a given source file
  706. ##
  707. ########################################################################
  708. global CxxIncludeRegex
  709. CxxIncludeRegex = re.compile('^[ \t]*[#][ \t]*include[ \t]+"([^"]+)"[ \t\r\n]*$')
  710. def CxxGetIncludes(path):
  711. date = filedate(path)
  712. if (CXXINCLUDECACHE.has_key(path)):
  713. cached = CXXINCLUDECACHE[path]
  714. if (cached[0]==date): return cached[1]
  715. try: sfile = open(path, 'rb')
  716. except: exit("Cannot open source file \""+path+"\" for reading.")
  717. include = []
  718. for line in sfile:
  719. match = CxxIncludeRegex.match(line,0)
  720. if (match):
  721. incname = match.group(1)
  722. include.append(incname)
  723. sfile.close()
  724. CXXINCLUDECACHE[path] = [date, include]
  725. return include
  726. ########################################################################
  727. ##
  728. ## CxxFindSource
  729. ##
  730. ## given a source file name and a directory list, searches the
  731. ## directory list for the given source file. Returns the full
  732. ## pathname of the located file.
  733. ##
  734. ########################################################################
  735. def CxxFindSource(name, ipath):
  736. for dir in ipath:
  737. if (dir == "."): full = name
  738. else: full = dir + "/" + name
  739. if filedate(full) > 0: return full
  740. return 0
  741. ########################################################################
  742. ##
  743. ## CxxFindHeader
  744. ##
  745. ## given a source file name and an include directive in that source
  746. ## file, locates the relevant header file.
  747. ##
  748. ########################################################################
  749. def CxxFindHeader(srcfile, incfile, ipath):
  750. if (incfile[:1]=="."):
  751. last = srcfile.rfind("/")
  752. if (last < 0): exit("CxxFindHeader cannot handle this case #1")
  753. srcdir = srcfile[:last+1]
  754. while (incfile[:1]=="."):
  755. if (incfile[:2]=="./"):
  756. incfile = incfile[2:]
  757. elif (incfile[:3]=="../"):
  758. incfile = incfile[3:]
  759. last = srcdir[:-1].rfind("/")
  760. if (last < 0): exit("CxxFindHeader cannot handle this case #2")
  761. srcdir = srcdir[:last+1]
  762. else: exit("CxxFindHeader cannot handle this case #3")
  763. full = srcdir + incfile
  764. if filedate(full) > 0: return full
  765. return 0
  766. else: return CxxFindSource(incfile, ipath)
  767. ########################################################################
  768. ##
  769. ## CxxCalcDependencies(srcfile, ipath, ignore)
  770. ##
  771. ## Calculate the dependencies of a source file given a
  772. ## particular include-path. Any file in the list of files to
  773. ## ignore is not considered.
  774. ##
  775. ########################################################################
  776. global CxxIgnoreHeader
  777. global CxxDependencyCache
  778. CxxIgnoreHeader = {}
  779. CxxDependencyCache = {}
  780. def CxxCalcDependencies(srcfile, ipath, ignore):
  781. if (SLAVEBUILD!=0): return []
  782. if (CxxDependencyCache.has_key(srcfile)):
  783. return CxxDependencyCache[srcfile]
  784. if (ignore.count(srcfile)): return []
  785. dep = {}
  786. dep[srcfile] = 1
  787. includes = CxxGetIncludes(srcfile)
  788. for include in includes:
  789. if (CxxIgnoreHeader.has_key(include)==0):
  790. header = CxxFindHeader(srcfile, include, ipath)
  791. if (header!=0):
  792. if (ignore.count(header)==0):
  793. hdeps = CxxCalcDependencies(header, ipath, [srcfile]+ignore)
  794. for x in hdeps: dep[x] = 1
  795. else:
  796. # print "CAUTION: header file "+include+" cannot be found in "+srcfile+" IPATH="+str(ipath)
  797. pass
  798. result = dep.keys()
  799. CxxDependencyCache[srcfile] = result
  800. return result
  801. def CxxCalcDependenciesAll(srcfiles, ipath):
  802. dep = {}
  803. for srcfile in srcfiles:
  804. for x in CxxCalcDependencies(srcfile, ipath, []):
  805. dep[x] = 1
  806. return dep.keys()
  807. def ReadCvsEntries(dir):
  808. try:
  809. if (os.path.isfile(dir+"/CVS-Entries")):
  810. srchandle = open(dir+"/CVS-Entries", "r")
  811. else:
  812. srchandle = open(dir+"/CVS/Entries", "r")
  813. files = []
  814. for line in srchandle:
  815. if (line[0]=="/"):
  816. s = line.split("/",2)
  817. if (len(s)==3): files.append(s[1])
  818. srchandle.close()
  819. files.sort()
  820. return files
  821. except: return 0
  822. ########################################################################
  823. ##
  824. ## Routines to copy files into the build tree
  825. ##
  826. ########################################################################
  827. def CopyFile(dstfile,srcfile):
  828. if (dstfile[-1]=='/'):
  829. dstdir = dstfile
  830. fnl = srcfile.rfind("/")
  831. if (fnl < 0): fn = srcfile
  832. else: fn = srcfile[fnl+1:]
  833. dstfile = dstdir + fn
  834. if (older([dstfile],srcfile)):
  835. global VERBOSE
  836. if VERBOSE >= 1:
  837. print "Copying \"%s\" --> \"%s\""%(srcfile, dstfile)
  838. WriteFile(dstfile,ReadFile(srcfile))
  839. def CopyAllFiles(dstdir, srcdir, suffix=""):
  840. suflen = len(suffix)
  841. files = os.listdir(srcdir)
  842. for x in files:
  843. if (os.path.isfile(srcdir+x)):
  844. if (suflen==0) or (x[-suflen:]==suffix):
  845. CopyFile(dstdir+x, srcdir+x)
  846. def CopyAllHeaders(dir, skip=[]):
  847. if (SLAVEBUILD!=0): return
  848. # get a list of headers
  849. dirlist = os.listdir(dir)
  850. dirlist.sort()
  851. files = fnmatch.filter(dirlist,"*.h")+fnmatch.filter(dirlist,"*.I")+fnmatch.filter(dirlist,"*.T")
  852. # actually copy the headers.
  853. copied = []
  854. if (skip!="ALL"):
  855. # even if you skip all, the warning-messages
  856. # about "x is not in CVS" are still useful.
  857. for filename in files:
  858. if (skip.count(filename)==0):
  859. srcfile = dir + "/" + filename
  860. dstfile = "built/include/" + filename
  861. if (older([dstfile],srcfile)):
  862. copied.append(filename)
  863. WriteFile(dstfile,ReadFile(srcfile))
  864. # sanity check - do headers in directory match headers in CVS?
  865. cvsentries = ReadCvsEntries(dir)
  866. if (cvsentries != 0):
  867. cvsheaders = fnmatch.filter(cvsentries,"*.h")+fnmatch.filter(cvsentries,"*.I")+fnmatch.filter(cvsentries,"*.T")
  868. for x in SetDifference(files, cvsheaders):
  869. if ((skip=="ALL") or (skip.count(x)==0)):
  870. msg = "WARNING: header file %s is in your directory, but not in CVS"%(dir+"/"+x)
  871. print msg
  872. WARNINGS.append(msg)
  873. for x in SetDifference(cvsheaders, files):
  874. if ((skip=="ALL") or (skip.count(x)==0)):
  875. msg = "WARNING: header file %s is CVS, but not in your directory"%(dir+"/"+x)
  876. print msg
  877. WARNINGS.append(msg)
  878. def CopyTree(dstdir,srcdir):
  879. if (os.path.isdir(dstdir)): return 0
  880. if (COMPILER=="MSVC7"): cmd = 'xcopy /I/Y/E/Q "' + srcdir + '" "' + dstdir + '"'
  881. if (COMPILER=="LINUXA"): cmd = 'cp --recursive --force ' + srcdir + ' ' + dstdir
  882. oscmd(cmd)
  883. updatefiledate(dstdir)
  884. ########################################################################
  885. ##
  886. ## EnqueueCxx
  887. ##
  888. ########################################################################
  889. def CompileCxxMSVC7(wobj,fullsrc,ipath,opts):
  890. cmd = "cl /Fo" + wobj + " /nologo /c"
  891. if (OMIT.count("PYTHON")==0): cmd = cmd + " /Ibuilt/python/include"
  892. for ver in DXVERSIONS:
  893. if (PkgSelected(opts,"DX"+ver)):
  894. cmd = cmd + ' /I"' + DIRECTXSDK["DX"+ver] + '/include"'
  895. for ver in MAYAVERSIONS:
  896. if (PkgSelected(opts,"MAYA"+ver)):
  897. cmd = cmd + ' /I"' + MAYASDK["MAYA"+ver] + '/include"'
  898. for ver in MAXVERSIONS:
  899. if (PkgSelected(opts,"MAX"+ver)):
  900. cmd = cmd + ' /I"' + MAXSDK["MAX"+ver] + '/include" /I"' + MAXSDKCS["MAX"+ver] + '" /DMAX' + ver
  901. for pkg in PACKAGES:
  902. if (pkg[:4] != "MAYA") and (pkg[:3]!="MAX") and (pkg[:2]!="DX") and PkgSelected(opts,pkg):
  903. cmd = cmd + " /Ithirdparty/win-libs-vc7/" + pkg.lower() + "/include"
  904. for x in ipath: cmd = cmd + " /I" + x
  905. if (opts.count('NOFLOATWARN')): cmd = cmd + ' /wd4244 /wd4305'
  906. if (opts.count("WITHINPANDA")): cmd = cmd + ' /DWITHIN_PANDA'
  907. if (opts.count("MSFORSCOPE")==0): cmd = cmd + ' /Zc:forScope'
  908. optlevel = getoptlevel(opts,OPTIMIZE)
  909. if (optlevel==1): cmd = cmd + " /MD /Zi /RTCs /GS"
  910. if (optlevel==2): cmd = cmd + " /MD /Zi "
  911. if (optlevel==3): cmd = cmd + " /MD /Zi /O2 /Ob2 /DFORCE_INLINING "
  912. if (optlevel==4): cmd = cmd + " /MD /Zi /Ox /Ob2 /DFORCE_INLINING /GL "
  913. cmd = cmd + " /Fd" + wobj[:-4] + ".pdb"
  914. building = getbuilding(opts)
  915. if (building): cmd = cmd + " /DBUILDING_" + building
  916. cmd = cmd + " /EHsc /Zm300 /DWIN32_VC /DWIN32 /W3 " + fullsrc
  917. oscmd(cmd)
  918. def CompileCxxLINUXA(wobj,fullsrc,ipath,opts):
  919. if (fullsrc[-2:]==".c"): cmd = 'gcc -c -o ' + wobj
  920. else: cmd = 'g++ -ftemplate-depth-30 -c -o ' + wobj
  921. if (OMIT.count("PYTHON")==0): cmd = cmd + ' -I"' + PYTHONSDK + '"'
  922. if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -Ithirdparty/linux-libs-a/vrpn/include'
  923. if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -Ithirdparty/linux-libs-a/fftw/include'
  924. if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -Ithirdparty/linux-libs-a/fmod/include'
  925. if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -Ithirdparty/linux-libs-a/nvidiacg/include'
  926. if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -Ithirdparty/linux-libs-a/nspr/include'
  927. if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' -I/usr/include/freetype2'
  928. for x in ipath: cmd = cmd + ' -I' + x
  929. if (opts.count("WITHINPANDA")): cmd = cmd + ' -DWITHIN_PANDA'
  930. optlevel = getoptlevel(opts,OPTIMIZE)
  931. if (optlevel==1): cmd = cmd + " -g"
  932. if (optlevel==2): cmd = cmd + " -O1"
  933. if (optlevel==3): cmd = cmd + " -O2"
  934. if (optlevel==4): cmd = cmd + " -O2"
  935. building = getbuilding(opts)
  936. if (building): cmd = cmd + " -DBUILDING_" + building
  937. cmd = cmd + ' ' + fullsrc
  938. oscmd(cmd)
  939. def EnqueueCxx(obj=0,src=0,ipath=[],opts=[],xdep=[]):
  940. if ((obj==0)|(src==0)): exit("syntax error in EnqueueCxx directive")
  941. if (COMPILER=="MSVC7"):
  942. wobj = "built/tmp/"+obj
  943. fn = CompileCxxMSVC7
  944. if (COMPILER=="LINUXA"):
  945. wobj = "built/tmp/" + obj[:-4] + ".o"
  946. fn = CompileCxxLINUXA
  947. if (SLAVEBUILD!=0) and (SLAVEBUILD!=wobj): return
  948. ipath = ["built/tmp"] + ipath + ["built/include"]
  949. fullsrc = CxxFindSource(src, ipath)
  950. if (fullsrc == 0): exit("Cannot find source file "+src)
  951. dep = CxxCalcDependencies(fullsrc, ipath, []) + xdep
  952. DependencyQueue(fn, [wobj,fullsrc,ipath,opts], [wobj], dep, [])
  953. ########################################################################
  954. ##
  955. ## CompileBison
  956. ##
  957. ########################################################################
  958. def CompileBisonMSVC7(pre, dsth, dstc, wobj, ipath, opts, src):
  959. ifile = os.path.basename(src)
  960. oscmd('thirdparty/win-util/bison -y -d -obuilt/tmp/'+ifile+'.c -p '+pre+' '+src)
  961. CopyFile(dstc, "built/tmp/"+ifile+".c")
  962. CopyFile(dsth, "built/tmp/"+ifile+".h")
  963. CompileCxxMSVC7(wobj,dstc,ipath,opts)
  964. def CompileBisonLINUXA(pre, dsth, dstc, wobj, ipath, opts, src):
  965. ifile = os.path.basename(src)
  966. oscmd("bison -y -d -obuilt/tmp/"+ifile+".c -p "+pre+" "+src)
  967. CopyFile(dstc, "built/tmp/"+ifile+".c")
  968. CopyFile(dsth, "built/tmp/"+ifile+".h")
  969. CompileCxxLINUXA(wobj,dstc,ipath,opts)
  970. def EnqueueBison(ipath=0,opts=0,pre=0,obj=0,dsth=0,src=0):
  971. if ((ipath==0)|(opts==0)|(pre==0)|(obj==0)|(dsth==0)|(src==0)):
  972. exit("syntax error in EnqueueBison directive")
  973. if (COMPILER=="MSVC7"):
  974. wobj="built/tmp/"+obj
  975. fn = CompileBisonMSVC7
  976. if (COMPILER=="LINUXA"):
  977. wobj="built/tmp/"+obj[:-4]+".o"
  978. fn = CompileBisonLINUXA
  979. if (SLAVEBUILD!=0) and (SLAVEBUILD!=wobj): return
  980. ipath = ["built/tmp"] + ipath + ["built/include"]
  981. fullsrc = CxxFindSource(src, ipath)
  982. if (fullsrc == 0): exit("Cannot find source file "+src)
  983. if (OMIT.count("BISON")):
  984. dir = os.path.dirname(fullsrc)
  985. CopyFile("built/tmp/"+obj[:-4]+".cxx", dir+"/"+src[:-4]+".cxx.prebuilt")
  986. CopyFile("built/include/"+src[:-4]+".h", dir+"/"+src[:-4]+".h.prebuilt")
  987. EnqueueCxx(ipath=ipath,opts=opts,obj=obj,src=obj[:-4]+".cxx")
  988. else:
  989. dstc = "built/tmp/"+obj[:-4]+".cxx"
  990. dsth = "built/include/"+src[:-4]+".h"
  991. DependencyQueue(fn, [pre,dsth,dstc,wobj,ipath,opts,fullsrc], [wobj, dsth], [fullsrc], [])
  992. ########################################################################
  993. ##
  994. ## CompileFlex
  995. ##
  996. ########################################################################
  997. def CompileFlexMSVC7(pre,dst,src,wobj,ipath,opts,dashi):
  998. if (dashi): oscmd("thirdparty/win-util/flex -i -P" + pre + " -o"+dst+" "+src)
  999. else: oscmd("thirdparty/win-util/flex -P" + pre + " -o"+dst+" "+src)
  1000. CompileCxxMSVC7(wobj,dst,ipath,opts)
  1001. def CompileFlexLINUXA(pre,dst,src,wobj,ipath,opts,dashi):
  1002. if (dashi): oscmd("flex -i -P" + pre + " -o"+dst+" "+src)
  1003. else: oscmd("flex -P" + pre + " -o"+dst+" "+src)
  1004. CompileCxxLINUXA(wobj,dst,ipath,opts)
  1005. def EnqueueFlex(ipath=0,opts=0,pre=0,obj=0,src=0,dashi=0):
  1006. if ((ipath==0)|(opts==0)|(pre==0)|(obj==0)|(src==0)):
  1007. exit("syntax error in EnqueueFlex directive")
  1008. if (COMPILER=="MSVC7"):
  1009. wobj="built/tmp/"+obj[:-4]+".obj"
  1010. fn=CompileFlexMSVC7
  1011. if (COMPILER=="LINUXA"):
  1012. wobj="built/tmp/"+obj[:-4]+".o"
  1013. fn=CompileFlexLINUXA
  1014. if (SLAVEBUILD!=0) and (SLAVEBUILD!=wobj): return
  1015. ipath = ["built/tmp"] + ipath + ["built/include"]
  1016. fullsrc = CxxFindSource(src, ipath)
  1017. if (fullsrc == 0): exit("Cannot find source file "+src)
  1018. if (OMIT.count("FLEX")):
  1019. dir = os.path.dirname(fullsrc)
  1020. CopyFile("built/tmp/"+obj[:-4]+".cxx", dir+"/"+src[:-4]+".cxx.prebuilt")
  1021. EnqueueCxx(ipath=IPATH, opts=OPTS, obj=obj, src=obj[:-4]+".cxx")
  1022. else:
  1023. dst = "built/tmp/"+obj[:-4]+".cxx"
  1024. DependencyQueue(fn, [pre,dst,fullsrc,wobj,ipath,opts,dashi], [wobj], [fullsrc], [])
  1025. ########################################################################
  1026. ##
  1027. ## EnqueueIgate
  1028. ##
  1029. ########################################################################
  1030. def CompileIgateMSVC7(ipath,opts,outd,outc,wobj,src,module,library,files):
  1031. if (OMIT.count("PYTHON")):
  1032. WriteFile(outc,"")
  1033. else:
  1034. cmd = "built/bin/interrogate -srcdir "+src+" -I"+src
  1035. cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32'
  1036. cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall'
  1037. optlevel=getoptlevel(opts,OPTIMIZE)
  1038. if (optlevel==1): cmd = cmd + ' '
  1039. if (optlevel==2): cmd = cmd + ' '
  1040. if (optlevel==3): cmd = cmd + ' -DFORCE_INLINING'
  1041. if (optlevel==4): cmd = cmd + ' -DFORCE_INLINING'
  1042. cmd = cmd + ' -Sbuilt/include/parser-inc'
  1043. cmd = cmd + ' -Ibuilt/python/include'
  1044. for pkg in PACKAGES:
  1045. if (PkgSelected(opts,pkg)):
  1046. cmd = cmd + " -Ithirdparty/win-libs-vc7/" + pkg.lower() + "/include"
  1047. cmd = cmd + ' -oc ' + outc + ' -od ' + outd
  1048. cmd = cmd + ' -fnames -string -refcount -assert -python-native'
  1049. for x in ipath: cmd = cmd + ' -I' + x
  1050. building = getbuilding(opts)
  1051. if (building): cmd = cmd + " -DBUILDING_"+building
  1052. if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA"
  1053. cmd = cmd + ' -module ' + module + ' -library ' + library
  1054. for ver in DXVERSIONS:
  1055. if ((COMPILER=="MSVC7") and PkgSelected(opts,"DX"+ver)):
  1056. cmd = cmd + ' -I"' + DIRECTXSDK["DX"+ver] + '/include"'
  1057. for ver in MAYAVERSIONS:
  1058. if ((COMPILER=="MSVC7") and PkgSelected(opts,"MAYA"+ver)):
  1059. cmd = cmd + ' -I"' + MAYASDK["MAYA"+ver] + '/include"'
  1060. for x in files: cmd = cmd + ' ' + x
  1061. oscmd(cmd)
  1062. CompileCxxMSVC7(wobj,outc,ipath,opts)
  1063. def CompileIgateLINUXA(ipath,opts,outd,outc,wobj,src,module,library,files):
  1064. if (OMIT.count("PYTHON")):
  1065. WriteFile(outc,"")
  1066. else:
  1067. cmd = 'built/bin/interrogate -srcdir '+src
  1068. cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const'
  1069. optlevel = getoptlevel(opts,OPTIMIZE)
  1070. if (optlevel==1): cmd = cmd + ' '
  1071. if (optlevel==2): cmd = cmd + ' '
  1072. if (optlevel==3): cmd = cmd + ' '
  1073. if (optlevel==4): cmd = cmd + ' '
  1074. cmd = cmd + ' -Sbuilt/include/parser-inc -S/usr/include'
  1075. cmd = cmd + ' -Ibuilt/python/include'
  1076. for pkg in PACKAGES:
  1077. if (PkgSelected(opts,pkg)):
  1078. cmd = cmd + " -Ithirdparty/linux-libs-a/" + pkg.lower() + "/include"
  1079. cmd = cmd + ' -oc ' + outc + ' -od ' + outd
  1080. cmd = cmd + ' -fnames -string -refcount -assert -python-native'
  1081. for x in ipath: cmd = cmd + ' -I' + x
  1082. building = getbuilding(opts)
  1083. if (building): cmd = cmd + " -DBUILDING_"+building
  1084. if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA"
  1085. cmd = cmd + ' -module ' + module + ' -library ' + library
  1086. for ver in MAYAVERSIONS:
  1087. if (PkgSelected(opts, "MAYA"+ver)):
  1088. cmd = cmd + ' -I"' + MAYASDK["MAYA"+ver] + '/include"'
  1089. for x in files: cmd = cmd + ' ' + x
  1090. oscmd(cmd)
  1091. CompileCxxLINUXA(wobj,outc,ipath,opts)
  1092. def EnqueueIgate(ipath=0, opts=0, outd=0, obj=0, src=0, module=0, library=0, also=0, skip=0):
  1093. if ((ipath==0)|(opts==0)|(outd==0)|(obj==0)|(src==0)|(module==0)|(library==0)|(also==0)|(skip==0)):
  1094. exit("syntax error in EnqueueIgate directive")
  1095. if (COMPILER=="MSVC7"):
  1096. altdep = "built/bin/interrogate.exe"
  1097. wobj = "built/tmp/"+obj
  1098. fn = CompileIgateMSVC7
  1099. if (COMPILER=="LINUXA"):
  1100. altdep = "built/bin/interrogate"
  1101. wobj = "built/tmp/"+obj[:-4]+".o"
  1102. fn = CompileIgateLINUXA
  1103. if (SLAVEBUILD!=0) and (SLAVEBUILD!=wobj): return
  1104. outd = 'built/pandac/input/'+outd
  1105. dirlisting = os.listdir(src)
  1106. files = fnmatch.filter(dirlisting,"*.h")
  1107. if (skip=='ALL'): files=[]
  1108. else:
  1109. files.sort()
  1110. for x in skip:
  1111. if (files.count(x)!=0): files.remove(x)
  1112. for x in also: files.append(x)
  1113. ipath = ["built/tmp"] + ipath + ["built/include"]
  1114. dep = ["built/tmp/dtool_have_python.dat"]
  1115. dep = dep + CxxCalcDependenciesAll(xpaths(src+"/",files,""), ipath)
  1116. outc = "built/tmp/"+obj[:-4]+".cxx"
  1117. DependencyQueue(fn, [ipath,opts,outd,outc,wobj,src,module,library,files], [wobj, outd], dep, [altdep])
  1118. ########################################################################
  1119. ##
  1120. ## EnqueueImod
  1121. ##
  1122. ########################################################################
  1123. def CompileImodMSVC7(outc, wobj, module, library, ipath, opts, files):
  1124. if (OMIT.count("PYTHON")):
  1125. WriteFile(outc,"")
  1126. else:
  1127. cmd = 'built/bin/interrogate_module '
  1128. cmd = cmd + ' -oc ' + outc + ' -module ' + module + ' -library ' + library + ' -python-native '
  1129. for x in files: cmd = cmd + ' ' + x
  1130. oscmd(cmd)
  1131. CompileCxxMSVC7(wobj,outc,ipath,opts)
  1132. def CompileImodLINUXA(outc, wobj, module, library, ipath, opts, files):
  1133. if (OMIT.count("PYTHON")):
  1134. WriteFile(outc,"")
  1135. else:
  1136. cmd = 'built/bin/interrogate_module '
  1137. cmd = cmd + ' -oc ' + outc + ' -module ' + module + ' -library ' + library + ' -python-native '
  1138. for x in files: cmd = cmd + ' ' + x
  1139. oscmd(cmd)
  1140. CompileCxxLINUXA(wobj,outc,ipath,opts)
  1141. def EnqueueImod(ipath=0, opts=0, obj=0, module=0, library=0, files=0):
  1142. if ((ipath==0)|(opts==0)|(obj==0)|(module==0)|(library==0)|(files==0)):
  1143. exit("syntax error in EnqueueImod directive")
  1144. if (COMPILER=="MSVC7"):
  1145. altdep = "built/bin/interrogate_module.exe"
  1146. wobj = "built/tmp/"+obj[:-4]+".obj"
  1147. fn = CompileImodMSVC7
  1148. if (COMPILER=="LINUXA"):
  1149. altdep = "built/bin/interrogate_module"
  1150. wobj = "built/tmp/"+obj[:-4]+".o"
  1151. fn = CompileImodLINUXA
  1152. if (SLAVEBUILD!=0) and (SLAVEBUILD!=wobj): return
  1153. ipath = ["built/tmp"] + ipath + ["built/include"]
  1154. outc = "built/tmp/"+obj[:-4]+".cxx"
  1155. files = xpaths("built/pandac/input/",files,"")
  1156. dep = files + ["built/tmp/dtool_have_python.dat"]
  1157. DependencyQueue(fn, [outc, wobj, module, library, ipath, opts, files], [wobj], dep, [altdep])
  1158. ########################################################################
  1159. ##
  1160. ## EnqueueLib
  1161. ##
  1162. ########################################################################
  1163. def CompileLibMSVC7(wlib, wobj, opts):
  1164. cmd = 'link /lib /nologo /OUT:' + wlib
  1165. optlevel = getoptlevel(opts,OPTIMIZE)
  1166. if (optlevel==4): cmd = cmd + " /LTCG "
  1167. for x in wobj: cmd = cmd + ' ' + x
  1168. oscmd(cmd)
  1169. def CompileLibLINUXA(wlib, wobj, opts):
  1170. cmd = 'ar cru ' + wlib
  1171. for x in wobj: cmd=cmd + ' ' + x
  1172. oscmd(cmd)
  1173. def EnqueueLib(lib=0, obj=[], opts=[]):
  1174. if (lib==0): exit("syntax error in EnqueueLib directive")
  1175. if (COMPILER=="MSVC7"):
  1176. if (lib[-4:]==".ilb"): wlib = "built/tmp/" + lib[:-4] + ".lib"
  1177. else: wlib = "built/lib/" + lib[:-4] + ".lib"
  1178. if (SLAVEBUILD!=0) and (SLAVEBUILD!=wlib): return
  1179. wobj = xpaths("built/tmp/",obj,"")
  1180. DependencyQueue(CompileLibMSVC7, [wlib, wobj, opts], [wlib], wobj, [])
  1181. if (COMPILER=="LINUXA"):
  1182. if (lib[-4:]==".ilb"): wlib = "built/tmp/" + lib[:-4] + ".a"
  1183. else: wlib = "built/lib/" + lib[:-4] + ".a"
  1184. if (SLAVEBUILD!=0) and (SLAVEBUILD!=wlib): return
  1185. wobj = []
  1186. for x in obj: wobj.append("built/tmp/" + x[:-4] + ".o")
  1187. DependencyQueue(CompileLibLINUXA, [wlib, wobj, opts], [wlib], wobj, [])
  1188. ########################################################################
  1189. ##
  1190. ## EnqueueLink
  1191. ##
  1192. ########################################################################
  1193. def CompileLinkMSVC7(wdll, wlib, wobj, opts, dll, ldef):
  1194. cmd = 'link /nologo /NODEFAULTLIB:LIBCI.LIB /NODEFAULTLIB:MSVCRTD.LIB /DEBUG '
  1195. if (wdll[-4:]!=".exe"): cmd = cmd + " /DLL"
  1196. optlevel = getoptlevel(opts,OPTIMIZE)
  1197. if (optlevel==1): cmd = cmd + " /MAP /MAPINFO:LINES /MAPINFO:EXPORTS"
  1198. if (optlevel==2): cmd = cmd + " /MAP:NUL "
  1199. if (optlevel==3): cmd = cmd + " /MAP:NUL "
  1200. if (optlevel==4): cmd = cmd + " /MAP:NUL /LTCG "
  1201. cmd = cmd + " /FIXED:NO /OPT:REF /STACK:4194304 /INCREMENTAL:NO "
  1202. if (ldef!=0): cmd = cmd + ' /DEF:"' + ldef + '"'
  1203. cmd = cmd + ' /OUT:' + wdll
  1204. if (wlib != 0): cmd = cmd + ' /IMPLIB:' + wlib
  1205. if (OMIT.count("PYTHON")==0): cmd = cmd + ' /LIBPATH:built/python/libs '
  1206. for x in wobj: cmd = cmd + ' ' + x
  1207. if (wdll[-4:]==".exe"): cmd = cmd + ' panda/src/configfiles/pandaIcon.obj'
  1208. for ver in DXVERSIONS:
  1209. if (PkgSelected(opts,"DX"+ver)):
  1210. cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK["DX"+ver] + '/lib/x86"'
  1211. cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK["DX"+ver] + '/lib"'
  1212. cmd = cmd + ' d3dVER.lib d3dxVER.lib dxerrVER.lib ddraw.lib dxguid.lib'.replace("VER",ver)
  1213. if (opts.count("WINSOCK")): cmd = cmd + " wsock32.lib"
  1214. if (opts.count("WINSOCK2")): cmd = cmd + " wsock32.lib ws2_32.lib"
  1215. if (opts.count("WINCOMCTL")): cmd = cmd + ' comctl32.lib'
  1216. if (opts.count("WINCOMDLG")): cmd = cmd + ' comdlg32.lib'
  1217. if (opts.count("WINUSER")): cmd = cmd + " user32.lib"
  1218. if (opts.count("WINMM")): cmd = cmd + " winmm.lib"
  1219. if (opts.count("WINIMM")): cmd = cmd + " imm32.lib"
  1220. if (opts.count("WINKERNEL")): cmd = cmd + " kernel32.lib"
  1221. if (opts.count("WINOLDNAMES")): cmd = cmd + " oldnames.lib"
  1222. if (opts.count("WINGDI")): cmd = cmd + " gdi32.lib"
  1223. if (opts.count("ADVAPI")): cmd = cmd + " advapi32.lib"
  1224. if (opts.count("GLUT")): cmd = cmd + " opengl32.lib glu32.lib"
  1225. if (PkgSelected(opts,"ZLIB")): cmd = cmd + ' thirdparty/win-libs-vc7/zlib/lib/libpandazlib1.lib'
  1226. if (PkgSelected(opts,"PNG")): cmd = cmd + ' thirdparty/win-libs-vc7/png/lib/libpandapng13.lib'
  1227. if (PkgSelected(opts,"JPEG")): cmd = cmd + ' thirdparty/win-libs-vc7/jpeg/lib/libpandajpeg.lib'
  1228. if (PkgSelected(opts,"TIFF")): cmd = cmd + ' thirdparty/win-libs-vc7/tiff/lib/libpandatiff.lib'
  1229. if (PkgSelected(opts,"VRPN")):
  1230. cmd = cmd + ' thirdparty/win-libs-vc7/vrpn/lib/vrpn.lib'
  1231. cmd = cmd + ' thirdparty/win-libs-vc7/vrpn/lib/quat.lib'
  1232. if (PkgSelected(opts,"FMOD")):
  1233. cmd = cmd + ' thirdparty/win-libs-vc7/fmod/lib/fmod.lib'
  1234. if (PkgSelected(opts,"MILES")):
  1235. cmd = cmd + ' thirdparty/win-libs-vc7/miles/lib/mss32.lib'
  1236. if (PkgSelected(opts,"NVIDIACG")):
  1237. if (opts.count("CGGL")):
  1238. cmd = cmd + ' thirdparty/win-libs-vc7/nvidiacg/lib/cgGL.lib'
  1239. if (opts.count("CGDX9")):
  1240. cmd = cmd + ' thirdparty/win-libs-vc7/nvidiacg/lib/cgD3D9.lib'
  1241. cmd = cmd + ' thirdparty/win-libs-vc7/nvidiacg/lib/cg.lib'
  1242. if (PkgSelected(opts,"HELIX")):
  1243. cmd = cmd + ' thirdparty/win-libs-vc7/helix/lib/runtlib.lib'
  1244. cmd = cmd + ' thirdparty/win-libs-vc7/helix/lib/syslib.lib'
  1245. cmd = cmd + ' thirdparty/win-libs-vc7/helix/lib/contlib.lib'
  1246. cmd = cmd + ' thirdparty/win-libs-vc7/helix/lib/debuglib.lib'
  1247. cmd = cmd + ' thirdparty/win-libs-vc7/helix/lib/utillib.lib'
  1248. cmd = cmd + ' thirdparty/win-libs-vc7/helix/lib/stlport_vc7.lib'
  1249. if (PkgSelected(opts,"NSPR")):
  1250. cmd = cmd + ' thirdparty/win-libs-vc7/nspr/lib/nspr4.lib'
  1251. if (PkgSelected(opts,"OPENSSL")):
  1252. cmd = cmd + ' thirdparty/win-libs-vc7/openssl/lib/libpandassl.lib'
  1253. cmd = cmd + ' thirdparty/win-libs-vc7/openssl/lib/libpandaeay.lib'
  1254. if (PkgSelected(opts,"FREETYPE")):
  1255. cmd = cmd + ' thirdparty/win-libs-vc7/freetype/lib/freetype.lib'
  1256. if (PkgSelected(opts,"FFTW")):
  1257. cmd = cmd + ' thirdparty/win-libs-vc7/fftw/lib/rfftw.lib'
  1258. cmd = cmd + ' thirdparty/win-libs-vc7/fftw/lib/fftw.lib'
  1259. for ver in MAYAVERSIONS:
  1260. if (PkgSelected(opts,"MAYA"+ver)):
  1261. cmd = cmd + ' "' + MAYASDK["MAYA"+ver] + '/lib/Foundation.lib"'
  1262. cmd = cmd + ' "' + MAYASDK["MAYA"+ver] + '/lib/OpenMaya.lib"'
  1263. cmd = cmd + ' "' + MAYASDK["MAYA"+ver] + '/lib/OpenMayaAnim.lib"'
  1264. cmd = cmd + ' "' + MAYASDK["MAYA"+ver] + '/lib/OpenMayaUI.lib"'
  1265. for ver in MAXVERSIONS:
  1266. if (PkgSelected(opts,"MAX"+ver)):
  1267. cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/core.lib"'
  1268. cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/edmodel.lib"'
  1269. cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/gfx.lib"'
  1270. cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/geom.lib"'
  1271. cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/mesh.lib"'
  1272. cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/maxutil.lib"'
  1273. cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/paramblk2.lib"'
  1274. if (PkgSelected(opts,"OPENCV")):
  1275. cmd = cmd + " /LIBPATH:thirdparty/win-libs-vc7/opencv/lib"
  1276. cmd = cmd + " cv.lib cxcore.lib cvaux.lib trs.lib highgui.lib"
  1277. oscmd(cmd)
  1278. def CompileLinkLINUXA(wdll, obj, wobj, opts, dll, ldef):
  1279. if (dll[-4:]==".exe"): cmd = 'g++ -o ' + wdll + ' -Lbuilt/lib -L/usr/X11R6/lib'
  1280. else: cmd = 'g++ -shared -o ' + wdll + ' -Lbuilt/lib -L/usr/X11R6/lib'
  1281. for x in obj:
  1282. suffix = x[-4:]
  1283. if (suffix==".obj"): cmd = cmd + ' built/tmp/' + x[:-4] + '.o'
  1284. elif (suffix==".dll"): cmd = cmd + ' -l' + x[3:-4]
  1285. elif (suffix==".lib"): cmd = cmd + ' built/lib/' + x[:-4] + '.a'
  1286. elif (suffix==".ilb"): cmd = cmd + ' built/tmp/' + x[:-4] + '.a'
  1287. if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -Lthirdparty/linux-libs-a/fmod/lib -lfmod-3.74'
  1288. if (PkgSelected(opts,"NVIDIACG")):
  1289. cmd = cmd + ' -Lthirdparty/nvidiacg/lib '
  1290. if (opts.count("CGGL")): cmd = cmd + " -lCgGL"
  1291. cmd = cmd + " -lCg"
  1292. if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -Lthirdparty/linux-libs-a/nspr/lib -lpandanspr4'
  1293. if (PkgSelected(opts,"ZLIB")): cmd = cmd + " -lz"
  1294. if (PkgSelected(opts,"PNG")): cmd = cmd + " -lpng"
  1295. if (PkgSelected(opts,"JPEG")): cmd = cmd + " -ljpeg"
  1296. if (PkgSelected(opts,"TIFF")): cmd = cmd + " -ltiff"
  1297. if (PkgSelected(opts,"OPENSSL")): cmd = cmd + " -lssl"
  1298. if (PkgSelected(opts,"FREETYPE")): cmd = cmd + " -lfreetype"
  1299. if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -Lthirdparty/linux-libs-a/vrpn/lib -lvrpn -lquat'
  1300. if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -Lthirdparty/linux-libs-a/fftw/lib -lrfftw -lfftw'
  1301. if (opts.count("GLUT")): cmd = cmd + " -lGL -lGLU"
  1302. oscmd(cmd)
  1303. def EnqueueLink(dll=0, obj=[], opts=[], xdep=[], ldef=0):
  1304. if (dll==0): exit("syntax error in EnqueueLink directive")
  1305. if (COMPILER=="MSVC7"):
  1306. wobj = []
  1307. for x in obj:
  1308. suffix = x[-4:]
  1309. if (suffix==".obj"): wobj.append("built/tmp/"+x)
  1310. elif (suffix==".dll"): wobj.append("built/lib/"+x[:-4]+".lib")
  1311. elif (suffix==".lib"): wobj.append("built/lib/"+x)
  1312. elif (suffix==".ilb"): wobj.append("built/tmp/"+x[:-4]+".lib")
  1313. else: exit("unknown suffix in object list.")
  1314. if (dll[-4:]==".exe"):
  1315. wdll = "built/bin/"+dll
  1316. if (SLAVEBUILD!=0) and (SLAVEBUILD!=wdll): return
  1317. DependencyQueue(CompileLinkMSVC7, [wdll, 0, wobj, opts, dll, ldef], [wdll], wobj, [])
  1318. elif (dll[-4:]==".dll"):
  1319. wdll = "built/bin/"+dll
  1320. wlib = "built/lib/"+dll[:-4]+".lib"
  1321. if (SLAVEBUILD!=0) and (SLAVEBUILD!=wdll): return
  1322. DependencyQueue(CompileLinkMSVC7, [wdll, wlib, wobj, opts, dll, ldef], [wdll, wlib], wobj, [])
  1323. else:
  1324. wdll = "built/plugins/"+dll
  1325. if (SLAVEBUILD!=0) and (SLAVEBUILD!=wdll): return
  1326. DependencyQueue(CompileLinkMSVC7, [wdll, 0, wobj, opts, dll, ldef], [wdll], wobj, [])
  1327. if (COMPILER=="LINUXA"):
  1328. if (dll[-4:]==".exe"): wdll = "built/bin/"+dll[:-4]
  1329. else: wdll = "built/lib/"+dll[:-4]+".so"
  1330. wobj = []
  1331. for x in obj:
  1332. suffix = x[-4:]
  1333. if (suffix==".obj"): wobj.append("built/tmp/"+x[:-4]+".o")
  1334. elif (suffix==".dll"): wobj.append("built/lib/"+x[:-4]+".so")
  1335. elif (suffix==".lib"): wobj.append("built/lib/"+x[:-4]+".a")
  1336. elif (suffix==".ilb"): wobj.append("built/tmp/"+x[:-4]+".a")
  1337. else: exit("unknown suffix in object list.")
  1338. if (SLAVEBUILD!=0) and (SLAVEBUILD!=wdll): return
  1339. DependencyQueue(CompileLinkLINUXA, [wdll, obj, wobj, opts, dll, ldef], [wdll], wobj, [])
  1340. ##########################################################################################
  1341. #
  1342. # EnqueueBam
  1343. #
  1344. ##########################################################################################
  1345. def CompileBam(preconv, bam, egg):
  1346. if (egg[-4:] == ".flt"):
  1347. ifile = os.path.basename(egg)
  1348. oscmd("built/bin/flt2egg " + preconv + " -o built/tmp/"+ifile+".egg" + " " + egg)
  1349. oscmd("built/bin/egg2bam -o " + bam + " built/tmp/"+ifile+".egg")
  1350. else:
  1351. oscmd("built/bin/egg2bam " + preconv + " -o " + bam + " " + egg)
  1352. def EnqueueBam(preconv, bam, egg):
  1353. if (sys.platform == "win32"):
  1354. flt2egg = "built/bin/flt2egg.exe"
  1355. egg2bam = "built/bin/egg2bam.exe"
  1356. else:
  1357. flt2egg = "built/bin/flt2egg"
  1358. egg2bam = "built/bin/egg2bam"
  1359. DependencyQueue(CompileBam, [preconv, bam, egg], [bam], [egg], [flt2egg, egg2bam])
  1360. ##########################################################################################
  1361. #
  1362. # If the 'make depend' process discovers an 'include'
  1363. # directive that includes one of the following files,
  1364. # the specified file is not added as a dependency,
  1365. # nor is it traversed.
  1366. #
  1367. ##########################################################################################
  1368. CxxIgnoreHeader["Python.h"] = 1
  1369. CxxIgnoreHeader["Python/Python.h"] = 1
  1370. CxxIgnoreHeader["Cg/cg.h"] = 1
  1371. CxxIgnoreHeader["Cg/cgGL.h"] = 1
  1372. CxxIgnoreHeader["alloc.h"] = 1
  1373. CxxIgnoreHeader["ctype.h"] = 1
  1374. CxxIgnoreHeader["stdlib.h"] = 1
  1375. CxxIgnoreHeader["ipc_thread.h"] = 1
  1376. CxxIgnoreHeader["platform/symbian/symbian_print.h"] = 1
  1377. CxxIgnoreHeader["hxtypes.h"] = 1
  1378. CxxIgnoreHeader["hxcom.h"] = 1
  1379. CxxIgnoreHeader["hxiids.h"] = 1
  1380. CxxIgnoreHeader["hxpiids.h"] = 1
  1381. CxxIgnoreHeader["dsound.h"] = 1
  1382. CxxIgnoreHeader["hlxosstr.h"] = 1
  1383. CxxIgnoreHeader["ddraw.h"] = 1
  1384. CxxIgnoreHeader["mss.h"] = 1
  1385. CxxIgnoreHeader["MacSocket.h"] = 1
  1386. CxxIgnoreHeader["textureTransition.h"] = 1
  1387. CxxIgnoreHeader["transformTransition.h"] = 1
  1388. CxxIgnoreHeader["billboardTransition.h"] = 1
  1389. CxxIgnoreHeader["transformTransition.h"] = 1
  1390. CxxIgnoreHeader["transparencyTransition.h"] = 1
  1391. CxxIgnoreHeader["allTransitionsWrapper.h"] = 1
  1392. CxxIgnoreHeader["allTransitionsWrapper.h"] = 1
  1393. CxxIgnoreHeader["namedNode.h"] = 1
  1394. CxxIgnoreHeader["renderRelation.h"] = 1
  1395. CxxIgnoreHeader["renderTraverser.h"] = 1
  1396. CxxIgnoreHeader["get_rel_pos.h"] = 1
  1397. # Ignore Windows headers.
  1398. CxxIgnoreHeader["windows.h"] = 1
  1399. CxxIgnoreHeader["windef.h"] = 1
  1400. CxxIgnoreHeader["afxres.h"] = 1
  1401. # Ignore MAX headers
  1402. CxxIgnoreHeader["Max.h"] = 1
  1403. CxxIgnoreHeader["iparamb2.h"] = 1
  1404. CxxIgnoreHeader["iparamm2.h"] = 1
  1405. CxxIgnoreHeader["istdplug.h"] = 1
  1406. CxxIgnoreHeader["iskin.h"] = 1
  1407. CxxIgnoreHeader["stdmat.h"] = 1
  1408. CxxIgnoreHeader["phyexp.h"] = 1
  1409. CxxIgnoreHeader["bipexp.h"] = 1
  1410. CxxIgnoreHeader["modstack.h"] = 1
  1411. CxxIgnoreHeader["decomp.h"] = 1
  1412. CxxIgnoreHeader["shape.h"] = 1
  1413. CxxIgnoreHeader["simpobj.h"] = 1
  1414. CxxIgnoreHeader["surf_api.h"] = 1
  1415. # OpenSSL headers
  1416. CxxIgnoreHeader["openssl/evp.h"] = 1
  1417. CxxIgnoreHeader["openssl/rand.h"] = 1
  1418. CxxIgnoreHeader["openssl/md5.h"] = 1
  1419. CxxIgnoreHeader["openssl/err.h"] = 1
  1420. CxxIgnoreHeader["openssl/ssl.h"] = 1
  1421. CxxIgnoreHeader["openssl/pem.h"] = 1
  1422. CxxIgnoreHeader["openssl/rsa.h"] = 1
  1423. CxxIgnoreHeader["openssl/bio.h"] = 1
  1424. CxxIgnoreHeader["openssl/x509.h"] = 1
  1425. # STD headers
  1426. CxxIgnoreHeader["map"] = 1
  1427. CxxIgnoreHeader["vector"] = 1
  1428. CxxIgnoreHeader["set"] = 1
  1429. CxxIgnoreHeader["algorithm"] = 1
  1430. ##########################################################################################
  1431. #
  1432. # Create the directory tree
  1433. #
  1434. ##########################################################################################
  1435. MakeDirectory("built")
  1436. MakeDirectory("built/bin")
  1437. MakeDirectory("built/lib")
  1438. MakeDirectory("built/etc")
  1439. MakeDirectory("built/plugins")
  1440. MakeDirectory("built/include")
  1441. MakeDirectory("built/include/parser-inc")
  1442. MakeDirectory("built/include/parser-inc/openssl")
  1443. MakeDirectory("built/include/parser-inc/Cg")
  1444. MakeDirectory("built/include/openssl")
  1445. MakeDirectory("built/tmp")
  1446. MakeDirectory("built/models")
  1447. MakeDirectory("built/models/audio")
  1448. MakeDirectory("built/models/audio/sfx")
  1449. MakeDirectory("built/models/icons")
  1450. MakeDirectory("built/models/maps")
  1451. MakeDirectory("built/models/misc")
  1452. MakeDirectory("built/models/gui")
  1453. MakeDirectory("built/tmp/GreetingCard")
  1454. MakeDirectory("built/tmp/GreetingCard/models")
  1455. MakeDirectory("built/tmp/GreetingCard/sound")
  1456. if (OMIT.count("PYTHON")==0):
  1457. MakeDirectory("built/direct")
  1458. MakeDirectory("built/pandac")
  1459. MakeDirectory("built/pandac/input")
  1460. ########################################################################
  1461. #
  1462. # If using the Master-Slave build system,
  1463. # receive command-line arguments from master to slave
  1464. #
  1465. ########################################################################
  1466. if (SLAVEBUILD!=0):
  1467. try:
  1468. slavectrl=open("built/tmp/slave-control","rb")
  1469. OMIT = cPickle.load(slavectrl)
  1470. OPTIMIZE = cPickle.load(slavectrl)
  1471. slavectrl.close()
  1472. except: exit("Cannot read from built/tmp/slave-control")
  1473. if (SLAVEFILE!=0):
  1474. try:
  1475. slavectrl=open("built/tmp/slave-control","wb")
  1476. cPickle.dump(OMIT, slavectrl, 1)
  1477. cPickle.dump(OPTIMIZE, slavectrl, 1)
  1478. slavectrl.close()
  1479. except: exit("Cannot write to built/tmp/slave-control")
  1480. ##########################################################################################
  1481. #
  1482. # Generate dtool_config.h and dtool_have_xxx.dat
  1483. #
  1484. ##########################################################################################
  1485. DTOOLDEFAULTS=[
  1486. #_Variable_________________________Windows___________________Unix__________
  1487. ("HAVE_PYTHON", '1', '1'),
  1488. ("PYTHON_FRAMEWORK", 'UNDEF', 'UNDEF'),
  1489. ("COMPILE_IN_DEFAULT_FONT", '1', '1'),
  1490. ("HAVE_MAYA", '1', '1'),
  1491. ("MAYA_PRE_5_0", 'UNDEF', 'UNDEF'),
  1492. ("HAVE_SOFTIMAGE", 'UNDEF', 'UNDEF'),
  1493. ("SSL_097", 'UNDEF', 'UNDEF'),
  1494. ("REPORT_OPENSSL_ERRORS", '1', '1'),
  1495. ("HAVE_GL", '1', '1'),
  1496. ("HAVE_MESA", 'UNDEF', 'UNDEF'),
  1497. ("MESA_MGL", 'UNDEF', 'UNDEF'),
  1498. ("HAVE_SGIGL", 'UNDEF', 'UNDEF'),
  1499. ("HAVE_GLX", 'UNDEF', '1'),
  1500. ("HAVE_WGL", '1', 'UNDEF'),
  1501. ("HAVE_DX", '1', 'UNDEF'),
  1502. ("HAVE_CHROMIUM", 'UNDEF', 'UNDEF'),
  1503. ("HAVE_THREADS", 'UNDEF', 'UNDEF'),
  1504. ("HAVE_AUDIO", '1', '1'),
  1505. ("NOTIFY_DEBUG", 'UNDEF', 'UNDEF'),
  1506. ("DO_PSTATS", 'UNDEF', 'UNDEF'),
  1507. ("DO_COLLISION_RECORDING", 'UNDEF', 'UNDEF'),
  1508. ("TRACK_IN_INTERPRETER", 'UNDEF', 'UNDEF'),
  1509. ("DO_MEMORY_USAGE", 'UNDEF', 'UNDEF'),
  1510. ("DO_PIPELINING", 'UNDEF', 'UNDEF'),
  1511. ("EXPORT_TEMPLATES", 'yes', 'yes'),
  1512. ("LINK_IN_GL", 'UNDEF', 'UNDEF'),
  1513. ("LINK_IN_PHYSICS", 'UNDEF', 'UNDEF'),
  1514. ("DEFAULT_PATHSEP", '";"', '":"'),
  1515. ("DEFAULT_PRC_DIR", '"<auto>etc"', '"<auto>etc"'),
  1516. ("PRC_DIR_ENVVARS", '"PANDA_PRC_DIR"', '"PANDA_PRC_DIR"'),
  1517. ("PRC_PATH_ENVVARS", '"PANDA_PRC_PATH"', '"PANDA_PRC_PATH"'),
  1518. ("PRC_PATTERNS", '"*.prc"', '"*.prc"'),
  1519. ("PRC_EXECUTABLE_PATTERNS", '""', '""'),
  1520. ("PRC_EXECUTABLE_ARGS_ENVVAR", '"PANDA_PRC_XARGS"', '"PANDA_PRC_XARGS"'),
  1521. ("PRC_PUBLIC_KEYS_FILENAME", '""', '""'),
  1522. ("PRC_RESPECT_TRUST_LEVEL", 'UNDEF', 'UNDEF'),
  1523. ("PRC_SAVE_DESCRIPTIONS", '1', '1'),
  1524. ("WORDS_BIGENDIAN", 'UNDEF', 'UNDEF'),
  1525. ("HAVE_NAMESPACE", '1', '1'),
  1526. ("HAVE_OPEN_MASK", 'UNDEF', 'UNDEF'),
  1527. ("HAVE_WCHAR_T", '1', '1'),
  1528. ("HAVE_WSTRING", '1', '1'),
  1529. ("HAVE_TYPENAME", '1', '1'),
  1530. ("SIMPLE_STRUCT_POINTERS", '1', 'UNDEF'),
  1531. ("HAVE_DINKUM", 'UNDEF', 'UNDEF'),
  1532. ("HAVE_STL_HASH", 'UNDEF', 'UNDEF'),
  1533. ("HAVE_GETTIMEOFDAY", 'UNDEF', '1'),
  1534. ("GETTIMEOFDAY_ONE_PARAM", 'UNDEF', 'UNDEF'),
  1535. ("HAVE_GETOPT", 'UNDEF', '1'),
  1536. ("HAVE_GETOPT_LONG_ONLY", 'UNDEF', '1'),
  1537. ("HAVE_GETOPT_H", 'UNDEF', '1'),
  1538. ("IOCTL_TERMINAL_WIDTH", 'UNDEF', '1'),
  1539. ("HAVE_STREAMSIZE", '1', '1'),
  1540. ("HAVE_IOS_TYPEDEFS", '1', '1'),
  1541. ("HAVE_IOS_BINARY", '1', '1'),
  1542. ("STATIC_INIT_GETENV", '1', 'UNDEF'),
  1543. ("HAVE_PROC_SELF_EXE", 'UNDEF', '1'),
  1544. ("HAVE_PROC_SELF_MAPS", 'UNDEF', '1'),
  1545. ("HAVE_PROC_SELF_ENVIRON", 'UNDEF', '1'),
  1546. ("HAVE_PROC_SELF_CMDLINE", 'UNDEF', '1'),
  1547. ("HAVE_GLOBAL_ARGV", '1', 'UNDEF'),
  1548. ("PROTOTYPE_GLOBAL_ARGV", 'UNDEF', 'UNDEF'),
  1549. ("GLOBAL_ARGV", '__argv', 'UNDEF'),
  1550. ("GLOBAL_ARGC", '__argc', 'UNDEF'),
  1551. ("HAVE_IO_H", '1', 'UNDEF'),
  1552. ("HAVE_IOSTREAM", '1', '1'),
  1553. ("HAVE_MALLOC_H", '1', '1'),
  1554. ("HAVE_SYS_MALLOC_H", 'UNDEF', 'UNDEF'),
  1555. ("HAVE_ALLOCA_H", 'UNDEF', '1'),
  1556. ("HAVE_LOCALE_H", 'UNDEF', '1'),
  1557. ("HAVE_MINMAX_H", '1', 'UNDEF'),
  1558. ("HAVE_SSTREAM", '1', '1'),
  1559. ("HAVE_NEW", '1', '1'),
  1560. ("HAVE_SYS_TYPES_H", '1', '1'),
  1561. ("HAVE_SYS_TIME_H", 'UNDEF', '1'),
  1562. ("HAVE_UNISTD_H", 'UNDEF', '1'),
  1563. ("HAVE_UTIME_H", 'UNDEF', '1'),
  1564. ("HAVE_GLOB_H", 'UNDEF', '1'),
  1565. ("HAVE_DIRENT_H", 'UNDEF', '1'),
  1566. ("HAVE_SYS_SOUNDCARD_H", 'UNDEF', '1'),
  1567. ("HAVE_RTTI", '1', '1'),
  1568. ("GLOBAL_OPERATOR_NEW_EXCEPTIONS", 'UNDEF', '1'),
  1569. ("OLD_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'),
  1570. ("GNU_STYLE_ALLOCATOR", 'UNDEF', '1'),
  1571. ("VC6_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'),
  1572. ("MODERN_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'),
  1573. ("NO_STYLE_ALLOCATOR", '1', 'UNDEF'),
  1574. ("USE_MEMORY_DLMALLOC", '1', 'UNDEF'),
  1575. ("USE_MEMORY_PTMALLOC", 'UNDEF', 'UNDEF'),
  1576. ("USE_MEMORY_MALLOC", 'UNDEF', '1'),
  1577. ("HAVE_ZLIB", 'UNDEF', 'UNDEF'),
  1578. ("HAVE_PNG", 'UNDEF', 'UNDEF'),
  1579. ("HAVE_JPEG", 'UNDEF', 'UNDEF'),
  1580. ("HAVE_TIFF", 'UNDEF', 'UNDEF'),
  1581. ("HAVE_VRPN", 'UNDEF', 'UNDEF'),
  1582. ("HAVE_FMOD", 'UNDEF', 'UNDEF'),
  1583. ("HAVE_NVIDIACG", 'UNDEF', 'UNDEF'),
  1584. ("HAVE_NSPR", 'UNDEF', 'UNDEF'),
  1585. ("HAVE_FREETYPE", 'UNDEF', 'UNDEF'),
  1586. ("HAVE_FFTW", 'UNDEF', 'UNDEF'),
  1587. ("HAVE_OPENSSL", 'UNDEF', 'UNDEF'),
  1588. ("HAVE_NET", 'UNDEF', 'UNDEF'),
  1589. ("HAVE_CG", 'UNDEF', 'UNDEF'),
  1590. ("HAVE_CGGL", 'UNDEF', 'UNDEF'),
  1591. ("HAVE_CGDX9", 'UNDEF', 'UNDEF'),
  1592. ("HAVE_OPENCV", 'UNDEF', 'UNDEF'),
  1593. ]
  1594. def CalculateDtoolConfig():
  1595. dtoolconfig={}
  1596. if (sys.platform == "win32"):
  1597. for key,win,unix in DTOOLDEFAULTS:
  1598. dtoolconfig[key] = win
  1599. else:
  1600. for key,win,unix in DTOOLDEFAULTS:
  1601. dtoolconfig[key] = unix
  1602. for x in PACKAGES:
  1603. if (OMIT.count(x)==0):
  1604. if (dtoolconfig.has_key("HAVE_"+x)):
  1605. dtoolconfig["HAVE_"+x] = '1'
  1606. dtoolconfig["HAVE_NET"] = dtoolconfig["HAVE_NSPR"]
  1607. if (OMIT.count("NVIDIACG")==0):
  1608. dtoolconfig["HAVE_CG"] = '1'
  1609. dtoolconfig["HAVE_CGGL"] = '1'
  1610. dtoolconfig["HAVE_CGDX9"] = '1'
  1611. if (OPTIMIZE <= 3):
  1612. if (dtoolconfig["HAVE_NET"] != 'UNDEF'):
  1613. dtoolconfig["DO_PSTATS"] = '1'
  1614. if (OPTIMIZE <= 3):
  1615. dtoolconfig["DO_COLLISION_RECORDING"] = '1'
  1616. #if (OPTIMIZE <= 2):
  1617. # dtoolconfig["TRACK_IN_INTERPRETER"] = '1'
  1618. if (OPTIMIZE <= 3):
  1619. dtoolconfig["DO_MEMORY_USAGE"] = '1'
  1620. #if (OPTIMIZE <= 1):
  1621. # dtoolconfig["DO_PIPELINING"] = '1'
  1622. if (OPTIMIZE <= 3):
  1623. dtoolconfig["NOTIFY_DEBUG"] = '1'
  1624. conf = "/* dtool_config.h. Generated automatically by makepanda.py */\n"
  1625. for key,win,unix in DTOOLDEFAULTS:
  1626. val = dtoolconfig[key]
  1627. if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
  1628. else: conf = conf + "#define " + key + " " + val + "\n"
  1629. return conf
  1630. if (SLAVEBUILD==0):
  1631. for x in PACKAGES:
  1632. if (OMIT.count(x)): ConditionalWriteFile('built/tmp/dtool_have_'+x.lower()+'.dat',"0\n")
  1633. else: ConditionalWriteFile('built/tmp/dtool_have_'+x.lower()+'.dat',"1\n")
  1634. ConditionalWriteFile('built/include/dtool_config.h', CalculateDtoolConfig())
  1635. ##########################################################################################
  1636. #
  1637. # Generate pandaVersion.h, pythonversion, null.cxx
  1638. #
  1639. ##########################################################################################
  1640. PANDAVERSION_H="""
  1641. #define PANDA_MAJOR_VERSION VERSION1
  1642. #define PANDA_MINOR_VERSION VERSION2
  1643. #define PANDA_SEQUENCE_VERSION VERSION2
  1644. #undef PANDA_OFFICIAL_VERSION
  1645. #define PANDA_VERSION NVERSION
  1646. #define PANDA_VERSION_STR "VERSION1.VERSION2.VERSION3"
  1647. #define PANDA_DISTRIBUTOR "makepanda"
  1648. """
  1649. CHECKPANDAVERSION_CXX="""
  1650. # include "dtoolbase.h"
  1651. EXPCL_DTOOL int panda_version_VERSION1_VERSION2_VERSION3 = 0;
  1652. """
  1653. CHECKPANDAVERSION_H="""
  1654. # include "dtoolbase.h"
  1655. extern EXPCL_DTOOL int panda_version_VERSION1_VERSION2_VERSION3;
  1656. # ifndef WIN32
  1657. /* For Windows, exporting the symbol from the DLL is sufficient; the
  1658. DLL will not load unless all expected public symbols are defined.
  1659. Other systems may not mind if the symbol is absent unless we
  1660. explictly write code that references it. */
  1661. static int check_panda_version = panda_version_VERSION1_VERSION2_VERSION3;
  1662. # endif
  1663. """
  1664. def CreatePandaVersionFiles():
  1665. version1=int(VERSION.split(".")[0])
  1666. version2=int(VERSION.split(".")[1])
  1667. version3=int(VERSION.split(".")[2])
  1668. nversion=version1*1000000+version2*1000+version3
  1669. pandaversion_h = PANDAVERSION_H.replace("VERSION1",str(version1))
  1670. pandaversion_h = pandaversion_h.replace("VERSION2",str(version2))
  1671. pandaversion_h = pandaversion_h.replace("VERSION3",str(version3))
  1672. pandaversion_h = pandaversion_h.replace("NVERSION",str(nversion))
  1673. checkpandaversion_cxx = CHECKPANDAVERSION_CXX.replace("VERSION1",str(version1))
  1674. checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION2",str(version2))
  1675. checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION3",str(version3))
  1676. checkpandaversion_cxx = checkpandaversion_cxx.replace("NVERSION",str(nversion))
  1677. checkpandaversion_h = CHECKPANDAVERSION_H.replace("VERSION1",str(version1))
  1678. checkpandaversion_h = checkpandaversion_h.replace("VERSION2",str(version2))
  1679. checkpandaversion_h = checkpandaversion_h.replace("VERSION3",str(version3))
  1680. checkpandaversion_h = checkpandaversion_h.replace("NVERSION",str(nversion))
  1681. ConditionalWriteFile('built/include/pandaVersion.h', pandaversion_h)
  1682. ConditionalWriteFile('built/include/checkPandaVersion.cxx', checkpandaversion_cxx)
  1683. ConditionalWriteFile('built/include/checkPandaVersion.h', checkpandaversion_h)
  1684. if (OMIT.count("PYTHON")==0):
  1685. ConditionalWriteFile("built/tmp/pythonversion", os.path.basename(PYTHONSDK))
  1686. ConditionalWriteFile("built/tmp/null.cxx","")
  1687. if (SLAVEBUILD==0): CreatePandaVersionFiles()
  1688. ##########################################################################################
  1689. #
  1690. # Generate direct/__init__.py
  1691. #
  1692. ##########################################################################################
  1693. DIRECTINIT="""
  1694. import os,sys
  1695. srcdir1 = os.path.join(__path__[0], 'src')
  1696. srcdir2 = os.path.join(__path__[0], '..', '..', 'direct', 'src')
  1697. if (os.path.isdir(srcdir1)): __path__[0] = srcdir1
  1698. elif (os.path.isdir(srcdir2)): __path__[0] = srcdir2
  1699. else: exit("Cannot find the 'direct' tree")
  1700. """
  1701. if (SLAVEBUILD==0) and (OMIT.count("PYTHON")==0):
  1702. ConditionalWriteFile('built/direct/__init__.py', DIRECTINIT)
  1703. ##########################################################################################
  1704. #
  1705. # Generate the PRC files into the ETC directory.
  1706. #
  1707. ##########################################################################################
  1708. if (SLAVEBUILD==0):
  1709. confautoprc=ReadFile("makepanda/confauto.in")
  1710. if (os.path.isfile("makepanda/myconfig.in")):
  1711. configprc=ReadFile("makepanda/myconfig.in")
  1712. else:
  1713. configprc=ReadFile("makepanda/config.in")
  1714. if (sys.platform != "win32"):
  1715. confautoprc = confautoprc.replace("aux-display pandadx9","")
  1716. confautoprc = confautoprc.replace("aux-display pandadx8","")
  1717. confautoprc = confautoprc.replace("aux-display pandadx7","")
  1718. ConditionalWriteFile("built/etc/Confauto.prc", confautoprc)
  1719. ConditionalWriteFile("built/etc/Config.prc", configprc)
  1720. ##########################################################################################
  1721. #
  1722. # Copy the precompiled binaries and DLLs into the build.
  1723. #
  1724. ##########################################################################################
  1725. if (SLAVEBUILD==0):
  1726. for pkg in (PACKAGES + ["extras"]):
  1727. if (OMIT.count(pkg)==0):
  1728. if (COMPILER == "MSVC7"):
  1729. if (os.path.exists("thirdparty/win-libs-vc7/"+pkg.lower()+"/bin")):
  1730. CopyAllFiles("built/bin/","thirdparty/win-libs-vc7/"+pkg.lower()+"/bin/")
  1731. if (COMPILER == "LINUXA"):
  1732. if (os.path.exists("thirdparty/linux-libs-a/"+pkg.lower()+"/lib")):
  1733. CopyAllFiles("built/lib/","thirdparty/linux-libs-a/"+pkg.lower()+"/lib/")
  1734. if (sys.platform == "win32"):
  1735. CopyFile('built/bin/', 'thirdparty/win-python/python24.dll')
  1736. if (OMIT.count("PYTHON")==0):
  1737. CopyTree('built/python', 'thirdparty/win-python')
  1738. ConditionalWriteFile('built/python/panda.pth',"..\n../bin\n")
  1739. ########################################################################
  1740. ##
  1741. ## Copy various stuff into the build.
  1742. ##
  1743. ########################################################################
  1744. if (SLAVEBUILD==0):
  1745. CopyFile("built/", "doc/LICENSE")
  1746. CopyFile("built/", "doc/ReleaseNotes")
  1747. CopyAllFiles("built/plugins/", "pandatool/src/scripts/", ".mel")
  1748. CopyAllFiles("built/plugins/", "pandatool/src/scripts/", ".ms")
  1749. if (OMIT.count("PYTHON")==0):
  1750. CopyTree('built/Pmw', 'thirdparty/Pmw')
  1751. CopyTree('built/SceneEditor', 'SceneEditor')
  1752. ConditionalWriteFile('built/include/ctl3d.h', '/* dummy file to make MAX happy */')
  1753. ########################################################################
  1754. #
  1755. # Copy header files to the built/include/parser-inc directory.
  1756. #
  1757. ########################################################################
  1758. if (SLAVEBUILD==0):
  1759. CopyAllFiles('built/include/parser-inc/','dtool/src/parser-inc/')
  1760. CopyAllFiles('built/include/parser-inc/openssl/','dtool/src/parser-inc/')
  1761. CopyFile('built/include/parser-inc/Cg/','dtool/src/parser-inc/cg.h')
  1762. CopyFile('built/include/parser-inc/Cg/','dtool/src/parser-inc/cgGL.h')
  1763. ########################################################################
  1764. #
  1765. # This section contains a list of all the files that need to be compiled.
  1766. #
  1767. ########################################################################
  1768. if (SLAVEBUILD==0):
  1769. print "Generating dependencies..."
  1770. sys.stdout.flush()
  1771. #
  1772. # DIRECTORY: dtool/src/dtoolbase/
  1773. #
  1774. CopyAllHeaders('dtool/src/dtoolbase')
  1775. IPATH=['dtool/src/dtoolbase']
  1776. OPTS=['BUILDING_DTOOL', 'NSPR', 'OPT3']
  1777. EnqueueCxx(ipath=IPATH, opts=OPTS, src='indent.cxx', obj='dtoolbase_indent.obj')
  1778. if (sys.platform == "win32"):
  1779. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dlmalloc.c', obj='dtoolbase_allocator.obj')
  1780. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtoolbase.cxx', obj='dtoolbase_dtoolbase.obj')
  1781. else:
  1782. EnqueueCxx(ipath=IPATH, opts=OPTS, src='null.cxx', obj='dtoolbase_allocator.obj')
  1783. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtoolbase.cxx', obj='dtoolbase_dtoolbase.obj')
  1784. #
  1785. # DIRECTORY: dtool/src/dtoolutil/
  1786. #
  1787. CopyAllHeaders('dtool/src/dtoolutil', skip=["pandaVersion.h", "checkPandaVersion.h"])
  1788. IPATH=['dtool/src/dtoolutil']
  1789. OPTS=['BUILDING_DTOOL', 'NSPR', 'OPT3']
  1790. CopyFile('built/include/','dtool/src/dtoolutil/vector_src.cxx')
  1791. EnqueueCxx(ipath=IPATH, opts=OPTS, src='gnu_getopt.c', obj='dtoolutil_gnu_getopt.obj')
  1792. EnqueueCxx(ipath=IPATH, opts=OPTS, src='gnu_getopt1.c', obj='dtoolutil_gnu_getopt1.obj')
  1793. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtoolutil_composite.cxx', obj='dtoolutil_composite.obj')
  1794. #
  1795. # DIRECTORY: dtool/metalibs/dtool/
  1796. #
  1797. CopyAllHeaders('dtool/metalibs/dtool')
  1798. IPATH=['dtool/metalibs/dtool']
  1799. OPTS=['BUILDING_DTOOL', 'NSPR', 'OPT3']
  1800. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtool.cxx', obj='dtool_dtool.obj')
  1801. EnqueueLink(opts=['ADVAPI', 'NSPR', 'OPT3'], dll='libdtool.dll', obj=[
  1802. 'dtool_dtool.obj',
  1803. 'dtoolutil_gnu_getopt.obj',
  1804. 'dtoolutil_gnu_getopt1.obj',
  1805. 'dtoolutil_composite.obj',
  1806. 'dtoolbase_dtoolbase.obj',
  1807. 'dtoolbase_allocator.obj',
  1808. 'dtoolbase_indent.obj',
  1809. ])
  1810. #
  1811. # DIRECTORY: dtool/src/cppparser/
  1812. #
  1813. CopyAllHeaders('dtool/src/cppparser', skip="ALL")
  1814. IPATH=['dtool/src/cppparser']
  1815. OPTS=['NSPR','OPT3']
  1816. EnqueueBison(ipath=IPATH, opts=OPTS, pre='cppyy', src='cppBison.yxx', dsth='cppBison.h', obj='cppParser_cppBison.obj')
  1817. EnqueueCxx(ipath=IPATH, opts=OPTS, src='cppParser_composite.cxx', obj='cppParser_composite.obj')
  1818. EnqueueLib(lib='libcppParser.ilb', obj=[
  1819. 'cppParser_composite.obj',
  1820. 'cppParser_cppBison.obj',
  1821. ])
  1822. #
  1823. # DIRECTORY: dtool/src/prc/
  1824. #
  1825. CopyAllHeaders('dtool/src/prc')
  1826. IPATH=['dtool/src/prc']
  1827. OPTS=['BUILDING_DTOOLCONFIG', 'OPENSSL', 'NSPR', 'OPT3']
  1828. EnqueueCxx(ipath=IPATH, opts=OPTS, src='prc_composite.cxx', obj='prc_composite.obj')
  1829. #
  1830. # DIRECTORY: dtool/src/dconfig/
  1831. #
  1832. CopyAllHeaders('dtool/src/dconfig')
  1833. IPATH=['dtool/src/dconfig']
  1834. OPTS=['BUILDING_DTOOLCONFIG', 'NSPR', 'OPT3']
  1835. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dconfig_composite.cxx', obj='dconfig_composite.obj')
  1836. #
  1837. # DIRECTORY: dtool/src/interrogatedb/
  1838. #
  1839. CopyAllHeaders('dtool/src/interrogatedb')
  1840. IPATH=['dtool/src/interrogatedb']
  1841. OPTS=['BUILDING_DTOOLCONFIG', 'NSPR', 'OPT3']
  1842. EnqueueCxx(ipath=IPATH, opts=OPTS, src='interrogatedb_composite.cxx', obj='interrogatedb_composite.obj')
  1843. #
  1844. # DIRECTORY: dtool/metalibs/dtoolconfig/
  1845. #
  1846. CopyAllHeaders('dtool/metalibs/dtoolconfig')
  1847. IPATH=['dtool/metalibs/dtoolconfig']
  1848. OPTS=['BUILDING_DTOOLCONFIG', 'NSPR', 'OPT3']
  1849. SRCFILE="pydtool.cxx"
  1850. if (OMIT.count("PYTHON")): SRCFILE="null.cxx"
  1851. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtoolconfig.cxx', obj='dtoolconfig_dtoolconfig.obj')
  1852. EnqueueCxx(ipath=IPATH, opts=OPTS, src=SRCFILE, obj='dtoolconfig_pydtool.obj', xdep=["built/tmp/dtool_have_python.dat"])
  1853. EnqueueLink(opts=['ADVAPI', 'NSPR', 'OPENSSL', 'OPT3'], dll='libdtoolconfig.dll', obj=[
  1854. 'dtoolconfig_dtoolconfig.obj',
  1855. 'dtoolconfig_pydtool.obj',
  1856. 'interrogatedb_composite.obj',
  1857. 'dconfig_composite.obj',
  1858. 'prc_composite.obj',
  1859. 'libdtool.dll',
  1860. ])
  1861. #
  1862. # DIRECTORY: dtool/src/pystub/
  1863. #
  1864. CopyAllHeaders('dtool/src/pystub')
  1865. IPATH=['dtool/src/pystub']
  1866. OPTS=['BUILDING_DTOOLCONFIG', 'NSPR', 'OPT3']
  1867. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pystub.cxx', obj='pystub_pystub.obj')
  1868. EnqueueLink(opts=['ADVAPI', 'NSPR', 'OPT3'], dll='libpystub.dll', obj=[
  1869. 'pystub_pystub.obj',
  1870. 'libdtool.dll',
  1871. ])
  1872. #
  1873. # DIRECTORY: dtool/src/interrogate/
  1874. #
  1875. CopyAllHeaders('dtool/src/interrogate')
  1876. IPATH=['dtool/src/interrogate', 'dtool/src/cppparser', 'dtool/src/interrogatedb']
  1877. OPTS=['NSPR', 'OPT3']
  1878. EnqueueCxx(ipath=IPATH, opts=OPTS, src='interrogate_composite.cxx', obj='interrogate_composite.obj')
  1879. EnqueueLink(opts=['ADVAPI', 'NSPR', 'OPENSSL', 'OPT3'], dll='interrogate.exe', obj=[
  1880. 'interrogate_composite.obj',
  1881. 'libcppParser.ilb',
  1882. 'libpystub.dll',
  1883. 'libdtoolconfig.dll',
  1884. 'libdtool.dll',
  1885. ])
  1886. EnqueueCxx(ipath=IPATH, opts=OPTS, src='interrogate_module.cxx', obj='interrogate_module_interrogate_module.obj')
  1887. EnqueueLink(opts=['ADVAPI', 'NSPR', 'OPENSSL', 'OPT3'], dll='interrogate_module.exe', obj=[
  1888. 'interrogate_module_interrogate_module.obj',
  1889. 'libcppParser.ilb',
  1890. 'libpystub.dll',
  1891. 'libdtoolconfig.dll',
  1892. 'libdtool.dll',
  1893. ])
  1894. EnqueueCxx(ipath=IPATH, opts=OPTS, src='parse_file.cxx', obj='parse_file_parse_file.obj')
  1895. EnqueueLink(opts=['ADVAPI', 'NSPR', 'OPENSSL', 'OPT3'], dll='parse_file.exe', obj=[
  1896. 'parse_file_parse_file.obj',
  1897. 'libcppParser.ilb',
  1898. 'libpystub.dll',
  1899. 'libdtoolconfig.dll',
  1900. 'libdtool.dll',
  1901. ])
  1902. #
  1903. # DIRECTORY: dtool/src/prckeys/
  1904. #
  1905. if (OMIT.count("OPENSSL")==0):
  1906. CopyAllHeaders('dtool/src/prckeys')
  1907. IPATH=['dtool/src/prckeys']
  1908. OPTS=['OPENSSL', 'NSPR']
  1909. EnqueueCxx(ipath=IPATH, opts=OPTS, src='makePrcKey.cxx', obj='make-prc-key_makePrcKey.obj')
  1910. EnqueueLink(opts=['ADVAPI', 'NSPR', 'OPENSSL'], dll='make-prc-key.exe', obj=[
  1911. 'make-prc-key_makePrcKey.obj',
  1912. 'libpystub.dll',
  1913. 'libdtool.dll',
  1914. 'libdtoolconfig.dll',
  1915. ])
  1916. #
  1917. # DIRECTORY: dtool/src/test_interrogate/
  1918. #
  1919. CopyAllHeaders('dtool/src/test_interrogate', skip="ALL")
  1920. IPATH=['dtool/src/test_interrogate']
  1921. OPTS=['NSPR']
  1922. EnqueueCxx(ipath=IPATH, opts=OPTS, src='test_interrogate.cxx', obj='test_interrogate_test_interrogate.obj')
  1923. EnqueueLink(opts=['ADVAPI', 'NSPR', 'OPENSSL'], dll='test_interrogate.exe', obj=[
  1924. 'test_interrogate_test_interrogate.obj',
  1925. 'libpystub.dll',
  1926. 'libdtoolconfig.dll',
  1927. 'libdtool.dll',
  1928. ])
  1929. #
  1930. # DIRECTORY: panda/src/pandabase/
  1931. #
  1932. CopyAllHeaders('panda/src/pandabase')
  1933. IPATH=['panda/src/pandabase']
  1934. OPTS=['BUILDING_PANDAEXPRESS', 'NSPR']
  1935. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandabase.cxx', obj='pandabase_pandabase.obj')
  1936. #
  1937. # DIRECTORY: panda/src/express/
  1938. #
  1939. CopyAllHeaders('panda/src/express')
  1940. IPATH=['panda/src/express']
  1941. OPTS=['BUILDING_PANDAEXPRESS', 'OPENSSL', 'ZLIB', 'NSPR']
  1942. EnqueueCxx(ipath=IPATH, opts=OPTS, src='express_composite1.cxx', obj='express_composite1.obj')
  1943. EnqueueCxx(ipath=IPATH, opts=OPTS, src='express_composite2.cxx', obj='express_composite2.obj')
  1944. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libexpress.in', obj='libexpress_igate.obj',
  1945. src='panda/src/express', module='pandaexpress', library='libexpress',
  1946. skip=[], also=["express_composite1.cxx", "express_composite2.cxx"])
  1947. #
  1948. # DIRECTORY: panda/src/downloader/
  1949. #
  1950. CopyAllHeaders('panda/src/downloader')
  1951. IPATH=['panda/src/downloader']
  1952. OPTS=['BUILDING_PANDAEXPRESS', 'OPENSSL', 'ZLIB', 'NSPR']
  1953. EnqueueCxx(ipath=IPATH, opts=OPTS, src='downloader_composite.cxx', obj='downloader_composite.obj')
  1954. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdownloader.in', obj='libdownloader_igate.obj',
  1955. src='panda/src/downloader', module='pandaexpress', library='libdownloader',
  1956. skip=[], also=["downloader_composite.cxx"])
  1957. #
  1958. # DIRECTORY: panda/metalibs/pandaexpress/
  1959. #
  1960. CopyAllHeaders('panda/metalibs/pandaexpress')
  1961. IPATH=['panda/metalibs/pandaexpress']
  1962. OPTS=['BUILDING_PANDAEXPRESS', 'ZLIB', 'NSPR']
  1963. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaexpress.cxx', obj='pandaexpress_pandaexpress.obj')
  1964. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandaexpress_module.obj',
  1965. module='pandaexpress', library='libpandaexpress',
  1966. files=['libdownloader.in', 'libexpress.in'])
  1967. EnqueueLink(opts=['ADVAPI', 'WINSOCK2', 'NSPR', 'OPENSSL', 'ZLIB'], dll='libpandaexpress.dll', obj=[
  1968. 'pandaexpress_pandaexpress.obj',
  1969. 'libpandaexpress_module.obj',
  1970. 'downloader_composite.obj',
  1971. 'libdownloader_igate.obj',
  1972. 'express_composite1.obj',
  1973. 'express_composite2.obj',
  1974. 'libexpress_igate.obj',
  1975. 'pandabase_pandabase.obj',
  1976. 'libdtoolconfig.dll',
  1977. 'libdtool.dll',
  1978. ])
  1979. #
  1980. # DIRECTORY: panda/src/putil/
  1981. #
  1982. IPATH=['panda/src/putil']
  1983. OPTS=['BUILDING_PANDA', 'NSPR', 'ZLIB']
  1984. CopyAllHeaders('panda/src/putil')
  1985. EnqueueCxx(ipath=IPATH, opts=OPTS, src='putil_composite1.cxx', obj='putil_composite1.obj')
  1986. EnqueueCxx(ipath=IPATH, opts=OPTS, src='putil_composite2.cxx', obj='putil_composite2.obj')
  1987. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libputil.in', obj='libputil_igate.obj',
  1988. src='panda/src/putil', module='panda', library='libputil',
  1989. skip=["test_bam.h"], also=["putil_composite1.cxx", "putil_composite2.cxx"])
  1990. #
  1991. # DIRECTORY: panda/src/audio/
  1992. #
  1993. IPATH=['panda/src/audio']
  1994. OPTS=['BUILDING_PANDA', 'NSPR']
  1995. CopyAllHeaders('panda/src/audio')
  1996. EnqueueCxx(ipath=IPATH, opts=OPTS, src='audio_composite.cxx', obj='audio_composite.obj')
  1997. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libaudio.in', obj='libaudio_igate.obj',
  1998. src='panda/src/audio', module='panda', library='libaudio',
  1999. skip="ALL", also=["audio.h"])
  2000. #
  2001. # DIRECTORY: panda/src/event/
  2002. #
  2003. IPATH=['panda/src/event']
  2004. OPTS=['BUILDING_PANDA', 'NSPR']
  2005. CopyAllHeaders('panda/src/event')
  2006. EnqueueCxx(ipath=IPATH, opts=OPTS, src='event_composite.cxx', obj='event_composite.obj')
  2007. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libevent.in', obj='libevent_igate.obj',
  2008. src='panda/src/event', module='panda', library='libevent',
  2009. skip=[], also=["event_composite.cxx"])
  2010. #
  2011. # DIRECTORY: panda/src/linmath/
  2012. #
  2013. IPATH=['panda/src/linmath']
  2014. OPTS=['BUILDING_PANDA', 'NSPR']
  2015. CopyAllHeaders('panda/src/linmath')
  2016. EnqueueCxx(ipath=IPATH, opts=OPTS, src='linmath_composite.cxx', obj='linmath_composite.obj')
  2017. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='liblinmath.in', obj='liblinmath_igate.obj',
  2018. src='panda/src/linmath', module='panda', library='liblinmath',
  2019. skip=['lmat_ops_src.h', 'cast_to_double.h', 'lmat_ops.h', 'cast_to_float.h'],
  2020. also=["linmath_composite.cxx"])
  2021. #
  2022. # DIRECTORY: panda/src/mathutil/
  2023. #
  2024. IPATH=['panda/src/mathutil']
  2025. OPTS=['BUILDING_PANDA', 'FFTW', 'NSPR']
  2026. CopyAllHeaders('panda/src/mathutil')
  2027. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mathutil_composite.cxx', obj='mathutil_composite.obj')
  2028. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libmathutil.in', obj='libmathutil_igate.obj',
  2029. src='panda/src/mathutil', module='panda', library='libmathutil',
  2030. skip=['mathHelpers.h'], also=["mathutil_composite.cxx"])
  2031. #
  2032. # DIRECTORY: panda/src/gsgbase/
  2033. #
  2034. IPATH=['panda/src/gsgbase']
  2035. OPTS=['BUILDING_PANDA', 'NSPR']
  2036. CopyAllHeaders('panda/src/gsgbase')
  2037. EnqueueCxx(ipath=IPATH, opts=OPTS, src='gsgbase_composite.cxx', obj='gsgbase_composite.obj')
  2038. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libgsgbase.in', obj='libgsgbase_igate.obj',
  2039. src='panda/src/gsgbase', module='panda', library='libgsgbase',
  2040. skip=[], also=["gsgbase_composite.cxx"])
  2041. #
  2042. # DIRECTORY: panda/src/pnmimage/
  2043. #
  2044. IPATH=['panda/src/pnmimage']
  2045. OPTS=['BUILDING_PANDA', 'NSPR', 'ZLIB']
  2046. CopyAllHeaders('panda/src/pnmimage')
  2047. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pnmimage_composite.cxx', obj='pnmimage_composite.obj')
  2048. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpnmimage.in', obj='libpnmimage_igate.obj',
  2049. src='panda/src/pnmimage', module='panda', library='libpnmimage',
  2050. skip=[], also=["pnmimage_composite.cxx"])
  2051. #
  2052. # DIRECTORY: panda/src/net/
  2053. #
  2054. if (OMIT.count("NSPR")==0):
  2055. IPATH=['panda/src/net']
  2056. OPTS=['BUILDING_PANDA', 'NSPR']
  2057. CopyAllHeaders('panda/src/net')
  2058. EnqueueCxx(ipath=IPATH, opts=OPTS, src='net_composite.cxx', obj='net_composite.obj')
  2059. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libnet.in', obj='libnet_igate.obj',
  2060. src='panda/src/net', module='panda', library='libnet',
  2061. skip=["datagram_ui.h"], also=["net_composite.cxx"])
  2062. #
  2063. # DIRECTORY: panda/src/pstatclient/
  2064. #
  2065. IPATH=['panda/src/pstatclient']
  2066. OPTS=['BUILDING_PANDA', 'NSPR']
  2067. CopyAllHeaders('panda/src/pstatclient')
  2068. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pstatclient_composite.cxx', obj='pstatclient_composite.obj')
  2069. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpstatclient.in', obj='libpstatclient_igate.obj',
  2070. src='panda/src/pstatclient', module='panda', library='libpstatclient',
  2071. skip=[], also=["pstatclient_composite.cxx"])
  2072. #
  2073. # DIRECTORY: panda/src/gobj/
  2074. #
  2075. IPATH=['panda/src/gobj']
  2076. OPTS=['BUILDING_PANDA', 'NSPR', 'ZLIB']
  2077. CopyAllHeaders('panda/src/gobj')
  2078. EnqueueCxx(ipath=IPATH, opts=OPTS, src='gobj_composite1.cxx', obj='gobj_composite1.obj')
  2079. EnqueueCxx(ipath=IPATH, opts=OPTS, src='gobj_composite2.cxx', obj='gobj_composite2.obj')
  2080. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libgobj.in', obj='libgobj_igate.obj',
  2081. src='panda/src/gobj', module='panda', library='libgobj',
  2082. skip=[], also=["gobj_composite1.cxx", "gobj_composite2.cxx"])
  2083. #
  2084. # DIRECTORY: panda/src/lerp/
  2085. #
  2086. IPATH=['panda/src/lerp']
  2087. OPTS=['BUILDING_PANDA', 'NSPR']
  2088. CopyAllHeaders('panda/src/lerp')
  2089. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lerp_composite.cxx', obj='lerp_composite.obj')
  2090. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='liblerp.in', obj='liblerp_igate.obj',
  2091. src='panda/src/lerp', module='panda', library='liblerp',
  2092. skip=["lerp_headers.h","lerpchans.h"], also=["lerp_composite.cxx"])
  2093. #
  2094. # DIRECTORY: panda/src/pgraph/
  2095. #
  2096. IPATH=['panda/src/pgraph']
  2097. OPTS=['BUILDING_PANDA', 'NSPR']
  2098. CopyAllHeaders('panda/src/pgraph')
  2099. EnqueueCxx(ipath=IPATH, opts=OPTS, src='nodePath.cxx', obj='pgraph_nodePath.obj')
  2100. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgraph_composite1.cxx', obj='pgraph_composite1.obj')
  2101. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgraph_composite2.cxx', obj='pgraph_composite2.obj')
  2102. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgraph_composite3.cxx', obj='pgraph_composite3.obj')
  2103. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgraph_composite4.cxx', obj='pgraph_composite4.obj')
  2104. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpgraph.in', obj='libpgraph_igate.obj',
  2105. src='panda/src/pgraph', module='panda', library='libpgraph',
  2106. skip=["antialiasAttrib.h"],
  2107. also=["nodePath.cxx",
  2108. "pgraph_composite1.cxx", "pgraph_composite2.cxx",
  2109. "pgraph_composite3.cxx", "pgraph_composite4.cxx"])
  2110. #
  2111. # DIRECTORY: panda/src/effects/
  2112. #
  2113. IPATH=['panda/src/effects']
  2114. OPTS=['BUILDING_PANDAFX', 'NSPR', 'NVIDIACG']
  2115. CopyAllHeaders('panda/src/effects')
  2116. EnqueueCxx(ipath=IPATH, opts=OPTS, src='effects_composite.cxx', obj='effects_composite.obj')
  2117. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libeffects.in', obj='libeffects_igate.obj',
  2118. src='panda/src/effects', module='pandafx', library='libeffects',
  2119. skip=["cgShader.h", "cgShaderAttrib.h", "cgShaderContext.h"],
  2120. also=["effects_composite.cxx"])
  2121. #
  2122. # DIRECTORY: panda/src/chan/
  2123. #
  2124. IPATH=['panda/src/chan']
  2125. OPTS=['BUILDING_PANDA', 'NSPR']
  2126. CopyAllHeaders('panda/src/chan')
  2127. EnqueueCxx(ipath=IPATH, opts=OPTS, src='chan_composite.cxx', obj='chan_composite.obj')
  2128. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libchan.in', obj='libchan_igate.obj',
  2129. src='panda/src/chan', module='panda', library='libchan',
  2130. skip=['movingPart.h', 'chan_headers.h', 'animChannelFixed.h'],
  2131. also=["chan_composite.cxx"])
  2132. #
  2133. # DIRECTORY: panda/src/char/
  2134. #
  2135. IPATH=['panda/src/char']
  2136. OPTS=['BUILDING_PANDA', 'NSPR']
  2137. CopyAllHeaders('panda/src/char')
  2138. EnqueueCxx(ipath=IPATH, opts=OPTS, src='char_composite.cxx', obj='char_composite.obj')
  2139. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libchar.in', obj='libchar_igate.obj',
  2140. src='panda/src/char', module='panda', library='libchar',
  2141. skip=[], also=["char_composite.cxx"])
  2142. #
  2143. # DIRECTORY: panda/src/dgraph/
  2144. #
  2145. IPATH=['panda/src/dgraph']
  2146. OPTS=['BUILDING_PANDA', 'NSPR']
  2147. CopyAllHeaders('panda/src/dgraph')
  2148. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dgraph_composite.cxx', obj='dgraph_composite.obj')
  2149. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdgraph.in', obj='libdgraph_igate.obj',
  2150. src='panda/src/dgraph', module='panda', library='libdgraph',
  2151. skip=[], also=["dgraph_composite.cxx"])
  2152. #
  2153. # DIRECTORY: panda/src/display/
  2154. #
  2155. IPATH=['panda/src/display']
  2156. OPTS=['BUILDING_PANDA', 'NSPR']
  2157. CopyAllHeaders('panda/src/display')
  2158. EnqueueCxx(ipath=IPATH, opts=OPTS, src='display_composite.cxx', obj='display_composite.obj')
  2159. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdisplay.in', obj='libdisplay_igate.obj',
  2160. src='panda/src/display', module='panda', library='libdisplay',
  2161. skip=['renderBuffer.h'], also=["display_composite.cxx"])
  2162. #
  2163. # DIRECTORY: panda/src/device/
  2164. #
  2165. IPATH=['panda/src/device']
  2166. OPTS=['BUILDING_PANDA', 'NSPR']
  2167. CopyAllHeaders('panda/src/device')
  2168. EnqueueCxx(ipath=IPATH, opts=OPTS, src='device_composite.cxx', obj='device_composite.obj')
  2169. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdevice.in', obj='libdevice_igate.obj',
  2170. src='panda/src/device', module='panda', library='libdevice',
  2171. skip=[], also=["device_composite.cxx"])
  2172. #
  2173. # DIRECTORY: panda/src/pnmtext/
  2174. #
  2175. if (OMIT.count("FREETYPE")==0):
  2176. IPATH=['panda/src/pnmtext']
  2177. OPTS=['BUILDING_PANDA', 'NSPR', 'FREETYPE']
  2178. CopyAllHeaders('panda/src/pnmtext')
  2179. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pnmtext_composite.cxx', obj='pnmtext_composite.obj')
  2180. #
  2181. # DIRECTORY: panda/src/text/
  2182. #
  2183. IPATH=['panda/src/text']
  2184. OPTS=['BUILDING_PANDA', 'ZLIB', 'NSPR', 'FREETYPE']
  2185. CopyAllHeaders('panda/src/text')
  2186. EnqueueCxx(ipath=IPATH, opts=OPTS, src='text_composite.cxx', obj='text_composite.obj')
  2187. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libtext.in', obj='libtext_igate.obj',
  2188. src='panda/src/text', module='panda', library='libtext',
  2189. skip=[], also=["text_composite.cxx"])
  2190. #
  2191. # DIRECTORY: panda/src/grutil/
  2192. #
  2193. IPATH=['panda/src/grutil']
  2194. OPTS=['BUILDING_PANDA', 'NSPR', 'OPENCV']
  2195. CopyAllHeaders('panda/src/grutil')
  2196. EnqueueCxx(ipath=IPATH, opts=OPTS, src='multitexReducer.cxx', obj='grutil_multitexReducer.obj')
  2197. EnqueueCxx(ipath=IPATH, opts=OPTS, src='grutil_composite.cxx', obj='grutil_composite.obj')
  2198. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libgrutil.in', obj='libgrutil_igate.obj',
  2199. src='panda/src/grutil', module='panda', library='libgrutil',
  2200. skip=[], also=["multitexReducer.cxx","grutil_composite.cxx"])
  2201. #
  2202. # DIRECTORY: panda/src/tform/
  2203. #
  2204. IPATH=['panda/src/tform']
  2205. OPTS=['BUILDING_PANDA', 'NSPR']
  2206. CopyAllHeaders('panda/src/tform')
  2207. EnqueueCxx(ipath=IPATH, opts=OPTS, src='tform_composite.cxx', obj='tform_composite.obj')
  2208. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libtform.in', obj='libtform_igate.obj',
  2209. src='panda/src/tform', module='panda', library='libtform',
  2210. skip=[], also=["tform_composite.cxx"])
  2211. #
  2212. # DIRECTORY: panda/src/collide/
  2213. #
  2214. IPATH=['panda/src/collide']
  2215. OPTS=['BUILDING_PANDA', 'NSPR']
  2216. CopyAllHeaders('panda/src/collide')
  2217. EnqueueCxx(ipath=IPATH, opts=OPTS, src='collide_composite.cxx', obj='collide_composite.obj')
  2218. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libcollide.in', obj='libcollide_igate.obj',
  2219. src='panda/src/collide', module='panda', library='libcollide',
  2220. skip=["collide_headers.h"], also=["collide_composite.cxx"])
  2221. #
  2222. # DIRECTORY: panda/src/parametrics/
  2223. #
  2224. IPATH=['panda/src/parametrics']
  2225. OPTS=['BUILDING_PANDA', 'NSPR']
  2226. CopyAllHeaders('panda/src/parametrics')
  2227. EnqueueCxx(ipath=IPATH, opts=OPTS, src='parametrics_composite.cxx', obj='parametrics_composite.obj')
  2228. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libparametrics.in', obj='libparametrics_igate.obj',
  2229. src='panda/src/parametrics', module='panda', library='libparametrics',
  2230. skip=['nurbsPPCurve.h'], also=["parametrics_composite.cxx"])
  2231. #
  2232. # DIRECTORY: panda/src/pgui/
  2233. #
  2234. IPATH=['panda/src/pgui']
  2235. OPTS=['BUILDING_PANDA', 'NSPR']
  2236. CopyAllHeaders('panda/src/pgui')
  2237. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgui_composite.cxx', obj='pgui_composite.obj')
  2238. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpgui.in', obj='libpgui_igate.obj',
  2239. src='panda/src/pgui', module='panda', library='libpgui',
  2240. skip=[], also=["pgui_composite.cxx"])
  2241. #
  2242. # DIRECTORY: panda/src/pnmimagetypes/
  2243. #
  2244. IPATH=['panda/src/pnmimagetypes', 'panda/src/pnmimage']
  2245. OPTS=['BUILDING_PANDA', 'PNG', 'ZLIB', 'JPEG', 'ZLIB', 'NSPR', 'JPEG', 'TIFF']
  2246. CopyAllHeaders('panda/src/pnmimagetypes')
  2247. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pnmFileTypePNG.cxx', obj='pnmimagetypes_pnmFileTypePNG.obj')
  2248. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pnmFileTypeTIFF.cxx', obj='pnmimagetypes_pnmFileTypeTIFF.obj')
  2249. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pnmimagetypes_composite.cxx', obj='pnmimagetypes_composite.obj')
  2250. #
  2251. # DIRECTORY: panda/src/recorder/
  2252. #
  2253. IPATH=['panda/src/recorder']
  2254. OPTS=['BUILDING_PANDA', 'NSPR']
  2255. CopyAllHeaders('panda/src/recorder')
  2256. EnqueueCxx(ipath=IPATH, opts=OPTS, src='recorder_composite.cxx', obj='recorder_composite.obj')
  2257. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='librecorder.in', obj='librecorder_igate.obj',
  2258. src='panda/src/recorder', module='panda', library='librecorder',
  2259. skip=[], also=["recorder_composite.cxx"])
  2260. #
  2261. # DIRECTORY: panda/src/vrpn/
  2262. #
  2263. if (OMIT.count("VRPN")==0):
  2264. IPATH=['panda/src/vrpn']
  2265. OPTS=['BUILDING_PANDA', 'NSPR', 'VRPN']
  2266. CopyAllHeaders('panda/src/vrpn')
  2267. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrpn_composite.cxx', obj='pvrpn_composite.obj')
  2268. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpvrpn.in', obj='libpvrpn_igate.obj',
  2269. src='panda/src/vrpn', module='panda', library='libpvrpn',
  2270. skip=[], also=["vrpn_composite.cxx"])
  2271. #
  2272. # DIRECTORY: panda/src/helix/
  2273. #
  2274. if (OMIT.count("HELIX")==0):
  2275. IPATH=['panda/src/helix']
  2276. OPTS=['BUILDING_PANDA', 'NSPR', 'HELIX']
  2277. CopyAllHeaders('panda/src/helix')
  2278. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_helix.cxx', obj='helix_config_helix.obj')
  2279. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fivemmap.cxx', obj='helix_fivemmap.obj')
  2280. EnqueueCxx(ipath=IPATH, opts=OPTS, src='HelixClient.cxx', obj='helix_HelixClient.obj')
  2281. EnqueueCxx(ipath=IPATH, opts=OPTS, src='HxAdviseSink.cxx', obj='helix_HxAdviseSink.obj')
  2282. EnqueueCxx(ipath=IPATH, opts=OPTS, src='HxAuthenticationManager.cxx', obj='helix_HxAuthenticationManager.obj')
  2283. EnqueueCxx(ipath=IPATH, opts=OPTS, src='HxClientContext.cxx', obj='helix_HxClientContext.obj')
  2284. EnqueueCxx(ipath=IPATH, opts=OPTS, src='HxErrorSink.cxx', obj='helix_HxErrorSink.obj')
  2285. EnqueueCxx(ipath=IPATH, opts=OPTS, src='HxSiteSupplier.cxx', obj='helix_HxSiteSupplier.obj')
  2286. EnqueueCxx(ipath=IPATH, opts=OPTS, src='iids.cxx', obj='helix_iids.obj')
  2287. EnqueueCxx(ipath=IPATH, opts=OPTS, src='print.cxx', obj='helix_print.obj')
  2288. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libhelix.in', obj='libhelix_igate.obj',
  2289. src='panda/src/helix', module='panda', library='libhelix',
  2290. skip="ALL", also=["HelixClient.cxx"])
  2291. EnqueueLib(lib='libhelix.ilb', obj=[
  2292. 'helix_config_helix.obj',
  2293. 'helix_fivemmap.obj',
  2294. 'helix_HelixClient.obj',
  2295. 'helix_HxAdviseSink.obj',
  2296. 'helix_HxAuthenticationManager.obj',
  2297. 'helix_HxClientContext.obj',
  2298. 'helix_HxErrorSink.obj',
  2299. 'helix_HxSiteSupplier.obj',
  2300. 'helix_iids.obj',
  2301. 'helix_print.obj',
  2302. 'libhelix_igate.obj'])
  2303. #
  2304. # DIRECTORY: panda/metalibs/panda/
  2305. #
  2306. CopyAllHeaders('panda/src/glgsg')
  2307. CopyAllHeaders('panda/src/wgldisplay')
  2308. CopyAllHeaders('panda/src/physics')
  2309. CopyAllHeaders('panda/src/particlesystem')
  2310. IPATH=['panda/metalibs/panda']
  2311. OPTS=['BUILDING_PANDA', 'ZLIB', 'VRPN', 'JPEG', 'PNG', 'TIFF', 'NSPR', 'FREETYPE', 'HELIX', 'FFTW', 'OPENCV',
  2312. 'ADVAPI', 'WINSOCK2', 'WINUSER', 'WINMM']
  2313. INFILES=['librecorder.in', 'libpgraph.in', 'libgrutil.in', 'libchan.in', 'libpstatclient.in',
  2314. 'libchar.in', 'libcollide.in', 'libdevice.in', 'libdgraph.in', 'libdisplay.in', 'libevent.in',
  2315. 'libgobj.in', 'libgsgbase.in', 'liblinmath.in', 'libmathutil.in', 'libparametrics.in',
  2316. 'libpnmimage.in', 'libtext.in', 'libtform.in', 'liblerp.in', 'libputil.in', 'libaudio.in',
  2317. 'libpgui.in']
  2318. OBJFILES=['panda_panda.obj', 'libpanda_module.obj',
  2319. 'recorder_composite.obj', 'librecorder_igate.obj',
  2320. 'pgraph_nodePath.obj',
  2321. 'pgraph_composite1.obj', 'pgraph_composite2.obj', 'pgraph_composite3.obj', 'pgraph_composite4.obj', 'libpgraph_igate.obj',
  2322. 'grutil_multitexReducer.obj', 'grutil_composite.obj', 'libgrutil_igate.obj',
  2323. 'chan_composite.obj', 'libchan_igate.obj',
  2324. 'pstatclient_composite.obj', 'libpstatclient_igate.obj',
  2325. 'char_composite.obj', 'libchar_igate.obj',
  2326. 'collide_composite.obj', 'libcollide_igate.obj',
  2327. 'device_composite.obj', 'libdevice_igate.obj',
  2328. 'dgraph_composite.obj', 'libdgraph_igate.obj',
  2329. 'display_composite.obj', 'libdisplay_igate.obj',
  2330. 'event_composite.obj', 'libevent_igate.obj',
  2331. 'gobj_composite1.obj', 'gobj_composite2.obj', 'libgobj_igate.obj',
  2332. 'gsgbase_composite.obj', 'libgsgbase_igate.obj',
  2333. 'linmath_composite.obj', 'liblinmath_igate.obj',
  2334. 'mathutil_composite.obj', 'libmathutil_igate.obj',
  2335. 'parametrics_composite.obj', 'libparametrics_igate.obj',
  2336. 'pnmimagetypes_composite.obj', 'pnmimagetypes_pnmFileTypePNG.obj', 'pnmimagetypes_pnmFileTypeTIFF.obj',
  2337. 'pnmimage_composite.obj', 'libpnmimage_igate.obj',
  2338. 'text_composite.obj', 'libtext_igate.obj',
  2339. 'tform_composite.obj', 'libtform_igate.obj',
  2340. 'lerp_composite.obj', 'liblerp_igate.obj',
  2341. 'putil_composite1.obj', 'putil_composite2.obj', 'libputil_igate.obj',
  2342. 'audio_composite.obj', 'libaudio_igate.obj',
  2343. 'pgui_composite.obj', 'libpgui_igate.obj',
  2344. 'pandabase_pandabase.obj', 'libpandaexpress.dll', 'libdtoolconfig.dll', 'libdtool.dll']
  2345. if OMIT.count("HELIX")==0:
  2346. OBJFILES.append("libhelix.ilb")
  2347. INFILES.append("libhelix.in")
  2348. if OMIT.count("VRPN")==0:
  2349. OBJFILES.append("pvrpn_composite.obj")
  2350. OBJFILES.append("libpvrpn_igate.obj")
  2351. INFILES.append("libpvrpn.in")
  2352. if OMIT.count("NSPR")==0:
  2353. OBJFILES.append("net_composite.obj")
  2354. OBJFILES.append("libnet_igate.obj")
  2355. INFILES.append("libnet.in")
  2356. if OMIT.count("FREETYPE")==0:
  2357. OBJFILES.append("pnmtext_composite.obj")
  2358. # OBJFILES.append("pnmtext_config_pnmtext.obj")
  2359. # OBJFILES.append("pnmtext_freetypeFont.obj")
  2360. # OBJFILES.append("pnmtext_pnmTextGlyph.obj")
  2361. # OBJFILES.append("pnmtext_pnmTextMaker.obj")
  2362. CopyAllHeaders('panda/metalibs/panda')
  2363. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpanda_module.obj',
  2364. module='panda', library='libpanda', files=INFILES)
  2365. EnqueueCxx(ipath=IPATH, opts=OPTS, src='panda.cxx', obj='panda_panda.obj')
  2366. EnqueueLink(opts=OPTS, dll='libpanda.dll', obj=OBJFILES, xdep=[
  2367. 'built/tmp/dtool_have_helix.dat',
  2368. 'built/tmp/dtool_have_vrpn.dat',
  2369. 'built/tmp/dtool_have_nspr.dat',
  2370. 'built/tmp/dtool_have_freetype.dat',
  2371. ])
  2372. #
  2373. # DIRECTORY: panda/src/audiotraits/
  2374. #
  2375. if OMIT.count("FMOD") == 0:
  2376. IPATH=['panda/src/audiotraits']
  2377. OPTS=['BUILDING_FMOD_AUDIO', 'NSPR', 'FMOD']
  2378. CopyAllHeaders('panda/src/audiotraits')
  2379. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fmod_audio_composite.cxx', obj='fmod_audio_fmod_audio_composite.obj')
  2380. EnqueueLink(opts=['ADVAPI', 'WINUSER', 'WINMM', 'FMOD', 'NSPR'], dll='libfmod_audio.dll', obj=[
  2381. 'fmod_audio_fmod_audio_composite.obj',
  2382. 'libpanda.dll',
  2383. 'libpandaexpress.dll',
  2384. 'libdtoolconfig.dll',
  2385. 'libdtool.dll',
  2386. ])
  2387. if OMIT.count("MILES") == 0:
  2388. IPATH=['panda/src/audiotraits']
  2389. OPTS=['BUILDING_MILES_AUDIO', 'NSPR', 'MILES']
  2390. CopyAllHeaders('panda/src/audiotraits')
  2391. EnqueueCxx(ipath=IPATH, opts=OPTS, src='miles_audio_composite.cxx', obj='miles_audio_miles_audio_composite.obj')
  2392. EnqueueLink(opts=['ADVAPI', 'WINUSER', 'WINMM', 'MILES', 'NSPR'], dll='libmiles_audio.dll', obj=[
  2393. 'miles_audio_miles_audio_composite.obj',
  2394. 'libpanda.dll',
  2395. 'libpandaexpress.dll',
  2396. 'libdtoolconfig.dll',
  2397. 'libdtool.dll',
  2398. ])
  2399. #
  2400. # DIRECTORY: panda/src/distort/
  2401. #
  2402. IPATH=['panda/src/distort']
  2403. OPTS=['BUILDING_PANDAFX', 'NSPR']
  2404. CopyAllHeaders('panda/src/distort')
  2405. EnqueueCxx(ipath=IPATH, opts=OPTS, src='distort_composite.cxx', obj='distort_composite.obj')
  2406. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdistort.in', obj='libdistort_igate.obj',
  2407. src='panda/src/distort', module='pandafx', library='libdistort',
  2408. skip=[], also=["distort_composite.cxx"])
  2409. #
  2410. # DIRECTORY: panda/src/downloadertools/
  2411. #
  2412. # There's something funny about this OMIT.count('OPENSSL')... check it out.
  2413. #
  2414. if OMIT.count("OPENSSL")==0:
  2415. IPATH=['panda/src/downloadertools']
  2416. OPTS=['OPENSSL', 'ZLIB', 'NSPR']
  2417. LIBS=['libpandaexpress.dll', 'libpanda.dll', 'libdtoolconfig.dll', 'libdtool.dll', 'libpystub.dll']
  2418. CopyAllHeaders('panda/src/downloadertools')
  2419. EnqueueCxx(ipath=IPATH, opts=OPTS, src='apply_patch.cxx', obj='apply_patch_apply_patch.obj')
  2420. EnqueueLink(dll='apply_patch.exe', opts=['ADVAPI', 'NSPR'], obj=['apply_patch_apply_patch.obj']+LIBS)
  2421. EnqueueCxx(ipath=IPATH, opts=OPTS, src='build_patch.cxx', obj='build_patch_build_patch.obj')
  2422. EnqueueLink(dll='build_patch.exe', opts=['ADVAPI', 'NSPR'], obj=['build_patch_build_patch.obj']+LIBS)
  2423. EnqueueCxx(ipath=IPATH, opts=OPTS, src='check_adler.cxx', obj='check_adler_check_adler.obj')
  2424. EnqueueLink(dll='check_adler.exe', opts=['ADVAPI', 'NSPR', 'ZLIB'], obj=['check_adler_check_adler.obj']+LIBS)
  2425. EnqueueCxx(ipath=IPATH, opts=OPTS, src='check_crc.cxx', obj='check_crc_check_crc.obj')
  2426. EnqueueLink(dll='check_crc.exe', opts=['ADVAPI', 'NSPR', 'ZLIB'], obj=['check_crc_check_crc.obj']+LIBS)
  2427. EnqueueCxx(ipath=IPATH, opts=OPTS, src='check_md5.cxx', obj='check_md5_check_md5.obj')
  2428. EnqueueLink(dll='check_md5.exe', opts=['ADVAPI', 'NSPR', 'OPENSSL'], obj=['check_md5_check_md5.obj']+LIBS)
  2429. EnqueueCxx(ipath=IPATH, opts=OPTS, src='multify.cxx', obj='multify_multify.obj')
  2430. EnqueueLink(dll='multify.exe', opts=['ADVAPI', 'NSPR'], obj=['multify_multify.obj']+LIBS)
  2431. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pzip.cxx', obj='pzip_pzip.obj')
  2432. EnqueueLink(dll='pzip.exe', opts=['ADVAPI', 'NSPR', 'ZLIB'], obj=['pzip_pzip.obj']+LIBS)
  2433. EnqueueCxx(ipath=IPATH, opts=OPTS, src='punzip.cxx', obj='punzip_punzip.obj')
  2434. EnqueueLink(dll='punzip.exe', opts=['ADVAPI', 'NSPR', 'ZLIB'], obj=['punzip_punzip.obj']+LIBS)
  2435. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pdecrypt.cxx', obj='pdecrypt_pdecrypt.obj')
  2436. EnqueueLink(dll='pdecrypt.exe', opts=['ADVAPI', 'NSPR', 'OPENSSL'], obj=['pdecrypt_pdecrypt.obj']+LIBS)
  2437. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pencrypt.cxx', obj='pencrypt_pencrypt.obj')
  2438. EnqueueLink(dll='pencrypt.exe', opts=['ADVAPI', 'NSPR', 'OPENSSL'], obj=['pencrypt_pencrypt.obj']+LIBS)
  2439. EnqueueCxx(ipath=IPATH, opts=OPTS, src='show_ddb.cxx', obj='show_ddb_show_ddb.obj')
  2440. EnqueueLink(dll='show_ddb.exe', opts=['ADVAPI', 'NSPR'], obj=['show_ddb_show_ddb.obj']+LIBS)
  2441. #
  2442. # DIRECTORY: panda/src/windisplay/
  2443. #
  2444. if (sys.platform == "win32"):
  2445. IPATH=['panda/src/windisplay']
  2446. OPTS=['BUILDING_PANDAWIN', 'NSPR']
  2447. CopyAllHeaders('panda/src/windisplay')
  2448. EnqueueCxx(ipath=IPATH, opts=OPTS, src='windisplay_composite.cxx', obj='windisplay_composite.obj')
  2449. EnqueueLink(opts=['WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NSPR'],
  2450. dll='libwindisplay.dll', obj=[
  2451. 'windisplay_composite.obj',
  2452. 'libpanda.dll',
  2453. 'libpandaexpress.dll',
  2454. 'libdtoolconfig.dll',
  2455. 'libdtool.dll',
  2456. ])
  2457. #
  2458. # DIRECTORY: panda/metalibs/pandadx7/
  2459. #
  2460. #
  2461. # if OMIT.count("DX7")==0:
  2462. # IPATH=['panda/src/dxgsg7']
  2463. # OPTS=['BUILDING_PANDADX', 'DXSDK', 'NSPR']
  2464. # CopyAllHeaders('panda/src/dxgsg7')
  2465. # EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxGraphicsStateGuardian7.cxx', obj='dxgsg7_dxGraphicsStateGuardian7.obj')
  2466. # EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxgsg7_composite.cxx', obj='dxgsg7_composite.obj')
  2467. #
  2468. # IPATH=['panda/metalibs/pandadx7']
  2469. # OPTS=['BUILDING_PANDADX', 'DXSDK', 'NSPR']
  2470. # CopyAllHeaders('panda/metalibs/pandadx7')
  2471. # EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandadx7.cxx', obj='pandadx7_pandadx7.obj')
  2472. # EnqueueLink(dll='libpandadx7.dll', opts=['ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DXDRAW', 'DXGUID', 'D3D8', 'NSPR'], obj=[
  2473. # 'pandadx7_pandadx7.obj',
  2474. # 'dxgsg7_dxGraphicsStateGuardian7.obj',
  2475. # 'dxgsg7_composite.obj',
  2476. # 'libpanda.dll',
  2477. # 'libpandaexpress.dll',
  2478. # 'libwindisplay.dll',
  2479. # 'libdtoolconfig.dll',
  2480. # 'libdtool.dll',
  2481. # ])
  2482. #
  2483. #
  2484. # DIRECTORY: panda/metalibs/pandadx8/
  2485. #
  2486. if OMIT.count("DX8")==0:
  2487. IPATH=['panda/src/dxgsg8', 'panda/metalibs/pandadx8']
  2488. OPTS=['BUILDING_PANDADX', 'DX8', 'NSPR']
  2489. CopyAllHeaders('panda/src/dxgsg8')
  2490. CopyAllHeaders('panda/metalibs/pandadx8')
  2491. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxGraphicsStateGuardian8.cxx', obj='dxgsg8_dxGraphicsStateGuardian8.obj')
  2492. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxgsg8_composite.cxx', obj='dxgsg8_composite.obj')
  2493. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandadx8.cxx', obj='pandadx8_pandadx8.obj')
  2494. EnqueueLink(dll='libpandadx8.dll',
  2495. opts=['ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DX8', 'NSPR'], obj=[
  2496. 'pandadx8_pandadx8.obj',
  2497. 'dxgsg8_dxGraphicsStateGuardian8.obj',
  2498. 'dxgsg8_composite.obj',
  2499. 'libpanda.dll',
  2500. 'libpandaexpress.dll',
  2501. 'libwindisplay.dll',
  2502. 'libdtoolconfig.dll',
  2503. 'libdtool.dll',
  2504. ])
  2505. #
  2506. # DIRECTORY: panda/metalibs/pandadx9/
  2507. #
  2508. if OMIT.count("DX9")==0:
  2509. IPATH=['panda/src/dxgsg9']
  2510. OPTS=['BUILDING_PANDADX', 'DX9', 'NSPR', 'NVIDIACG', 'CGDX9']
  2511. CopyAllHeaders('panda/src/dxgsg9')
  2512. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxGraphicsStateGuardian9.cxx', obj='dxgsg9_dxGraphicsStateGuardian9.obj')
  2513. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxgsg9_composite.cxx', obj='dxgsg9_composite.obj')
  2514. IPATH=['panda/metalibs/pandadx9']
  2515. CopyAllHeaders('panda/metalibs/pandadx9')
  2516. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandadx9.cxx', obj='pandadx9_pandadx9.obj')
  2517. EnqueueLink(dll='libpandadx9.dll',
  2518. opts=['ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DX9', 'NSPR', 'NVIDIACG', 'CGDX9'], obj=[
  2519. 'pandadx9_pandadx9.obj',
  2520. 'dxgsg9_dxGraphicsStateGuardian9.obj',
  2521. 'dxgsg9_composite.obj',
  2522. 'libpanda.dll',
  2523. 'libpandaexpress.dll',
  2524. 'libwindisplay.dll',
  2525. 'libdtoolconfig.dll',
  2526. 'libdtool.dll',
  2527. ])
  2528. #
  2529. # DIRECTORY: panda/src/egg/
  2530. #
  2531. IPATH=['panda/src/egg']
  2532. OPTS=['BUILDING_PANDAEGG', 'NSPR', 'ZLIB']
  2533. CopyAllHeaders('panda/src/egg')
  2534. EnqueueBison(ipath=IPATH, opts=OPTS, pre='eggyy', src='parser.yxx', dsth='parser.h', obj='egg_parser.obj')
  2535. EnqueueFlex(ipath=IPATH, opts=OPTS, pre='eggyy', src='lexer.lxx', obj='egg_lexer.obj', dashi=1)
  2536. EnqueueCxx(ipath=IPATH, opts=OPTS, src='egg_composite1.cxx', obj='egg_composite1.obj')
  2537. EnqueueCxx(ipath=IPATH, opts=OPTS, src='egg_composite2.cxx', obj='egg_composite2.obj')
  2538. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libegg.in', obj='libegg_igate.obj',
  2539. src='panda/src/egg', module='pandaegg', library='libegg',
  2540. skip=["parser.h"], also=["egg_composite1.cxx","egg_composite2.cxx"])
  2541. #
  2542. # DIRECTORY: panda/src/egg2pg/
  2543. #
  2544. IPATH=['panda/src/egg2pg']
  2545. OPTS=['BUILDING_PANDAEGG', 'NSPR']
  2546. CopyAllHeaders('panda/src/egg2pg')
  2547. EnqueueCxx(ipath=IPATH, opts=OPTS, src='egg2pg_composite.cxx', obj='egg2pg_composite.obj')
  2548. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libegg2pg.in', obj='libegg2pg_igate.obj',
  2549. src='panda/src/egg2pg', module='pandaegg', library='libegg2pg',
  2550. skip="ALL", also=['load_egg_file.h'])
  2551. #
  2552. # DIRECTORY: panda/src/framework/
  2553. #
  2554. IPATH=['panda/src/framework']
  2555. OPTS=['BUILDING_FRAMEWORK', 'NSPR']
  2556. CopyAllHeaders('panda/src/framework')
  2557. EnqueueCxx(ipath=IPATH, opts=OPTS, src='framework_composite.cxx', obj='framework_composite.obj')
  2558. EnqueueLink(dll='libframework.dll', opts=['ADVAPI', 'NSPR'], obj=[
  2559. 'framework_composite.obj',
  2560. 'libpanda.dll',
  2561. 'libpandaexpress.dll',
  2562. 'libdtoolconfig.dll',
  2563. 'libdtool.dll',
  2564. ])
  2565. #
  2566. # DIRECTORY: panda/metalibs/pandafx/
  2567. #
  2568. IPATH=['panda/metalibs/pandafx', 'panda/src/distort']
  2569. OPTS=['BUILDING_PANDAFX', 'NSPR', 'NVIDIACG']
  2570. CopyAllHeaders('panda/metalibs/pandafx')
  2571. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandafx.cxx', obj='pandafx_pandafx.obj')
  2572. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandafx_module.obj',
  2573. module='pandafx', library='libpandafx',
  2574. files=['libdistort.in', 'libeffects.in'])
  2575. EnqueueLink(dll='libpandafx.dll', opts=['ADVAPI', 'NSPR', 'NVIDIACG'], obj=[
  2576. 'pandafx_pandafx.obj',
  2577. 'libpandafx_module.obj',
  2578. 'distort_composite.obj',
  2579. 'libdistort_igate.obj',
  2580. 'effects_composite.obj',
  2581. 'libeffects_igate.obj',
  2582. 'libpanda.dll',
  2583. 'libpandaexpress.dll',
  2584. 'libdtoolconfig.dll',
  2585. 'libdtool.dll',
  2586. ])
  2587. #
  2588. # DIRECTORY: panda/src/glstuff/
  2589. #
  2590. IPATH=['panda/src/glstuff']
  2591. OPTS=['NSPR', 'NVIDIACG', 'CGGL']
  2592. CopyAllHeaders('panda/src/glstuff')
  2593. EnqueueCxx(ipath=IPATH, opts=OPTS, src='glpure.cxx', obj='glstuff_glpure.obj')
  2594. EnqueueLink(dll='libglstuff.dll', opts=['ADVAPI', 'GLUT', 'NSPR', 'NVIDIACG', 'CGGL'], obj=[
  2595. 'glstuff_glpure.obj',
  2596. 'libpanda.dll',
  2597. 'libpandafx.dll',
  2598. 'libpandaexpress.dll',
  2599. 'libdtoolconfig.dll',
  2600. 'libdtool.dll',
  2601. ])
  2602. #
  2603. # DIRECTORY: panda/src/glgsg/
  2604. #
  2605. IPATH=['panda/src/glgsg', 'panda/src/glstuff', 'panda/src/gobj']
  2606. OPTS=['BUILDING_PANDAGL', 'NSPR', 'NVIDIACG']
  2607. CopyAllHeaders('panda/src/glgsg')
  2608. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_glgsg.cxx', obj='glgsg_config_glgsg.obj')
  2609. EnqueueCxx(ipath=IPATH, opts=OPTS, src='glgsg.cxx', obj='glgsg_glgsg.obj')
  2610. #
  2611. # DIRECTORY: panda/metalibs/pandaegg/
  2612. #
  2613. IPATH=['panda/metalibs/pandaegg', 'panda/src/egg']
  2614. OPTS=['BUILDING_PANDAEGG', 'NSPR']
  2615. CopyAllHeaders('panda/metalibs/pandaegg')
  2616. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaegg.cxx', obj='pandaegg_pandaegg.obj')
  2617. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandaegg_module.obj',
  2618. module='pandaegg', library='libpandaegg',
  2619. files=['libegg2pg.in', 'libegg.in'])
  2620. EnqueueLink(dll='libpandaegg.dll', opts=['ADVAPI', 'NSPR'], obj=[
  2621. 'pandaegg_pandaegg.obj',
  2622. 'libpandaegg_module.obj',
  2623. 'egg2pg_composite.obj',
  2624. 'libegg2pg_igate.obj',
  2625. 'egg_composite1.obj',
  2626. 'egg_composite2.obj',
  2627. 'egg_parser.obj',
  2628. 'egg_lexer.obj',
  2629. 'libegg_igate.obj',
  2630. 'libpanda.dll',
  2631. 'libpandaexpress.dll',
  2632. 'libdtoolconfig.dll',
  2633. 'libdtool.dll',
  2634. ])
  2635. #
  2636. # DIRECTORY: panda/src/glxdisplay/
  2637. #
  2638. if (sys.platform != "win32"):
  2639. IPATH=['panda/src/glxdisplay', 'panda/src/gobj']
  2640. OPTS=['BUILDING_PANDAGLUT', 'NSPR', 'GLUT', 'NVIDIACG', 'CGGL']
  2641. CopyAllHeaders('panda/src/glxdisplay')
  2642. EnqueueCxx(ipath=IPATH, opts=OPTS, src='glxdisplay_composite.cxx', obj='glxdisplay_composite.obj')
  2643. IPATH=['panda/metalibs/pandagl']
  2644. CopyAllHeaders('panda/metalibs/pandagl')
  2645. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandagl.cxx', obj='pandagl_pandagl.obj')
  2646. EnqueueLink(opts=['GLUT', 'NVIDIACG', 'CGGL', 'NSPR'], dll='libpandagl.dll', obj=[
  2647. 'pandagl_pandagl.obj',
  2648. 'glgsg_config_glgsg.obj',
  2649. 'glgsg_glgsg.obj',
  2650. 'glxdisplay_composite.obj',
  2651. 'libpanda.dll',
  2652. 'libpandaexpress.dll',
  2653. 'libglstuff.dll',
  2654. 'libpandafx.dll',
  2655. 'libdtoolconfig.dll',
  2656. 'libdtool.dll',
  2657. ])
  2658. #
  2659. # DIRECTORY: panda/src/wgldisplay/
  2660. #
  2661. if (sys.platform == "win32"):
  2662. IPATH=['panda/src/wgldisplay', 'panda/src/glstuff', 'panda/src/gobj']
  2663. OPTS=['BUILDING_PANDAGL', 'NSPR', 'NVIDIACG', 'CGGL']
  2664. CopyAllHeaders('panda/src/wgldisplay')
  2665. EnqueueCxx(ipath=IPATH, opts=OPTS, src='wgldisplay_composite.cxx', obj='wgldisplay_composite.obj')
  2666. IPATH=['panda/metalibs/pandagl']
  2667. CopyAllHeaders('panda/metalibs/pandagl')
  2668. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandagl.cxx', obj='pandagl_pandagl.obj')
  2669. EnqueueLink(opts=['WINGDI', 'GLUT', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NSPR', 'NVIDIACG', 'CGGL'],
  2670. dll='libpandagl.dll', obj=[
  2671. 'pandagl_pandagl.obj',
  2672. 'glgsg_config_glgsg.obj',
  2673. 'glgsg_glgsg.obj',
  2674. 'wgldisplay_composite.obj',
  2675. 'libwindisplay.dll',
  2676. 'libpanda.dll',
  2677. 'libpandaexpress.dll',
  2678. 'libglstuff.dll',
  2679. 'libpandafx.dll',
  2680. 'libdtoolconfig.dll',
  2681. 'libdtool.dll',
  2682. ])
  2683. #
  2684. # DIRECTORY: panda/src/physics/
  2685. #
  2686. IPATH=['panda/src/physics']
  2687. OPTS=['BUILDING_PANDAPHYSICS', 'NSPR']
  2688. CopyAllHeaders('panda/src/physics')
  2689. EnqueueCxx(ipath=IPATH, opts=OPTS, src='physics_composite.cxx', obj='physics_composite.obj')
  2690. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libphysics.in', obj='libphysics_igate.obj',
  2691. src='panda/src/physics', module='pandaphysics', library='libphysics',
  2692. skip=["forces.h"], also=["physics_composite.cxx"])
  2693. #
  2694. # DIRECTORY: panda/src/particlesystem/
  2695. #
  2696. IPATH=['panda/src/particlesystem']
  2697. OPTS=['BUILDING_PANDAPHYSICS', 'NSPR']
  2698. CopyAllHeaders('panda/src/particlesystem')
  2699. EnqueueCxx(ipath=IPATH, opts=OPTS, src='particlesystem_composite.cxx', obj='particlesystem_composite.obj')
  2700. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libparticlesystem.in', obj='libparticlesystem_igate.obj',
  2701. src='panda/src/particlesystem', module='pandaphysics', library='libparticlesystem',
  2702. skip=['orientedParticle.h', 'orientedParticleFactory.h', 'particlefactories.h', 'emitters.h', 'particles.h'],
  2703. also=["particlesystem_composite.cxx"])
  2704. #
  2705. # DIRECTORY: panda/metalibs/pandaphysics/
  2706. #
  2707. IPATH=['panda/metalibs/pandaphysics']
  2708. CopyAllHeaders('panda/metalibs/pandaphysics')
  2709. OPTS=['BUILDING_PANDAPHYSICS', 'NSPR']
  2710. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaphysics.cxx', obj='pandaphysics_pandaphysics.obj')
  2711. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandaphysics_module.obj',
  2712. module='pandaphysics', library='libpandaphysics',
  2713. files=['libphysics.in', 'libparticlesystem.in'])
  2714. EnqueueLink(dll='libpandaphysics.dll', opts=['ADVAPI', 'NSPR'], obj=[
  2715. 'pandaphysics_pandaphysics.obj',
  2716. 'libpandaphysics_module.obj',
  2717. 'physics_composite.obj',
  2718. 'libphysics_igate.obj',
  2719. 'particlesystem_composite.obj',
  2720. 'libparticlesystem_igate.obj',
  2721. 'libpanda.dll',
  2722. 'libpandaexpress.dll',
  2723. 'libdtoolconfig.dll',
  2724. 'libdtool.dll',
  2725. ])
  2726. #
  2727. # DIRECTORY: panda/src/testbed/
  2728. #
  2729. IPATH=['panda/src/testbed']
  2730. OPTS=['NSPR']
  2731. CopyAllHeaders('panda/src/testbed')
  2732. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pview.cxx', obj='pview_pview.obj')
  2733. EnqueueLink(dll='pview.exe', opts=['ADVAPI', 'NSPR'], obj=[
  2734. 'pview_pview.obj',
  2735. 'libframework.dll',
  2736. 'libpanda.dll',
  2737. 'libpandafx.dll',
  2738. 'libpandaexpress.dll',
  2739. 'libdtoolconfig.dll',
  2740. 'libdtool.dll',
  2741. 'libpystub.dll',
  2742. ])
  2743. #
  2744. # DIRECTORY: direct/src/directbase/
  2745. #
  2746. if (OMIT.count("PYTHON")==0):
  2747. IPATH=['direct/src/directbase']
  2748. OPTS=['BUILDING_DIRECT', 'NSPR']
  2749. CopyAllHeaders('direct/src/directbase')
  2750. EnqueueCxx(ipath=IPATH, opts=OPTS, src='directbase.cxx', obj='directbase_directbase.obj')
  2751. EnqueueCxx(ipath=IPATH, opts=['BUILDING_PPYTHON'], src='ppython.cxx', obj='ppython.obj')
  2752. EnqueueLink(opts=['WINUSER'], dll='ppython.exe', obj=['ppython.obj'])
  2753. EnqueueCxx(ipath=IPATH, opts=['BUILDING_GENPYCODE'], src='ppython.cxx', obj='genpycode.obj')
  2754. EnqueueLink(opts=['WINUSER'], dll='genpycode.exe', obj=['genpycode.obj'])
  2755. EnqueueCxx(ipath=IPATH, opts=['BUILDING_PACKPANDA'], src='ppython.cxx', obj='packpanda.obj')
  2756. EnqueueLink(opts=['WINUSER'], dll='packpanda.exe', obj=['packpanda.obj'])
  2757. #
  2758. # DIRECTORY: direct/src/dcparser/
  2759. #
  2760. if (OMIT.count("PYTHON")==0):
  2761. IPATH=['direct/src/dcparser']
  2762. OPTS=['WITHINPANDA', 'BUILDING_DIRECT', 'NSPR']
  2763. CopyAllHeaders('direct/src/dcparser')
  2764. EnqueueBison(ipath=IPATH, opts=OPTS, pre='dcyy', src='dcParser.yxx', dsth='dcParser.h', obj='dcparser_dcParser.obj')
  2765. EnqueueFlex(ipath=IPATH, opts=OPTS, pre='dcyy', src='dcLexer.lxx', obj='dcparser_dcLexer.obj', dashi=0)
  2766. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dcparser_composite.cxx', obj='dcparser_composite.obj')
  2767. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdcparser.in', obj='libdcparser_igate.obj',
  2768. src='direct/src/dcparser', module='direct', library='libdcparser',
  2769. skip=['dcmsgtypes.h'],
  2770. also=["dcparser_composite.cxx"])
  2771. #
  2772. # DIRECTORY: direct/src/deadrec/
  2773. #
  2774. if (OMIT.count("PYTHON")==0):
  2775. IPATH=['direct/src/deadrec']
  2776. OPTS=['BUILDING_DIRECT', 'NSPR']
  2777. CopyAllHeaders('direct/src/deadrec')
  2778. EnqueueCxx(ipath=IPATH, opts=OPTS, src='deadrec_composite.cxx', obj='deadrec_composite.obj')
  2779. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdeadrec.in', obj='libdeadrec_igate.obj',
  2780. src='direct/src/deadrec', module='direct', library='libdeadrec',
  2781. skip=[], also=["deadrec_composite.cxx"])
  2782. #
  2783. # DIRECTORY: direct/src/distributed/
  2784. #
  2785. if (OMIT.count("PYTHON")==0):
  2786. IPATH=['direct/src/distributed', 'direct/src/dcparser']
  2787. OPTS=['WITHINPANDA', 'BUILDING_DIRECT', 'OPENSSL', 'NSPR']
  2788. CopyAllHeaders('direct/src/distributed')
  2789. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_distributed.cxx', obj='distributed_config_distributed.obj')
  2790. EnqueueCxx(ipath=IPATH, opts=OPTS, src='cConnectionRepository.cxx', obj='distributed_cConnectionRepository.obj')
  2791. EnqueueCxx(ipath=IPATH, opts=OPTS, src='cDistributedSmoothNodeBase.cxx', obj='distributed_cDistributedSmoothNodeBase.obj')
  2792. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdistributed.in', obj='libdistributed_igate.obj',
  2793. src='direct/src/distributed', module='direct', library='libdistributed',
  2794. skip=[], also=['config_distributed.cxx', 'cConnectionRepository.cxx', 'cDistributedSmoothNodeBase.cxx'])
  2795. #
  2796. # DIRECTORY: direct/src/interval/
  2797. #
  2798. if (OMIT.count("PYTHON")==0):
  2799. IPATH=['direct/src/interval']
  2800. OPTS=['BUILDING_DIRECT', 'NSPR']
  2801. CopyAllHeaders('direct/src/interval')
  2802. EnqueueCxx(ipath=IPATH, opts=OPTS, src='interval_composite.cxx', obj='interval_composite.obj')
  2803. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libinterval.in', obj='libinterval_igate.obj',
  2804. src='direct/src/interval', module='direct', library='libinterval',
  2805. skip=[], also=["interval_composite.cxx"])
  2806. #
  2807. # DIRECTORY: direct/src/showbase/
  2808. #
  2809. if (OMIT.count("PYTHON")==0):
  2810. IPATH=['direct/src/showbase']
  2811. OPTS=['BUILDING_DIRECT', 'NSPR']
  2812. CopyAllHeaders('direct/src/showbase')
  2813. EnqueueCxx(ipath=IPATH, opts=OPTS, src='showBase.cxx', obj='showbase_showBase.obj')
  2814. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libshowbase.in', obj='libshowbase_igate.obj',
  2815. src='direct/src/showbase', module='direct', library='libshowbase',
  2816. skip=[], also=["showBase.cxx"])
  2817. #
  2818. # DIRECTORY: direct/metalibs/direct/
  2819. #
  2820. if (OMIT.count("PYTHON")==0):
  2821. IPATH=['direct/metalibs/direct']
  2822. OPTS=['BUILDING_DIRECT', 'NSPR']
  2823. CopyAllHeaders('direct/metalibs/direct')
  2824. EnqueueCxx(ipath=IPATH, opts=OPTS, src='direct.cxx', obj='direct_direct.obj')
  2825. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libdirect_module.obj',
  2826. module='direct', library='libdirect',
  2827. files=['libdcparser.in', 'libshowbase.in', 'libdeadrec.in', 'libinterval.in', 'libdistributed.in'])
  2828. EnqueueLink(dll='libdirect.dll', opts=['ADVAPI', 'NSPR', 'OPENSSL'], obj=[
  2829. 'direct_direct.obj',
  2830. 'libdirect_module.obj',
  2831. 'directbase_directbase.obj',
  2832. 'dcparser_composite.obj',
  2833. 'dcparser_dcParser.obj',
  2834. 'dcparser_dcLexer.obj',
  2835. 'libdcparser_igate.obj',
  2836. 'showbase_showBase.obj',
  2837. 'libshowbase_igate.obj',
  2838. 'deadrec_composite.obj',
  2839. 'libdeadrec_igate.obj',
  2840. 'interval_composite.obj',
  2841. 'libinterval_igate.obj',
  2842. 'distributed_config_distributed.obj',
  2843. 'distributed_cConnectionRepository.obj',
  2844. 'distributed_cDistributedSmoothNodeBase.obj',
  2845. 'libdistributed_igate.obj',
  2846. 'libpanda.dll',
  2847. 'libpandaexpress.dll',
  2848. 'libdtoolconfig.dll',
  2849. 'libdtool.dll',
  2850. ])
  2851. #
  2852. # DIRECTORY: direct/src/dcparse/
  2853. #
  2854. if (OMIT.count("PYTHON")==0):
  2855. IPATH=['direct/src/dcparse', 'direct/src/dcparser']
  2856. OPTS=['WITHINPANDA', 'NSPR']
  2857. CopyAllHeaders('direct/src/dcparse')
  2858. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dcparse.cxx', obj='dcparse_dcparse.obj')
  2859. EnqueueLink(dll='dcparse.exe', opts=['ADVAPI', 'NSPR'], obj=[
  2860. 'dcparse_dcparse.obj',
  2861. 'libdirect.dll',
  2862. 'libpandaexpress.dll',
  2863. 'libdtoolconfig.dll',
  2864. 'libdtool.dll',
  2865. 'libpystub.dll',
  2866. ])
  2867. #
  2868. # DIRECTORY: direct/src/heapq/
  2869. #
  2870. if (OMIT.count("PYTHON")==0):
  2871. IPATH=['direct/src/heapq']
  2872. OPTS=['NSPR']
  2873. CopyAllHeaders('direct/src/heapq')
  2874. EnqueueCxx(ipath=IPATH, opts=OPTS, src='heapq.cxx', obj='heapq_heapq.obj')
  2875. EnqueueLink(dll='libheapq.dll', opts=['ADVAPI', 'NSPR'], obj=[
  2876. 'heapq_heapq.obj',
  2877. 'libpandaexpress.dll',
  2878. 'libdtoolconfig.dll',
  2879. 'libdtool.dll',
  2880. ])
  2881. #
  2882. # DIRECTORY: pandatool/src/pandatoolbase/
  2883. #
  2884. if (OMIT.count("PANDATOOL")==0):
  2885. IPATH=['pandatool/src/pandatoolbase']
  2886. OPTS=['NSPR']
  2887. CopyAllHeaders('pandatool/src/pandatoolbase')
  2888. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandatoolbase_composite1.cxx', obj='pandatoolbase_composite1.obj')
  2889. EnqueueLib(lib='libpandatoolbase.lib', obj=['pandatoolbase_composite1.obj'])
  2890. #
  2891. # DIRECTORY: pandatool/src/converter/
  2892. #
  2893. if (OMIT.count("PANDATOOL")==0):
  2894. IPATH=['pandatool/src/converter']
  2895. OPTS=['NSPR']
  2896. CopyAllHeaders('pandatool/src/converter')
  2897. EnqueueCxx(ipath=IPATH, opts=OPTS, src='somethingToEggConverter.cxx', obj='converter_somethingToEggConverter.obj')
  2898. EnqueueLib(lib='libconverter.lib', obj=['converter_somethingToEggConverter.obj'])
  2899. #
  2900. # DIRECTORY: pandatool/src/progbase/
  2901. #
  2902. if (OMIT.count("PANDATOOL")==0):
  2903. IPATH=['pandatool/src/progbase']
  2904. OPTS=['NSPR', 'ZLIB']
  2905. CopyAllHeaders('pandatool/src/progbase')
  2906. EnqueueCxx(ipath=IPATH, opts=OPTS, src='progbase_composite1.cxx', obj='progbase_composite1.obj')
  2907. EnqueueLib(lib='libprogbase.lib', obj=['progbase_composite1.obj'])
  2908. #
  2909. # DIRECTORY: pandatool/src/eggbase/
  2910. #
  2911. if (OMIT.count("PANDATOOL")==0):
  2912. IPATH=['pandatool/src/eggbase']
  2913. OPTS=['NSPR']
  2914. CopyAllHeaders('pandatool/src/eggbase')
  2915. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggbase_composite1.cxx', obj='eggbase_composite1.obj')
  2916. EnqueueLib(lib='libeggbase.lib', obj=['eggbase_composite1.obj'])
  2917. #
  2918. # DIRECTORY: pandatool/src/bam/
  2919. #
  2920. if (OMIT.count("PANDATOOL")==0):
  2921. IPATH=['pandatool/src/bam']
  2922. OPTS=['NSPR']
  2923. CopyAllHeaders('pandatool/src/bam')
  2924. EnqueueCxx(ipath=IPATH, opts=OPTS, src='bamInfo.cxx', obj='bam-info_bamInfo.obj')
  2925. EnqueueLink(dll='bam-info.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  2926. 'bam-info_bamInfo.obj',
  2927. 'libprogbase.lib',
  2928. 'libpandatoolbase.lib',
  2929. 'libpandaegg.dll',
  2930. 'libpanda.dll',
  2931. 'libpandaexpress.dll',
  2932. 'libdtoolconfig.dll',
  2933. 'libdtool.dll',
  2934. 'libpystub.dll',
  2935. ])
  2936. EnqueueCxx(ipath=IPATH, opts=OPTS, src='bamToEgg.cxx', obj='bam2egg_bamToEgg.obj')
  2937. EnqueueLink(dll='bam2egg.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  2938. 'bam2egg_bamToEgg.obj',
  2939. 'libconverter.lib',
  2940. 'libeggbase.lib',
  2941. 'libprogbase.lib',
  2942. 'libpandatoolbase.lib',
  2943. 'libpandaegg.dll',
  2944. 'libpanda.dll',
  2945. 'libpandaexpress.dll',
  2946. 'libdtoolconfig.dll',
  2947. 'libdtool.dll',
  2948. 'libpystub.dll',
  2949. ])
  2950. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToBam.cxx', obj='egg2bam_eggToBam.obj')
  2951. EnqueueLink(dll='egg2bam.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  2952. 'egg2bam_eggToBam.obj',
  2953. 'libeggbase.lib',
  2954. 'libprogbase.lib',
  2955. 'libconverter.lib',
  2956. 'libpandatoolbase.lib',
  2957. 'libpandaegg.dll',
  2958. 'libpanda.dll',
  2959. 'libpandaexpress.dll',
  2960. 'libdtoolconfig.dll',
  2961. 'libdtool.dll',
  2962. 'libpystub.dll',
  2963. ])
  2964. #
  2965. # DIRECTORY: pandatool/src/cvscopy/
  2966. #
  2967. if (OMIT.count("PANDATOOL")==0):
  2968. IPATH=['pandatool/src/cvscopy']
  2969. OPTS=['NSPR']
  2970. CopyAllHeaders('pandatool/src/cvscopy')
  2971. EnqueueCxx(ipath=IPATH, opts=OPTS, src='cvscopy_composite1.cxx', obj='cvscopy_composite1.obj')
  2972. EnqueueLib(lib='libcvscopy.lib', obj=['cvscopy_composite1.obj'])
  2973. #
  2974. # DIRECTORY: pandatool/src/dxf/
  2975. #
  2976. if (OMIT.count("PANDATOOL")==0):
  2977. IPATH=['pandatool/src/dxf']
  2978. OPTS=['NSPR']
  2979. CopyAllHeaders('pandatool/src/dxf')
  2980. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxf_composite1.cxx', obj='dxf_composite1.obj')
  2981. EnqueueLib(lib='libdxf.lib', obj=['dxf_composite1.obj'])
  2982. #
  2983. # DIRECTORY: pandatool/src/dxfegg/
  2984. #
  2985. if (OMIT.count("PANDATOOL")==0):
  2986. IPATH=['pandatool/src/dxfegg']
  2987. OPTS=['NSPR']
  2988. CopyAllHeaders('pandatool/src/dxfegg')
  2989. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfToEggConverter.cxx', obj='dxfegg_dxfToEggConverter.obj')
  2990. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfToEggLayer.cxx', obj='dxfegg_dxfToEggLayer.obj')
  2991. EnqueueLib(lib='libdxfegg.lib', obj=[
  2992. 'dxfegg_dxfToEggConverter.obj',
  2993. 'dxfegg_dxfToEggLayer.obj',
  2994. ])
  2995. #
  2996. # DIRECTORY: pandatool/src/dxfprogs/
  2997. #
  2998. if (OMIT.count("PANDATOOL")==0):
  2999. IPATH=['pandatool/src/dxfprogs']
  3000. OPTS=['NSPR']
  3001. CopyAllHeaders('pandatool/src/dxfprogs')
  3002. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfPoints.cxx', obj='dxf-points_dxfPoints.obj')
  3003. EnqueueLink(dll='dxf-points.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3004. 'dxf-points_dxfPoints.obj',
  3005. 'libprogbase.lib',
  3006. 'libdxf.lib',
  3007. 'libpandatoolbase.lib',
  3008. 'libpanda.dll',
  3009. 'libpandaexpress.dll',
  3010. 'libdtoolconfig.dll',
  3011. 'libdtool.dll',
  3012. 'libpystub.dll',
  3013. ])
  3014. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfToEgg.cxx', obj='dxf2egg_dxfToEgg.obj')
  3015. EnqueueLink(dll='dxf2egg.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3016. 'dxf2egg_dxfToEgg.obj',
  3017. 'libdxfegg.lib',
  3018. 'libdxf.lib',
  3019. 'libeggbase.lib',
  3020. 'libprogbase.lib',
  3021. 'libpandatoolbase.lib',
  3022. 'libconverter.lib',
  3023. 'libpandaegg.dll',
  3024. 'libpanda.dll',
  3025. 'libpandaexpress.dll',
  3026. 'libdtoolconfig.dll',
  3027. 'libdtool.dll',
  3028. 'libpystub.dll',
  3029. ])
  3030. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToDXF.cxx', obj='egg2dxf_eggToDXF.obj')
  3031. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToDXFLayer.cxx', obj='egg2dxf_eggToDXFLayer.obj')
  3032. EnqueueLink(dll='egg2dxf.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3033. 'egg2dxf_eggToDXF.obj',
  3034. 'egg2dxf_eggToDXFLayer.obj',
  3035. 'libdxf.lib',
  3036. 'libeggbase.lib',
  3037. 'libprogbase.lib',
  3038. 'libpandatoolbase.lib',
  3039. 'libconverter.lib',
  3040. 'libpandaegg.dll',
  3041. 'libpanda.dll',
  3042. 'libpandaexpress.dll',
  3043. 'libdtoolconfig.dll',
  3044. 'libdtool.dll',
  3045. 'libpystub.dll',
  3046. ])
  3047. #
  3048. # DIRECTORY: pandatool/src/palettizer/
  3049. #
  3050. if (OMIT.count("PANDATOOL")==0):
  3051. IPATH=['pandatool/src/palettizer']
  3052. OPTS=['NSPR']
  3053. CopyAllHeaders('pandatool/src/palettizer')
  3054. EnqueueCxx(ipath=IPATH, opts=OPTS, src='palettizer_composite1.cxx', obj='palettizer_composite1.obj')
  3055. EnqueueLib(lib='libpalettizer.lib', obj=['palettizer_composite1.obj'])
  3056. #
  3057. # DIRECTORY: pandatool/src/egg-mkfont/
  3058. #
  3059. if (OMIT.count("FREETYPE")==0) and (OMIT.count("PANDATOOL")==0):
  3060. IPATH=['pandatool/src/egg-mkfont', 'pandatool/src/palettizer']
  3061. OPTS=['NSPR', 'FREETYPE']
  3062. CopyAllHeaders('pandatool/src/egg-mkfont')
  3063. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggMakeFont.cxx', obj='egg-mkfont_eggMakeFont.obj')
  3064. EnqueueCxx(ipath=IPATH, opts=OPTS, src='rangeDescription.cxx', obj='egg-mkfont_rangeDescription.obj')
  3065. EnqueueCxx(ipath=IPATH, opts=OPTS, src='rangeIterator.cxx', obj='egg-mkfont_rangeIterator.obj')
  3066. EnqueueLink(dll='egg-mkfont.exe', opts=['ADVAPI', 'NSPR', 'FREETYPE'], obj=[
  3067. 'egg-mkfont_eggMakeFont.obj',
  3068. 'egg-mkfont_rangeDescription.obj',
  3069. 'egg-mkfont_rangeIterator.obj',
  3070. 'libpalettizer.lib',
  3071. 'libeggbase.lib',
  3072. 'libprogbase.lib',
  3073. 'libpandatoolbase.lib',
  3074. 'libconverter.lib',
  3075. 'libpandaegg.dll',
  3076. 'libpanda.dll',
  3077. 'libpandaexpress.dll',
  3078. 'libdtoolconfig.dll',
  3079. 'libdtool.dll',
  3080. 'libpystub.dll',
  3081. ])
  3082. #
  3083. # DIRECTORY: pandatool/src/eggcharbase/
  3084. #
  3085. if (OMIT.count("PANDATOOL")==0):
  3086. IPATH=['pandatool/src/eggcharbase']
  3087. OPTS=['ZLIB', 'NSPR']
  3088. CopyAllHeaders('pandatool/src/eggcharbase')
  3089. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggcharbase_composite1.cxx', obj='eggcharbase_composite1.obj')
  3090. EnqueueLib(lib='libeggcharbase.lib', obj=['eggcharbase_composite1.obj'])
  3091. #
  3092. # DIRECTORY: pandatool/src/egg-optchar/
  3093. #
  3094. if (OMIT.count("PANDATOOL")==0):
  3095. IPATH=['pandatool/src/egg-optchar']
  3096. OPTS=['NSPR']
  3097. CopyAllHeaders('pandatool/src/egg-optchar')
  3098. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_egg_optchar.cxx', obj='egg-optchar_config_egg_optchar.obj')
  3099. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggOptchar.cxx', obj='egg-optchar_eggOptchar.obj')
  3100. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggOptcharUserData.cxx', obj='egg-optchar_eggOptcharUserData.obj')
  3101. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vertexMembership.cxx', obj='egg-optchar_vertexMembership.obj')
  3102. EnqueueLink(dll='egg-optchar.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3103. 'egg-optchar_config_egg_optchar.obj',
  3104. 'egg-optchar_eggOptchar.obj',
  3105. 'egg-optchar_eggOptcharUserData.obj',
  3106. 'egg-optchar_vertexMembership.obj',
  3107. 'libeggcharbase.lib',
  3108. 'libconverter.lib',
  3109. 'libeggbase.lib',
  3110. 'libprogbase.lib',
  3111. 'libpandatoolbase.lib',
  3112. 'libpandaegg.dll',
  3113. 'libpanda.dll',
  3114. 'libpandaexpress.dll',
  3115. 'libdtoolconfig.dll',
  3116. 'libdtool.dll',
  3117. 'libpystub.dll',
  3118. ])
  3119. #
  3120. # DIRECTORY: pandatool/src/egg-palettize/
  3121. #
  3122. if (OMIT.count("PANDATOOL")==0):
  3123. IPATH=['pandatool/src/egg-palettize', 'pandatool/src/palettizer']
  3124. OPTS=['NSPR']
  3125. CopyAllHeaders('pandatool/src/egg-palettize')
  3126. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggPalettize.cxx', obj='egg-palettize_eggPalettize.obj')
  3127. EnqueueLink(dll='egg-palettize.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3128. 'egg-palettize_eggPalettize.obj',
  3129. 'libpalettizer.lib',
  3130. 'libeggbase.lib',
  3131. 'libprogbase.lib',
  3132. 'libpandatoolbase.lib',
  3133. 'libconverter.lib',
  3134. 'libpandaegg.dll',
  3135. 'libpanda.dll',
  3136. 'libpandaexpress.dll',
  3137. 'libdtoolconfig.dll',
  3138. 'libdtool.dll',
  3139. 'libpystub.dll',
  3140. ])
  3141. #
  3142. # DIRECTORY: pandatool/src/egg-qtess/
  3143. #
  3144. if (OMIT.count("PANDATOOL")==0):
  3145. IPATH=['pandatool/src/egg-qtess']
  3146. OPTS=['NSPR']
  3147. CopyAllHeaders('pandatool/src/egg-qtess')
  3148. EnqueueCxx(ipath=IPATH, opts=OPTS, src='egg-qtess_composite1.cxx', obj='egg-qtess_composite1.obj')
  3149. EnqueueLink(dll='egg-qtess.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3150. 'egg-qtess_composite1.obj',
  3151. 'libeggbase.lib',
  3152. 'libprogbase.lib',
  3153. 'libconverter.lib',
  3154. 'libpandatoolbase.lib',
  3155. 'libpandaegg.dll',
  3156. 'libpanda.dll',
  3157. 'libpandaexpress.dll',
  3158. 'libdtoolconfig.dll',
  3159. 'libdtool.dll',
  3160. 'libpystub.dll',
  3161. ])
  3162. #
  3163. # DIRECTORY: pandatool/src/eggprogs/
  3164. #
  3165. if (OMIT.count("PANDATOOL")==0):
  3166. IPATH=['pandatool/src/eggprogs']
  3167. OPTS=['NSPR']
  3168. CopyAllHeaders('pandatool/src/eggprogs')
  3169. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggCrop.cxx', obj='egg-crop_eggCrop.obj')
  3170. EnqueueLink(dll='egg-crop.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3171. 'egg-crop_eggCrop.obj',
  3172. 'libconverter.lib',
  3173. 'libeggbase.lib',
  3174. 'libprogbase.lib',
  3175. 'libpandatoolbase.lib',
  3176. 'libpandaegg.dll',
  3177. 'libpanda.dll',
  3178. 'libpandaexpress.dll',
  3179. 'libdtoolconfig.dll',
  3180. 'libdtool.dll',
  3181. 'libpystub.dll',
  3182. ])
  3183. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggMakeTube.cxx', obj='egg-make-tube_eggMakeTube.obj')
  3184. EnqueueLink(dll='egg-make-tube.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3185. 'egg-make-tube_eggMakeTube.obj',
  3186. 'libconverter.lib',
  3187. 'libeggbase.lib',
  3188. 'libprogbase.lib',
  3189. 'libpandatoolbase.lib',
  3190. 'libpandaegg.dll',
  3191. 'libpanda.dll',
  3192. 'libpandaexpress.dll',
  3193. 'libdtoolconfig.dll',
  3194. 'libdtool.dll',
  3195. 'libpystub.dll',
  3196. ])
  3197. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggTextureCards.cxx', obj='egg-texture-cards_eggTextureCards.obj')
  3198. EnqueueLink(dll='egg-texture-cards.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3199. 'egg-texture-cards_eggTextureCards.obj',
  3200. 'libconverter.lib',
  3201. 'libeggbase.lib',
  3202. 'libprogbase.lib',
  3203. 'libpandatoolbase.lib',
  3204. 'libpandaegg.dll',
  3205. 'libpanda.dll',
  3206. 'libpandaexpress.dll',
  3207. 'libdtoolconfig.dll',
  3208. 'libdtool.dll',
  3209. 'libpystub.dll',
  3210. ])
  3211. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggTopstrip.cxx', obj='egg-topstrip_eggTopstrip.obj')
  3212. EnqueueLink(dll='egg-topstrip.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3213. 'egg-topstrip_eggTopstrip.obj',
  3214. 'libeggcharbase.lib',
  3215. 'libconverter.lib',
  3216. 'libeggbase.lib',
  3217. 'libprogbase.lib',
  3218. 'libpandatoolbase.lib',
  3219. 'libpandaegg.dll',
  3220. 'libpanda.dll',
  3221. 'libpandaexpress.dll',
  3222. 'libdtoolconfig.dll',
  3223. 'libdtool.dll',
  3224. 'libpystub.dll',
  3225. ])
  3226. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggTrans.cxx', obj='egg-trans_eggTrans.obj')
  3227. EnqueueLink(dll='egg-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3228. 'egg-trans_eggTrans.obj',
  3229. 'libconverter.lib',
  3230. 'libeggbase.lib',
  3231. 'libprogbase.lib',
  3232. 'libpandatoolbase.lib',
  3233. 'libpandaegg.dll',
  3234. 'libpanda.dll',
  3235. 'libpandaexpress.dll',
  3236. 'libdtoolconfig.dll',
  3237. 'libdtool.dll',
  3238. 'libpystub.dll',
  3239. ])
  3240. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToC.cxx', obj='egg2c_eggToC.obj')
  3241. EnqueueLink(dll='egg2c.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3242. 'egg2c_eggToC.obj',
  3243. 'libconverter.lib',
  3244. 'libeggbase.lib',
  3245. 'libprogbase.lib',
  3246. 'libpandatoolbase.lib',
  3247. 'libpandaegg.dll',
  3248. 'libpanda.dll',
  3249. 'libpandaexpress.dll',
  3250. 'libdtoolconfig.dll',
  3251. 'libdtool.dll',
  3252. 'libpystub.dll',
  3253. ])
  3254. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggRename.cxx', obj='egg-rename_eggRename.obj')
  3255. EnqueueLink(dll='egg-rename.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3256. 'egg-rename_eggRename.obj',
  3257. 'libconverter.lib',
  3258. 'libeggbase.lib',
  3259. 'libprogbase.lib',
  3260. 'libpandatoolbase.lib',
  3261. 'libpandaegg.dll',
  3262. 'libpanda.dll',
  3263. 'libpandaexpress.dll',
  3264. 'libdtoolconfig.dll',
  3265. 'libdtool.dll',
  3266. 'libpystub.dll',
  3267. ])
  3268. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggRetargetAnim.cxx', obj='egg-retarget-anim_eggRetargetAnim.obj')
  3269. EnqueueLink(dll='egg-retarget-anim.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3270. 'egg-retarget-anim_eggRetargetAnim.obj',
  3271. 'libeggcharbase.lib',
  3272. 'libconverter.lib',
  3273. 'libeggbase.lib',
  3274. 'libprogbase.lib',
  3275. 'libpandatoolbase.lib',
  3276. 'libpandaegg.dll',
  3277. 'libpanda.dll',
  3278. 'libpandaexpress.dll',
  3279. 'libdtoolconfig.dll',
  3280. 'libdtool.dll',
  3281. 'libpystub.dll',
  3282. ])
  3283. #
  3284. # DIRECTORY: pandatool/src/flt/
  3285. #
  3286. if (OMIT.count("PANDATOOL")==0):
  3287. IPATH=['pandatool/src/flt']
  3288. OPTS=['NSPR', 'ZLIB']
  3289. CopyAllHeaders('pandatool/src/flt')
  3290. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltVectorRecord.cxx', obj='flt_fltVectorRecord.obj')
  3291. EnqueueCxx(ipath=IPATH, opts=OPTS, src='flt_composite1.cxx', obj='flt_composite1.obj')
  3292. EnqueueLib(lib='libflt.lib', obj=['flt_fltVectorRecord.obj', 'flt_composite1.obj'])
  3293. #
  3294. # DIRECTORY: pandatool/src/fltegg/
  3295. #
  3296. if (OMIT.count("PANDATOOL")==0):
  3297. IPATH=['pandatool/src/fltegg']
  3298. OPTS=['NSPR']
  3299. CopyAllHeaders('pandatool/src/fltegg')
  3300. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltToEggConverter.cxx', obj='fltegg_fltToEggConverter.obj')
  3301. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltToEggLevelState.cxx', obj='fltegg_fltToEggLevelState.obj')
  3302. EnqueueLib(lib='libfltegg.lib', obj=['fltegg_fltToEggConverter.obj', 'fltegg_fltToEggLevelState.obj'])
  3303. #
  3304. # DIRECTORY: pandatool/src/fltprogs/
  3305. #
  3306. if (OMIT.count("PANDATOOL")==0):
  3307. IPATH=['pandatool/src/fltprogs', 'pandatool/src/flt', 'pandatool/src/cvscopy']
  3308. OPTS=['NSPR']
  3309. CopyAllHeaders('pandatool/src/fltprogs')
  3310. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToFlt.cxx', obj='egg2flt_eggToFlt.obj')
  3311. EnqueueLink(dll='egg2flt.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3312. 'egg2flt_eggToFlt.obj',
  3313. 'libflt.lib',
  3314. 'libeggbase.lib',
  3315. 'libprogbase.lib',
  3316. 'libconverter.lib',
  3317. 'libpandatoolbase.lib',
  3318. 'libpandaegg.dll',
  3319. 'libpanda.dll',
  3320. 'libpandaexpress.dll',
  3321. 'libdtoolconfig.dll',
  3322. 'libdtool.dll',
  3323. 'libpystub.dll',
  3324. ])
  3325. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltInfo.cxx', obj='flt-info_fltInfo.obj')
  3326. EnqueueLink(dll='flt-info.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3327. 'flt-info_fltInfo.obj',
  3328. 'libprogbase.lib',
  3329. 'libflt.lib',
  3330. 'libpandatoolbase.lib',
  3331. 'libconverter.lib',
  3332. 'libpandaegg.dll',
  3333. 'libpanda.dll',
  3334. 'libpandaexpress.dll',
  3335. 'libdtoolconfig.dll',
  3336. 'libdtool.dll',
  3337. 'libpystub.dll',
  3338. ])
  3339. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltTrans.cxx', obj='flt-trans_fltTrans.obj')
  3340. EnqueueLink(dll='flt-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3341. 'flt-trans_fltTrans.obj',
  3342. 'libprogbase.lib',
  3343. 'libflt.lib',
  3344. 'libpandatoolbase.lib',
  3345. 'libconverter.lib',
  3346. 'libpandaegg.dll',
  3347. 'libpanda.dll',
  3348. 'libpandaexpress.dll',
  3349. 'libdtoolconfig.dll',
  3350. 'libdtool.dll',
  3351. 'libpystub.dll',
  3352. ])
  3353. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltToEgg.cxx', obj='flt2egg_fltToEgg.obj')
  3354. EnqueueLink(dll='flt2egg.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3355. 'flt2egg_fltToEgg.obj',
  3356. 'libflt.lib',
  3357. 'libfltegg.lib',
  3358. 'libeggbase.lib',
  3359. 'libprogbase.lib',
  3360. 'libconverter.lib',
  3361. 'libpandatoolbase.lib',
  3362. 'libpandaegg.dll',
  3363. 'libpanda.dll',
  3364. 'libpandaexpress.dll',
  3365. 'libdtoolconfig.dll',
  3366. 'libdtool.dll',
  3367. 'libpystub.dll',
  3368. ])
  3369. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltCopy.cxx', obj='fltcopy_fltCopy.obj')
  3370. EnqueueLink(dll='fltcopy.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3371. 'fltcopy_fltCopy.obj',
  3372. 'libcvscopy.lib',
  3373. 'libflt.lib',
  3374. 'libprogbase.lib',
  3375. 'libpandatoolbase.lib',
  3376. 'libconverter.lib',
  3377. 'libpandaegg.dll',
  3378. 'libpanda.dll',
  3379. 'libpandaexpress.dll',
  3380. 'libdtoolconfig.dll',
  3381. 'libdtool.dll',
  3382. 'libpystub.dll',
  3383. ])
  3384. #
  3385. # DIRECTORY: pandatool/src/imagebase/
  3386. #
  3387. if (OMIT.count("PANDATOOL")==0):
  3388. IPATH=['pandatool/src/imagebase']
  3389. OPTS=['NSPR']
  3390. CopyAllHeaders('pandatool/src/imagebase')
  3391. EnqueueCxx(ipath=IPATH, opts=OPTS, src='imagebase_composite1.cxx', obj='imagebase_composite1.obj')
  3392. EnqueueLib(lib='libimagebase.lib', obj=['imagebase_composite1.obj'])
  3393. #
  3394. # DIRECTORY: pandatool/src/imageprogs/
  3395. #
  3396. if (OMIT.count("PANDATOOL")==0):
  3397. IPATH=['pandatool/src/imageprogs']
  3398. OPTS=['NSPR']
  3399. CopyAllHeaders('pandatool/src/imageprogs')
  3400. EnqueueCxx(ipath=IPATH, opts=OPTS, src='imageInfo.cxx', obj='image-info_imageInfo.obj')
  3401. EnqueueLink(dll='image-info.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3402. 'image-info_imageInfo.obj',
  3403. 'libimagebase.lib',
  3404. 'libprogbase.lib',
  3405. 'libpandatoolbase.lib',
  3406. 'libpandaegg.dll',
  3407. 'libpanda.dll',
  3408. 'libpandaexpress.dll',
  3409. 'libdtoolconfig.dll',
  3410. 'libdtool.dll',
  3411. 'libpystub.dll',
  3412. ])
  3413. EnqueueCxx(ipath=IPATH, opts=OPTS, src='imageResize.cxx', obj='image-resize_imageResize.obj')
  3414. EnqueueLink(dll='image-resize.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3415. 'image-resize_imageResize.obj',
  3416. 'libimagebase.lib',
  3417. 'libprogbase.lib',
  3418. 'libpandatoolbase.lib',
  3419. 'libpandaegg.dll',
  3420. 'libpanda.dll',
  3421. 'libpandaexpress.dll',
  3422. 'libdtoolconfig.dll',
  3423. 'libdtool.dll',
  3424. 'libpystub.dll',
  3425. ])
  3426. EnqueueCxx(ipath=IPATH, opts=OPTS, src='imageTrans.cxx', obj='image-trans_imageTrans.obj')
  3427. EnqueueLink(dll='image-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3428. 'image-trans_imageTrans.obj',
  3429. 'libimagebase.lib',
  3430. 'libprogbase.lib',
  3431. 'libpandatoolbase.lib',
  3432. 'libpandaegg.dll',
  3433. 'libpanda.dll',
  3434. 'libpandaexpress.dll',
  3435. 'libdtoolconfig.dll',
  3436. 'libdtool.dll',
  3437. 'libpystub.dll',
  3438. ])
  3439. #
  3440. # DIRECTORY: pandatool/src/lwo/
  3441. #
  3442. if (OMIT.count("PANDATOOL")==0):
  3443. IPATH=['pandatool/src/lwo']
  3444. OPTS=['NSPR']
  3445. CopyAllHeaders('pandatool/src/lwo')
  3446. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwo_composite1.cxx', obj='lwo_composite1.obj')
  3447. EnqueueLib(lib='liblwo.lib', obj=['lwo_composite1.obj'])
  3448. #
  3449. # DIRECTORY: pandatool/src/lwoegg/
  3450. #
  3451. if (OMIT.count("PANDATOOL")==0):
  3452. IPATH=['pandatool/src/lwoegg']
  3453. OPTS=['NSPR']
  3454. CopyAllHeaders('pandatool/src/lwoegg')
  3455. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwoegg_composite1.cxx', obj='lwoegg_composite1.obj')
  3456. EnqueueLib(lib='liblwoegg.lib', obj=['lwoegg_composite1.obj'])
  3457. #
  3458. # DIRECTORY: pandatool/src/lwoprogs/
  3459. #
  3460. if (OMIT.count("PANDATOOL")==0):
  3461. IPATH=['pandatool/src/lwoprogs', 'pandatool/src/lwo']
  3462. OPTS=['NSPR']
  3463. CopyAllHeaders('pandatool/src/lwoprogs')
  3464. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwoScan.cxx', obj='lwo-scan_lwoScan.obj')
  3465. EnqueueLink(dll='lwo-scan.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3466. 'lwo-scan_lwoScan.obj',
  3467. 'liblwo.lib',
  3468. 'libprogbase.lib',
  3469. 'libpandatoolbase.lib',
  3470. 'libpandaegg.dll',
  3471. 'libpanda.dll',
  3472. 'libpandaexpress.dll',
  3473. 'libdtoolconfig.dll',
  3474. 'libdtool.dll',
  3475. 'libpystub.dll',
  3476. ])
  3477. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwoToEgg.cxx', obj='lwo2egg_lwoToEgg.obj')
  3478. EnqueueLink(dll='lwo2egg.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3479. 'lwo2egg_lwoToEgg.obj',
  3480. 'liblwo.lib',
  3481. 'liblwoegg.lib',
  3482. 'libeggbase.lib',
  3483. 'libprogbase.lib',
  3484. 'libpandatoolbase.lib',
  3485. 'libconverter.lib',
  3486. 'libpandaegg.dll',
  3487. 'libpanda.dll',
  3488. 'libpandaexpress.dll',
  3489. 'libdtoolconfig.dll',
  3490. 'libdtool.dll',
  3491. 'libpystub.dll',
  3492. ])
  3493. #
  3494. # DIRECTORY: pandatool/src/maya/
  3495. #
  3496. for VER in MAYAVERSIONS:
  3497. if (OMIT.count("MAYA"+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3498. IPATH=['pandatool/src/maya']
  3499. OPTS=['MAYA'+VER, 'NSPR']
  3500. CopyAllHeaders('pandatool/src/maya')
  3501. EnqueueCxx(ipath=IPATH, opts=OPTS, src='maya_composite1.cxx', obj='maya'+VER+'_composite1.obj')
  3502. EnqueueLib(lib='libmaya'+VER+'.lib', obj=[ 'maya'+VER+'_composite1.obj' ])
  3503. #
  3504. # DIRECTORY: pandatool/src/mayaegg/
  3505. #
  3506. for VER in MAYAVERSIONS:
  3507. if (OMIT.count("MAYA"+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3508. IPATH=['pandatool/src/mayaegg', 'pandatool/src/maya']
  3509. OPTS=['MAYA'+VER, 'NSPR']
  3510. CopyAllHeaders('pandatool/src/mayaegg')
  3511. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaEggLoader.cxx', obj='mayaegg'+VER+'_loader.obj')
  3512. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaegg_composite1.cxx', obj='mayaegg'+VER+'_composite1.obj')
  3513. EnqueueLib(lib='libmayaegg'+VER+'.lib', obj=[ 'mayaegg'+VER+'_composite1.obj' ])
  3514. #
  3515. # DIRECTORY: pandatool/src/maxegg/
  3516. #
  3517. for VER in MAXVERSIONS:
  3518. if (OMIT.count("MAX"+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3519. IPATH=['pandatool/src/maxegg']
  3520. OPTS=['MAX'+VER, 'NSPR', "WINCOMCTL", "WINCOMDLG", "WINUSER", "MSFORSCOPE"]
  3521. CopyAllHeaders('pandatool/src/maxegg')
  3522. CopyFile("built/tmp/maxEgg.obj", "pandatool/src/maxegg/maxEgg.obj")
  3523. EnqueueCxx(ipath=IPATH, opts=OPTS, src='maxEggLoader.cxx',obj='maxegg'+VER+'_loader.obj')
  3524. EnqueueCxx(ipath=IPATH, opts=OPTS, src='maxegg_composite1.cxx',obj='maxegg'+VER+'_composite1.obj')
  3525. EnqueueLink(opts=OPTS, dll='maxegg'+VER+'.dlo', ldef="pandatool/src/maxegg/maxEgg.def", obj=[
  3526. 'maxegg'+VER+'_composite1.obj',
  3527. 'maxEgg.obj',
  3528. 'libeggbase.lib',
  3529. 'libprogbase.lib',
  3530. 'libpandatoolbase.lib',
  3531. 'libconverter.lib',
  3532. 'libpandaegg.dll',
  3533. 'libpanda.dll',
  3534. 'libpandaexpress.dll',
  3535. 'libdtoolconfig.dll',
  3536. 'libdtool.dll',
  3537. 'libpystub.dll'
  3538. ])
  3539. #
  3540. # DIRECTORY: pandatool/src/maxprogs/
  3541. #
  3542. for VER in MAXVERSIONS:
  3543. if (OMIT.count("MAX"+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3544. IPATH=['pandatool/src/maxprogs']
  3545. OPTS=['MAX'+VER, 'NSPR', "WINCOMCTL", "WINCOMDLG", "WINUSER", "MSFORSCOPE"]
  3546. CopyAllHeaders('pandatool/src/maxprogs')
  3547. CopyFile("built/tmp/maxImportRes.obj", "pandatool/src/maxprogs/maxImportRes.obj")
  3548. EnqueueCxx(ipath=IPATH, opts=OPTS, src='maxEggImport.cxx',obj='maxprogs'+VER+'_maxeggimport.obj')
  3549. EnqueueLink(opts=OPTS, dll='maxeggimport'+VER+'.dle', ldef="pandatool/src/maxprogs/maxEggImport.def", obj=[
  3550. 'maxegg'+VER+'_loader.obj',
  3551. 'maxprogs'+VER+'_maxeggimport.obj',
  3552. 'maxImportRes.obj',
  3553. 'libpandaegg.dll',
  3554. 'libpanda.dll',
  3555. 'libpandaexpress.dll',
  3556. 'libdtoolconfig.dll',
  3557. 'libdtool.dll',
  3558. 'libpystub.dll'
  3559. ])
  3560. #
  3561. # DIRECTORY: pandatool/src/vrml/
  3562. #
  3563. if (OMIT.count("PANDATOOL")==0):
  3564. IPATH=['pandatool/src/vrml']
  3565. OPTS=['ZLIB', 'NSPR']
  3566. CopyAllHeaders('pandatool/src/vrml')
  3567. EnqueueBison(ipath=IPATH, opts=OPTS, pre='vrmlyy', src='vrmlParser.yxx', dsth='vrmlParser.h', obj='pvrml_vrmlParser.obj')
  3568. EnqueueFlex(ipath=IPATH, opts=OPTS, pre='vrmlyy', src='vrmlLexer.lxx', obj='pvrml_vrmlLexer.obj', dashi=0)
  3569. EnqueueCxx(ipath=IPATH, opts=OPTS, src='parse_vrml.cxx', obj='pvrml_parse_vrml.obj')
  3570. EnqueueCxx(ipath=IPATH, opts=OPTS, src='standard_nodes.cxx', obj='pvrml_standard_nodes.obj')
  3571. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlNode.cxx', obj='pvrml_vrmlNode.obj')
  3572. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlNodeType.cxx', obj='pvrml_vrmlNodeType.obj')
  3573. EnqueueLib(lib='libpvrml.lib', obj=[
  3574. 'pvrml_parse_vrml.obj',
  3575. 'pvrml_standard_nodes.obj',
  3576. 'pvrml_vrmlNode.obj',
  3577. 'pvrml_vrmlNodeType.obj',
  3578. 'pvrml_vrmlParser.obj',
  3579. 'pvrml_vrmlLexer.obj',
  3580. ])
  3581. #
  3582. # DIRECTORY: pandatool/src/vrmlegg/
  3583. #
  3584. if (OMIT.count("PANDATOOL")==0):
  3585. IPATH=['pandatool/src/vrmlegg', 'pandatool/src/vrml']
  3586. OPTS=['NSPR']
  3587. CopyAllHeaders('pandatool/src/vrmlegg')
  3588. EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexedFaceSet.cxx', obj='vrmlegg_indexedFaceSet.obj')
  3589. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlAppearance.cxx', obj='vrmlegg_vrmlAppearance.obj')
  3590. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlToEggConverter.cxx', obj='vrmlegg_vrmlToEggConverter.obj')
  3591. EnqueueLib(lib='libvrmlegg.lib', obj=[
  3592. 'vrmlegg_indexedFaceSet.obj',
  3593. 'vrmlegg_vrmlAppearance.obj',
  3594. 'vrmlegg_vrmlToEggConverter.obj',
  3595. ])
  3596. #
  3597. # DIRECTORY: pandatool/src/xfile/
  3598. #
  3599. if (OMIT.count("PANDATOOL")==0):
  3600. IPATH=['pandatool/src/xfile']
  3601. OPTS=['ZLIB', 'NSPR']
  3602. CopyAllHeaders('pandatool/src/xfile')
  3603. EnqueueBison(ipath=IPATH, opts=OPTS, pre='xyy', src='xParser.yxx', dsth='xParser.h', obj='xfile_xParser.obj')
  3604. EnqueueFlex(ipath=IPATH, opts=OPTS, pre='xyy', src='xLexer.lxx', obj='xfile_xLexer.obj', dashi=1)
  3605. EnqueueCxx(ipath=IPATH, opts=OPTS, src='xfile_composite1.cxx', obj='xfile_composite1.obj')
  3606. EnqueueLib(lib='libxfile.lib', obj=[
  3607. 'xfile_composite1.obj',
  3608. 'xfile_xParser.obj',
  3609. 'xfile_xLexer.obj',
  3610. ])
  3611. #
  3612. # DIRECTORY: pandatool/src/xfileegg/
  3613. #
  3614. if (OMIT.count("PANDATOOL")==0):
  3615. IPATH=['pandatool/src/xfileegg', 'pandatool/src/xfile']
  3616. OPTS=['NSPR']
  3617. CopyAllHeaders('pandatool/src/xfileegg')
  3618. EnqueueCxx(ipath=IPATH, opts=OPTS, src='xfileegg_composite1.cxx', obj='xfileegg_composite1.obj')
  3619. EnqueueLib(lib='libxfileegg.lib', obj=[
  3620. 'xfileegg_composite1.obj',
  3621. ])
  3622. #
  3623. # DIRECTORY: pandatool/src/ptloader/
  3624. #
  3625. if (OMIT.count("PANDATOOL")==0):
  3626. IPATH=['pandatool/src/ptloader', 'pandatool/src/flt', 'pandatool/src/lwo', 'pandatool/src/xfile', 'pandatool/src/xfileegg']
  3627. OPTS=['BUILDING_PTLOADER', 'NSPR']
  3628. CopyAllHeaders('pandatool/src/ptloader')
  3629. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_ptloader.cxx', obj='ptloader_config_ptloader.obj')
  3630. EnqueueCxx(ipath=IPATH, opts=OPTS, src='loaderFileTypePandatool.cxx', obj='ptloader_loaderFileTypePandatool.obj')
  3631. EnqueueLink(dll='libptloader.dll', opts=['ADVAPI', 'NSPR'], obj=[
  3632. 'ptloader_config_ptloader.obj',
  3633. 'ptloader_loaderFileTypePandatool.obj',
  3634. 'libfltegg.lib',
  3635. 'libflt.lib',
  3636. 'liblwoegg.lib',
  3637. 'liblwo.lib',
  3638. 'libdxfegg.lib',
  3639. 'libdxf.lib',
  3640. 'libvrmlegg.lib',
  3641. 'libpvrml.lib',
  3642. 'libxfileegg.lib',
  3643. 'libxfile.lib',
  3644. 'libconverter.lib',
  3645. 'libpandatoolbase.lib',
  3646. 'libeggbase.lib',
  3647. 'libprogbase.lib',
  3648. 'libpandaegg.dll',
  3649. 'libpanda.dll',
  3650. 'libpandaexpress.dll',
  3651. 'libdtoolconfig.dll',
  3652. 'libdtool.dll',
  3653. ])
  3654. #
  3655. # DIRECTORY: pandatool/src/mayaprogs/
  3656. #
  3657. for VER in MAYAVERSIONS:
  3658. if (OMIT.count('MAYA'+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3659. IPATH=['pandatool/src/mayaprogs', 'pandatool/src/maya', 'pandatool/src/mayaegg',
  3660. 'pandatool/src/cvscopy']
  3661. OPTS=['BUILDING_MISC', 'MAYA'+VER, 'NSPR']
  3662. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaEggImport.cxx', obj='mayaeggimport'+VER+'_mayaeggimport.obj')
  3663. EnqueueLink(opts=OPTS, dll='mayaeggimport'+VER+'.mll', obj=[
  3664. 'mayaegg'+VER+'_loader.obj',
  3665. 'mayaeggimport'+VER+'_mayaeggimport.obj',
  3666. 'libpandaegg.dll',
  3667. 'libpanda.dll',
  3668. 'libpandaexpress.dll',
  3669. 'libdtoolconfig.dll',
  3670. 'libdtool.dll',
  3671. 'libpystub.dll'
  3672. ])
  3673. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_mayaloader.cxx', obj='mayaloader'+VER+'_config_mayaloader.obj')
  3674. EnqueueLink(dll='libmayaloader'+VER+'.dll', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3675. 'mayaloader'+VER+'_config_mayaloader.obj',
  3676. 'libmayaegg'+VER+'.lib',
  3677. 'libptloader.lib',
  3678. 'libconverter.lib',
  3679. 'libpandatoolbase.lib',
  3680. 'libmaya'+VER+'.lib',
  3681. 'libfltegg.lib',
  3682. 'libflt.lib',
  3683. 'liblwoegg.lib',
  3684. 'liblwo.lib',
  3685. 'libdxfegg.lib',
  3686. 'libdxf.lib',
  3687. 'libvrmlegg.lib',
  3688. 'libpvrml.lib',
  3689. 'libxfileegg.lib',
  3690. 'libxfile.lib',
  3691. 'libeggbase.lib',
  3692. 'libprogbase.lib',
  3693. 'libpandaegg.dll',
  3694. 'libpanda.dll',
  3695. 'libpandaexpress.dll',
  3696. 'libdtoolconfig.dll',
  3697. 'libdtool.dll',
  3698. ])
  3699. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaPview.cxx', obj='mayapview'+VER+'_mayaPview.obj')
  3700. EnqueueLink(dll='libmayapview'+VER+'.mll', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3701. 'mayapview'+VER+'_mayaPview.obj',
  3702. 'libmayaegg'+VER+'.lib',
  3703. 'libmaya'+VER+'.lib',
  3704. 'libconverter.lib',
  3705. 'libpandatoolbase.lib',
  3706. 'libpandaegg.dll',
  3707. 'libframework.dll',
  3708. 'libpanda.dll',
  3709. 'libpandaexpress.dll',
  3710. 'libdtoolconfig.dll',
  3711. 'libdtool.dll',
  3712. 'libpystub.dll',
  3713. ])
  3714. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaToEgg.cxx', obj='maya2egg'+VER+'_mayaToEgg.obj')
  3715. EnqueueLink(dll='maya2egg'+VER+'.exe', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3716. 'maya2egg'+VER+'_mayaToEgg.obj',
  3717. 'libmayaegg'+VER+'.lib',
  3718. 'libmaya'+VER+'.lib',
  3719. 'libeggbase.lib',
  3720. 'libprogbase.lib',
  3721. 'libconverter.lib',
  3722. 'libpandatoolbase.lib',
  3723. 'libpandaegg.dll',
  3724. 'libpanda.dll',
  3725. 'libpandaexpress.dll',
  3726. 'libdtoolconfig.dll',
  3727. 'libdtool.dll',
  3728. 'libpystub.dll',
  3729. ])
  3730. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaCopy.cxx', obj='mayacopy'+VER+'_mayaCopy.obj')
  3731. EnqueueLink(dll='mayacopy'+VER+'.exe', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3732. 'mayacopy'+VER+'_mayaCopy.obj',
  3733. 'libcvscopy.lib',
  3734. 'libmaya'+VER+'.lib',
  3735. 'libprogbase.lib',
  3736. 'libpandatoolbase.lib',
  3737. 'libconverter.lib',
  3738. 'libpandaegg.dll',
  3739. 'libpanda.dll',
  3740. 'libpandaexpress.dll',
  3741. 'libdtoolconfig.dll',
  3742. 'libdtool.dll',
  3743. 'libpystub.dll',
  3744. ])
  3745. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaSavePview.cxx', obj='mayasavepview'+VER+'_mayaSavePview.obj')
  3746. EnqueueLink(dll='libmayasavepview'+VER+'.mll', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3747. 'mayasavepview'+VER+'_mayaSavePview.obj',
  3748. ])
  3749. #
  3750. # DIRECTORY: pandatool/src/miscprogs/
  3751. #
  3752. if (OMIT.count("PANDATOOL")==0):
  3753. IPATH=['pandatool/src/miscprogs']
  3754. OPTS=['NSPR']
  3755. CopyAllHeaders('pandatool/src/miscprogs')
  3756. EnqueueCxx(ipath=IPATH, opts=OPTS, src='binToC.cxx', obj='bin2c_binToC.obj')
  3757. EnqueueLink(dll='bin2c.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3758. 'bin2c_binToC.obj',
  3759. 'libprogbase.lib',
  3760. 'libpandatoolbase.lib',
  3761. 'libpanda.dll',
  3762. 'libpandaexpress.dll',
  3763. 'libdtoolconfig.dll',
  3764. 'libdtool.dll',
  3765. 'libpystub.dll',
  3766. ])
  3767. #
  3768. # DIRECTORY: pandatool/src/pstatserver/
  3769. #
  3770. if (OMIT.count("NSPR")==0) and (OMIT.count("PANDATOOL")==0):
  3771. IPATH=['pandatool/src/pstatserver']
  3772. OPTS=['NSPR']
  3773. CopyAllHeaders('pandatool/src/pstatserver')
  3774. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pstatserver_composite1.cxx', obj='pstatserver_composite1.obj')
  3775. EnqueueLib(lib='libpstatserver.lib', obj=[ 'pstatserver_composite1.obj' ])
  3776. #
  3777. # DIRECTORY: pandatool/src/softprogs/
  3778. #
  3779. if (OMIT.count("PANDATOOL")==0):
  3780. IPATH=['pandatool/src/softprogs']
  3781. OPTS=['NSPR']
  3782. CopyAllHeaders('pandatool/src/softprogs')
  3783. EnqueueCxx(ipath=IPATH, opts=OPTS, src='softCVS.cxx', obj='softcvs_softCVS.obj')
  3784. EnqueueCxx(ipath=IPATH, opts=OPTS, src='softFilename.cxx', obj='softcvs_softFilename.obj')
  3785. EnqueueLink(opts=['ADVAPI', 'NSPR'], dll='softcvs.exe', obj=[
  3786. 'softcvs_softCVS.obj',
  3787. 'softcvs_softFilename.obj',
  3788. 'libprogbase.lib',
  3789. 'libpandatoolbase.lib',
  3790. 'libpandaegg.dll',
  3791. 'libpanda.dll',
  3792. 'libpandaexpress.dll',
  3793. 'libdtoolconfig.dll',
  3794. 'libdtool.dll',
  3795. 'libpystub.dll',
  3796. ])
  3797. #
  3798. # DIRECTORY: pandatool/src/text-stats/
  3799. #
  3800. if (OMIT.count("NSPR")==0) and (OMIT.count("PANDATOOL")==0):
  3801. IPATH=['pandatool/src/text-stats']
  3802. OPTS=['NSPR']
  3803. CopyAllHeaders('pandatool/src/text-stats')
  3804. EnqueueCxx(ipath=IPATH, opts=OPTS, src='textMonitor.cxx', obj='text-stats_textMonitor.obj')
  3805. EnqueueCxx(ipath=IPATH, opts=OPTS, src='textStats.cxx', obj='text-stats_textStats.obj')
  3806. EnqueueLink(opts=['ADVAPI', 'NSPR'], dll='text-stats.exe', obj=[
  3807. 'text-stats_textMonitor.obj',
  3808. 'text-stats_textStats.obj',
  3809. 'libprogbase.lib',
  3810. 'libpstatserver.lib',
  3811. 'libpandatoolbase.lib',
  3812. 'libpandaegg.dll',
  3813. 'libpanda.dll',
  3814. 'libpandaexpress.dll',
  3815. 'libdtoolconfig.dll',
  3816. 'libdtool.dll',
  3817. 'libpystub.dll',
  3818. ])
  3819. #
  3820. # DIRECTORY: pandatool/src/vrmlprogs/
  3821. #
  3822. if (OMIT.count("PANDATOOL")==0):
  3823. IPATH=['pandatool/src/vrmlprogs', 'pandatool/src/vrml', 'pandatool/src/vrmlegg']
  3824. OPTS=['NSPR']
  3825. CopyAllHeaders('pandatool/src/vrmlprogs')
  3826. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlTrans.cxx', obj='vrml-trans_vrmlTrans.obj')
  3827. EnqueueLink(opts=['ADVAPI', 'NSPR'], dll='vrml-trans.exe', obj=[
  3828. 'vrml-trans_vrmlTrans.obj',
  3829. 'libprogbase.lib',
  3830. 'libpvrml.lib',
  3831. 'libpandatoolbase.lib',
  3832. 'libpanda.dll',
  3833. 'libpandaexpress.dll',
  3834. 'libdtoolconfig.dll',
  3835. 'libdtool.dll',
  3836. 'libpystub.dll',
  3837. ])
  3838. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlToEgg.cxx', obj='vrml2egg_vrmlToEgg.obj')
  3839. EnqueueLink(opts=['ADVAPI', 'NSPR'], dll='vrml2egg.exe', obj=[
  3840. 'vrml2egg_vrmlToEgg.obj',
  3841. 'libvrmlegg.lib',
  3842. 'libpvrml.lib',
  3843. 'libeggbase.lib',
  3844. 'libprogbase.lib',
  3845. 'libpandatoolbase.lib',
  3846. 'libconverter.lib',
  3847. 'libpandaegg.dll',
  3848. 'libpanda.dll',
  3849. 'libpandaexpress.dll',
  3850. 'libdtoolconfig.dll',
  3851. 'libdtool.dll',
  3852. 'libpystub.dll',
  3853. ])
  3854. #
  3855. # DIRECTORY: pandatool/src/win-stats/
  3856. #
  3857. if (OMIT.count("NSPR")==0) and (OMIT.count("PANDATOOL")==0) and (sys.platform == "win32"):
  3858. IPATH=['pandatool/src/win-stats']
  3859. OPTS=['NSPR']
  3860. CopyAllHeaders('pandatool/src/win-stats')
  3861. EnqueueCxx(ipath=IPATH, opts=OPTS, src='winstats_composite1.cxx', obj='pstats_composite1.obj')
  3862. EnqueueLink(opts=['WINSOCK', 'WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NSPR'],
  3863. dll='pstats.exe', obj=[
  3864. 'pstats_composite1.obj',
  3865. 'libprogbase.lib',
  3866. 'libpstatserver.lib',
  3867. 'libpandatoolbase.lib',
  3868. 'libpandaexpress.dll',
  3869. 'libpanda.dll',
  3870. 'libdtoolconfig.dll',
  3871. 'libdtool.dll',
  3872. 'libpystub.dll',
  3873. ])
  3874. #
  3875. # DIRECTORY: pandatool/src/xfileprogs/
  3876. #
  3877. if (OMIT.count("PANDATOOL")==0):
  3878. IPATH=['pandatool/src/xfileprogs', 'pandatool/src/xfile', 'pandatool/src/xfileegg']
  3879. OPTS=['NSPR']
  3880. CopyAllHeaders('pandatool/src/xfileprogs')
  3881. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToX.cxx', obj='egg2x_eggToX.obj')
  3882. EnqueueLink(dll='egg2x.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3883. 'egg2x_eggToX.obj',
  3884. 'libxfileegg.lib',
  3885. 'libxfile.lib',
  3886. 'libeggbase.lib',
  3887. 'libprogbase.lib',
  3888. 'libpandatoolbase.lib',
  3889. 'libconverter.lib',
  3890. 'libpandaegg.dll',
  3891. 'libpanda.dll',
  3892. 'libpandaexpress.dll',
  3893. 'libdtoolconfig.dll',
  3894. 'libdtool.dll',
  3895. 'libpystub.dll',
  3896. ])
  3897. EnqueueCxx(ipath=IPATH, opts=OPTS, src='xFileTrans.cxx', obj='x-trans_xFileTrans.obj')
  3898. EnqueueLink(dll='x-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3899. 'x-trans_xFileTrans.obj',
  3900. 'libprogbase.lib',
  3901. 'libxfile.lib',
  3902. 'libpandatoolbase.lib',
  3903. 'libpanda.dll',
  3904. 'libpandaexpress.dll',
  3905. 'libdtoolconfig.dll',
  3906. 'libdtool.dll',
  3907. 'libpystub.dll',
  3908. ])
  3909. EnqueueCxx(ipath=IPATH, opts=OPTS, src='xFileToEgg.cxx', obj='x2egg_xFileToEgg.obj')
  3910. EnqueueLink(opts=['ADVAPI', 'NSPR'], dll='x2egg.exe', obj=[
  3911. 'x2egg_xFileToEgg.obj',
  3912. 'libxfileegg.lib',
  3913. 'libxfile.lib',
  3914. 'libconverter.lib',
  3915. 'libeggbase.lib',
  3916. 'libprogbase.lib',
  3917. 'libpandatoolbase.lib',
  3918. 'libpandaegg.dll',
  3919. 'libpanda.dll',
  3920. 'libpandaexpress.dll',
  3921. 'libdtoolconfig.dll',
  3922. 'libdtool.dll',
  3923. 'libpystub.dll',
  3924. ])
  3925. #
  3926. # DIRECTORY: pandaapp/src/pandaappbase/
  3927. #
  3928. if (OMIT.count("PANDAAPP")==0):
  3929. IPATH=['pandaapp/src/pandaappbase']
  3930. OPTS=['NSPR']
  3931. CopyAllHeaders('pandaapp/src/pandaappbase')
  3932. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaappbase.cxx', obj='pandaappbase_pandaappbase.obj')
  3933. EnqueueLib(lib='libpandaappbase.lib', obj=['pandaappbase_pandaappbase.obj'])
  3934. #
  3935. # DIRECTORY: pandaapp/src/httpbackup/
  3936. #
  3937. if (OMIT.count("OPENSSL")==0) and (OMIT.count("PANDAAPP")==0):
  3938. IPATH=['pandaapp/src/httpbackup', 'pandaapp/src/pandaappbase']
  3939. OPTS=['OPENSSL', 'NSPR']
  3940. CopyAllHeaders('pandaapp/src/httpbackup')
  3941. EnqueueCxx(ipath=IPATH, opts=OPTS, src='backupCatalog.cxx', obj='httpbackup_backupCatalog.obj')
  3942. EnqueueCxx(ipath=IPATH, opts=OPTS, src='httpBackup.cxx', obj='httpbackup_httpBackup.obj')
  3943. EnqueueLink(opts=['ADVAPI', 'NSPR', 'OPENSSL'], dll='httpbackup.exe', obj=[
  3944. 'httpbackup_backupCatalog.obj',
  3945. 'httpbackup_httpBackup.obj',
  3946. 'libpandaappbase.lib',
  3947. 'libpandaexpress.dll',
  3948. 'libpanda.dll',
  3949. 'libdtool.dll',
  3950. 'libdtoolconfig.dll',
  3951. 'libprogbase.lib',
  3952. 'libpandatoolbase.lib',
  3953. 'libpystub.dll',
  3954. ])
  3955. #
  3956. # DIRECTORY: pandaapp/src/indexify/
  3957. #
  3958. if (OMIT.count("FREETYPE")==0) and (OMIT.count("PANDAAPP")==0):
  3959. IPATH=['pandaapp/src/indexify']
  3960. OPTS=['NSPR', 'FREETYPE']
  3961. CopyAllHeaders('pandaapp/src/indexify')
  3962. EnqueueCxx(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='font-samples_default_font.obj')
  3963. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fontSamples.cxx', obj='font-samples_fontSamples.obj')
  3964. EnqueueLink(opts=['ADVAPI', 'NSPR', 'FREETYPE'], dll='font-samples.exe', obj=[
  3965. 'font-samples_default_font.obj',
  3966. 'font-samples_fontSamples.obj',
  3967. 'libpanda.dll',
  3968. 'libpandaexpress.dll',
  3969. 'libdtool.dll',
  3970. 'libdtoolconfig.dll',
  3971. 'libprogbase.lib',
  3972. 'libpandatoolbase.lib',
  3973. 'libpystub.dll',
  3974. ])
  3975. EnqueueCxx(ipath=IPATH, opts=OPTS, src='default_index_icons.cxx', obj='indexify_default_index_icons.obj')
  3976. EnqueueCxx(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='indexify_default_font.obj')
  3977. EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexImage.cxx', obj='indexify_indexImage.obj')
  3978. EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexParameters.cxx', obj='indexify_indexParameters.obj')
  3979. EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexify.cxx', obj='indexify_indexify.obj')
  3980. EnqueueCxx(ipath=IPATH, opts=OPTS, src='photo.cxx', obj='indexify_photo.obj')
  3981. EnqueueCxx(ipath=IPATH, opts=OPTS, src='rollDirectory.cxx', obj='indexify_rollDirectory.obj')
  3982. EnqueueLink(opts=['ADVAPI', 'NSPR', 'FREETYPE'], dll='indexify.exe', obj=[
  3983. 'indexify_default_index_icons.obj',
  3984. 'indexify_default_font.obj',
  3985. 'indexify_indexImage.obj',
  3986. 'indexify_indexParameters.obj',
  3987. 'indexify_indexify.obj',
  3988. 'indexify_photo.obj',
  3989. 'indexify_rollDirectory.obj',
  3990. 'libpanda.dll',
  3991. 'libpandaexpress.dll',
  3992. 'libdtool.dll',
  3993. 'libdtoolconfig.dll',
  3994. 'libprogbase.lib',
  3995. 'libpandatoolbase.lib',
  3996. 'libpystub.dll',
  3997. ])
  3998. #
  3999. # DIRECTORY: pandaapp/src/stitchbase/
  4000. #
  4001. if (OMIT.count("PANDAAPP")==0):
  4002. IPATH=['pandaapp/src/stitchbase', 'pandaapp/src/pandaappbase']
  4003. OPTS=['NSPR']
  4004. CopyAllHeaders('pandaapp/src/stitchbase')
  4005. EnqueueBison(ipath=IPATH, opts=OPTS, pre='stitchyy', src='stitchParser.yxx', dsth='stitchParser.h', obj='stitchbase_stitchParser.obj')
  4006. EnqueueFlex(ipath=IPATH, opts=OPTS, pre='stitchyy', src='stitchLexer.lxx', obj='stitchbase_stitchLexer.obj', dashi=1)
  4007. EnqueueCxx(ipath=IPATH, opts=OPTS, src='stitchbase_composite1.cxx', obj='stitchbase_composite1.obj')
  4008. EnqueueCxx(ipath=IPATH, opts=OPTS, src='stitchbase_composite2.cxx', obj='stitchbase_composite2.obj')
  4009. EnqueueLib(lib='libstitchbase.lib', obj=[
  4010. 'stitchbase_composite1.obj',
  4011. 'stitchbase_composite2.obj',
  4012. 'stitchbase_stitchParser.obj',
  4013. 'stitchbase_stitchLexer.obj',
  4014. ])
  4015. #
  4016. # DIRECTORY: pandaapp/src/stitch/
  4017. #
  4018. if (OMIT.count("PANDAAPP")==0):
  4019. IPATH=['pandaapp/src/stitch', 'pandaapp/src/stitchbase', 'pandaapp/src/pandaappbase']
  4020. OPTS=['NSPR']
  4021. CopyAllHeaders('pandaapp/src/stitch')
  4022. EnqueueCxx(ipath=IPATH, opts=OPTS, src='stitchCommandProgram.cxx', obj='stitch-command_stitchCommandProgram.obj')
  4023. EnqueueLink(opts=['ADVAPI', 'NSPR', 'FFTW'], dll='stitch-command.exe', obj=[
  4024. 'stitch-command_stitchCommandProgram.obj',
  4025. 'libstitchbase.lib',
  4026. 'libpandaappbase.lib',
  4027. 'libpanda.dll',
  4028. 'libpandaexpress.dll',
  4029. 'libdtoolconfig.dll',
  4030. 'libdtool.dll',
  4031. 'libprogbase.lib',
  4032. 'libpandatoolbase.lib',
  4033. 'libconverter.lib',
  4034. 'libpystub.dll',
  4035. ])
  4036. EnqueueCxx(ipath=IPATH, opts=OPTS, src='stitchImageProgram.cxx', obj='stitch-image_stitchImageProgram.obj')
  4037. EnqueueLink(opts=['ADVAPI', 'NSPR', 'FFTW'], dll='stitch-image.exe', obj=[
  4038. 'stitch-image_stitchImageProgram.obj',
  4039. 'libstitchbase.lib',
  4040. 'libpandaappbase.lib',
  4041. 'libpanda.dll',
  4042. 'libpandaexpress.dll',
  4043. 'libdtoolconfig.dll',
  4044. 'libdtool.dll',
  4045. 'libprogbase.lib',
  4046. 'libpandatoolbase.lib',
  4047. 'libconverter.lib',
  4048. 'libpystub.dll',
  4049. ])
  4050. #
  4051. # Generate the models directory
  4052. #
  4053. if (OMIT.count("PANDATOOL")==0):
  4054. EnqueueBam("-pr ../=", "built/models/gui/dialog_box_gui.bam", "dmodels/src/gui/dialog_box_gui.flt")
  4055. EnqueueBam("-pr ../=", "built/models/misc/camera.bam", "dmodels/src/misc/camera.flt")
  4056. EnqueueBam("-pr ../=", "built/models/misc/fade.bam", "dmodels/src/misc/fade.flt")
  4057. EnqueueBam("-pr ../=", "built/models/misc/fade_sphere.bam", "dmodels/src/misc/fade_sphere.flt")
  4058. EnqueueBam("-pr ../=", "built/models/misc/gridBack.bam", "dmodels/src/misc/gridBack.flt")
  4059. EnqueueBam("-pr ../=", "built/models/misc/iris.bam", "dmodels/src/misc/iris.flt")
  4060. EnqueueBam("-pr ../=", "built/models/misc/lilsmiley.bam", "dmodels/src/misc/lilsmiley.egg")
  4061. EnqueueBam("-pr ../=", "built/models/misc/objectHandles.bam", "dmodels/src/misc/objectHandles.flt")
  4062. EnqueueBam("-pr ../=", "built/models/misc/rgbCube.bam", "dmodels/src/misc/rgbCube.flt")
  4063. EnqueueBam("-pr ../=", "built/models/misc/smiley.bam", "dmodels/src/misc/smiley.egg")
  4064. EnqueueBam("-pr ../=", "built/models/misc/sphere.bam", "dmodels/src/misc/sphere.flt")
  4065. EnqueueBam("-pr ../=", "built/models/misc/Pointlight.bam", "dmodels/src/misc/Pointlight.egg")
  4066. EnqueueBam("-pr ../=", "built/models/misc/Dirlight.bam", "dmodels/src/misc/Dirlight.egg")
  4067. EnqueueBam("-pr ../=", "built/models/misc/Spotlight.bam", "dmodels/src/misc/Spotlight.egg")
  4068. EnqueueBam("-pr ../=", "built/models/misc/xyzAxis.bam", "dmodels/src/misc/xyzAxis.flt")
  4069. CopyAllFiles("built/models/audio/sfx/", "dmodels/src/audio/sfx/", ".wav")
  4070. CopyAllFiles("built/models/icons/", "dmodels/src/icons/", ".gif")
  4071. CopyAllFiles("built/models/", "models/", ".egg")
  4072. CopyAllFiles("built/models/", "models/", ".bam")
  4073. CopyAllFiles("built/models/maps/", "models/maps/", ".jpg")
  4074. CopyAllFiles("built/models/maps/", "models/maps/", ".png")
  4075. CopyAllFiles("built/models/maps/", "models/maps/", ".rgb")
  4076. CopyAllFiles("built/models/maps/", "models/maps/", ".rgba")
  4077. CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".jpg")
  4078. CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".png")
  4079. CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".rgb")
  4080. CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".rgba")
  4081. #
  4082. # egg2bam on the greeting card directory
  4083. #
  4084. if (INSTALLER):
  4085. CopyFile("built/tmp/GreetingCard/", "samples/GreetingCard/GreetingCard.py")
  4086. CopyFile("built/tmp/GreetingCard/sound/", "samples/GreetingCard/sound/soundtrack.mp3")
  4087. CopyAllFiles("built/tmp/GreetingCard/models/", "samples/GreetingCard/models/", ".jpg")
  4088. EnqueueBam("-ps strip", "built/tmp/GreetingCard/models/thankyou_card.bam", "samples/GreetingCard/models/thankyou_card.egg")
  4089. EnqueueBam("-ps strip", "built/tmp/GreetingCard/models/thankyou_anim.bam", "samples/GreetingCard/models/thankyou_anim.egg")
  4090. ##########################################################################################
  4091. #
  4092. # Dependency-Based Distributed Build System.
  4093. #
  4094. ##########################################################################################
  4095. if (SLAVEBUILD!=0):
  4096. for task in DEPENDENCYQUEUE:
  4097. targets=task[2]
  4098. if (targets.count(SLAVEBUILD)):
  4099. apply(task[0], task[1])
  4100. sys.exit(0)
  4101. def BuildWorker(taskqueue, donequeue, slave):
  4102. print "Slave online: "+slave
  4103. while (1):
  4104. task = taskqueue.get()
  4105. sys.stdout.flush()
  4106. if (task == 0): return
  4107. if (slave=="local"):
  4108. apply(task[0],task[1])
  4109. else:
  4110. targetzero = task[2][0]
  4111. oscmd(slave.replace("OPTIONS","--slavebuild "+targetzero))
  4112. donequeue.put(task)
  4113. def AllSourcesReady(task, pending):
  4114. sources = task[3]
  4115. for x in sources:
  4116. if (pending.has_key(x)):
  4117. return 0
  4118. altsources = task[4]
  4119. for x in altsources:
  4120. if (pending.has_key(x)):
  4121. return 0
  4122. return 1
  4123. def ParallelMake(tasklist):
  4124. # Read the slave-file.
  4125. slaves = []
  4126. if (SLAVEFILE!=0):
  4127. try:
  4128. slavefile = open(SLAVEFILE, "r")
  4129. for line in slavefile:
  4130. line = line.strip(" \t\r\n")
  4131. if (line != ""): slaves.append(line)
  4132. except: exit("Could not read slave-file")
  4133. else:
  4134. for i in range(THREADCOUNT):
  4135. slaves.append("local")
  4136. # create the communication queues.
  4137. donequeue=Queue.Queue()
  4138. taskqueue=Queue.Queue()
  4139. # build up a table listing all the pending targets
  4140. pending = {}
  4141. for task in tasklist:
  4142. for target in task[2]:
  4143. pending[target] = 1
  4144. # create the workers
  4145. for slave in slaves:
  4146. th = threading.Thread(target=BuildWorker, args=[taskqueue,donequeue,slave])
  4147. th.setDaemon(1)
  4148. th.start()
  4149. # feed tasks to the workers.
  4150. tasksqueued = 0
  4151. while (1):
  4152. if (tasksqueued < len(slaves)*2):
  4153. extras = []
  4154. for task in tasklist:
  4155. if (tasksqueued < len(slaves)*3) & (AllSourcesReady(task, pending)):
  4156. if (older(task[2], task[3])):
  4157. tasksqueued += 1
  4158. taskqueue.put(task)
  4159. else:
  4160. for target in task[2]:
  4161. del pending[target]
  4162. else:
  4163. extras.append(task)
  4164. tasklist = extras
  4165. sys.stdout.flush()
  4166. if (tasksqueued == 0): break
  4167. donetask = donequeue.get()
  4168. sys.stdout.flush()
  4169. tasksqueued -= 1
  4170. for target in donetask[2]:
  4171. updatefiledate(target)
  4172. del pending[target]
  4173. # kill the workers.
  4174. for slave in slaves:
  4175. taskqueue.put(0)
  4176. # make sure there aren't any unsatisfied tasks
  4177. if (len(tasklist)>0):
  4178. exit("Dependency problem - task unsatisfied: "+str(tasklist[0][2]))
  4179. def SequentialMake(tasklist):
  4180. for task in tasklist:
  4181. if (older(task[2], task[3])):
  4182. apply(task[0], task[1])
  4183. for target in task[2]:
  4184. updatefiledate(target)
  4185. def RunDependencyQueue(tasklist):
  4186. if (SLAVEFILE!=0) or (THREADCOUNT!=0):
  4187. ParallelMake(tasklist)
  4188. else:
  4189. SequentialMake(tasklist)
  4190. RunDependencyQueue(DEPENDENCYQUEUE)
  4191. ##########################################################################################
  4192. #
  4193. # Copy Sounds, Icons, and Models into the build.
  4194. #
  4195. ##########################################################################################
  4196. ##########################################################################################
  4197. #
  4198. # Run genpycode
  4199. #
  4200. ##########################################################################################
  4201. if (OMIT.count("PYTHON")==0):
  4202. allin = os.listdir("built/pandac/input")
  4203. if (older(['built/pandac/PandaModules.py'],xpaths("built/pandac/input/",allin,""))):
  4204. if (GENMAN): oscmd("built/bin/genpycode -d")
  4205. else : oscmd("built/bin/genpycode")
  4206. updatefiledate('built/pandac/PandaModules.py')
  4207. ########################################################################
  4208. ##
  4209. ## Save the CXX include-cache for next time.
  4210. ##
  4211. ########################################################################
  4212. try: icache = open(iCachePath,'wb')
  4213. except: icache = 0
  4214. if (icache!=0):
  4215. cPickle.dump(CXXINCLUDECACHE, icache, 1)
  4216. icache.close()
  4217. ##########################################################################################
  4218. #
  4219. # The Installers
  4220. #
  4221. # Under windows, we can build an 'exe' package using NSIS
  4222. # Under linux, we can build an 'deb' package using dpkg-deb
  4223. # Makepanda does not build RPMs. To do that, use 'rpm -tb' on the source tarball.
  4224. #
  4225. ##########################################################################################
  4226. def MakeInstallerNSIS(file,fullname,smdirectory,installdir):
  4227. print "Building "+fullname+" installer. This can take up to an hour."
  4228. if (COMPRESSOR != "lzma"):
  4229. print("Note: you are using zlib, which is faster, but lzma gives better compression.")
  4230. if (os.path.exists(file)):
  4231. os.remove(file)
  4232. if (os.path.exists("nsis-output.exe")):
  4233. os.remove("nsis-output.exe")
  4234. psource=os.path.abspath(".")
  4235. panda=os.path.abspath("built")
  4236. cmd="thirdparty/win-nsis/makensis /V2 "
  4237. cmd=cmd+'/DCOMPRESSOR="'+COMPRESSOR+'" '
  4238. cmd=cmd+'/DNAME="'+fullname+'" '
  4239. cmd=cmd+'/DSMDIRECTORY="'+smdirectory+'" '
  4240. cmd=cmd+'/DINSTALLDIR="'+installdir+'" '
  4241. cmd=cmd+'/DOUTFILE="'+psource+'\\nsis-output.exe" '
  4242. cmd=cmd+'/DLICENSE="'+panda+'\\LICENSE" '
  4243. cmd=cmd+'/DLANGUAGE="Panda3DEnglish" '
  4244. cmd=cmd+'/DRUNTEXT="Run the Panda Greeting Card" '
  4245. cmd=cmd+'/DIBITMAP="panda-install.bmp" '
  4246. cmd=cmd+'/DUBITMAP="panda-uninstall.bmp" '
  4247. cmd=cmd+'/DPANDA="'+panda+'" '
  4248. cmd=cmd+'/DPSOURCE="'+psource+'" '
  4249. cmd=cmd+'/DPYEXTRAS="'+psource+'\\thirdparty\\win-extras" '
  4250. cmd=cmd+'"'+psource+'\\direct\\src\\directscripts\\packpanda.nsi"'
  4251. oscmd( cmd)
  4252. os.rename("nsis-output.exe", file)
  4253. def MakeInstallerDPKG(file):
  4254. DEB="""
  4255. Package: panda3d
  4256. Version: VERSION
  4257. Section: libdevel
  4258. Priority: optional
  4259. Architecture: i386
  4260. Essential: no
  4261. Depends: PYTHONV
  4262. Provides: panda3d
  4263. Maintainer: [email protected]
  4264. Description: The panda3D free 3D engine
  4265. """
  4266. import compileall
  4267. PYTHONV=os.path.basename(PYTHONSDK)
  4268. if (os.path.isdir("debtmp")): oscmd( "chmod -R 755 debtmp")
  4269. oscmd("rm -rf debtmp data.tar.gz control.tar.gz ")
  4270. oscmd("mkdir -p debtmp/usr/bin")
  4271. oscmd("mkdir -p debtmp/usr/include")
  4272. oscmd("mkdir -p debtmp/usr/share/panda3d")
  4273. oscmd("mkdir -p debtmp/usr/lib/"+PYTHONV+"/lib-dynload")
  4274. oscmd("mkdir -p debtmp/usr/lib/"+PYTHONV+"/site-packages")
  4275. oscmd("mkdir -p debtmp/etc")
  4276. oscmd("mkdir -p debtmp/DEBIAN")
  4277. oscmd("sed -e 's@$THIS_PRC_DIR/[.][.]@/usr/share/panda3d@' < built/etc/Config.prc > debtmp/etc/Config.prc")
  4278. oscmd("cp built/etc/Confauto.prc debtmp/etc/Confauto.prc")
  4279. oscmd("cp --recursive built/include debtmp/usr/include/panda3d")
  4280. oscmd("cp --recursive direct debtmp/usr/share/panda3d/direct")
  4281. oscmd("cp --recursive built/pandac debtmp/usr/share/panda3d/pandac")
  4282. oscmd("cp --recursive built/Pmw debtmp/usr/share/panda3d/Pmw")
  4283. oscmd("cp built/direct/__init__.py debtmp/usr/share/panda3d/direct/__init__.py")
  4284. oscmd("cp --recursive SceneEditor debtmp/usr/share/panda3d/SceneEditor")
  4285. oscmd("cp --recursive built/models debtmp/usr/share/panda3d/models")
  4286. oscmd("cp --recursive samples debtmp/usr/share/panda3d/samples")
  4287. oscmd("cp doc/LICENSE debtmp/usr/share/panda3d/LICENSE")
  4288. oscmd("cp doc/LICENSE debtmp/usr/include/panda3d/LICENSE")
  4289. oscmd("cp doc/ReleaseNotes debtmp/usr/share/panda3d/ReleaseNotes")
  4290. oscmd("echo '/usr/share/panda3d' > debtmp/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth")
  4291. oscmd("cp built/bin/* debtmp/usr/bin/")
  4292. for base in os.listdir("built/lib"):
  4293. oscmd("ln -sf /usr/lib/"+base+" debtmp/usr/lib/"+PYTHONV+"/lib-dynload/"+base)
  4294. oscmd("cp built/lib/"+base+" debtmp/usr/lib/"+base)
  4295. for base in os.listdir("debtmp/usr/share/panda3d/direct/src"):
  4296. if ((base != "extensions") and (base != "extensions_native")):
  4297. compileall.compile_dir("debtmp/usr/share/panda3d/direct/src/"+base)
  4298. compileall.compile_dir("debtmp/usr/share/panda3d/Pmw")
  4299. compileall.compile_dir("debtmp/usr/share/panda3d/SceneEditor")
  4300. oscmd("chmod -R 555 debtmp/usr/share/panda3d")
  4301. oscmd("cd debtmp ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums")
  4302. oscmd("cd debtmp ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums")
  4303. WriteFile("debtmp/DEBIAN/conffiles","/etc/Config.prc\n")
  4304. WriteFile("debtmp/DEBIAN/control",DEB[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV))
  4305. oscmd("dpkg-deb -b debtmp "+file)
  4306. oscmd("chmod -R 755 debtmp")
  4307. oscmd("rm -rf debtmp")
  4308. if (INSTALLER != 0):
  4309. if (sys.platform == "win32"):
  4310. MakeInstallerNSIS("Panda3D-"+VERSION+".exe", "Panda3D", "Panda3D "+VERSION, "C:\\Panda3D-"+VERSION)
  4311. elif (sys.platform == "linux2") and (os.path.isfile("/usr/bin/dpkg-deb")):
  4312. MakeInstallerDPKG("panda3d_"+VERSION+"_i386.deb")
  4313. else:
  4314. exit("Do not know how to make an installer for this platform")
  4315. ##########################################################################################
  4316. #
  4317. # Print final status report.
  4318. #
  4319. ##########################################################################################
  4320. WARNINGS.append("Elapsed Time: "+PrettyTime(time.time() - STARTTIME))
  4321. #WARNINGS.append("Time(EnqueueCxx): "+PrettyTime(TIMECOMPILEC))
  4322. #WARNINGS.append("Time(CompileLib): "+PrettyTime(TIMECOMPILELIB))
  4323. #WARNINGS.append("Time(EnqueueLink): "+PrettyTime(TIMECOMPILELINK))
  4324. #WARNINGS.append("Time(EnqueueIgate): "+PrettyTime(TIMEINTERROGATE))
  4325. #WARNINGS.append("Time(EnqueueImod): "+PrettyTime(TIMEINTERROGATEMODULE))
  4326. printStatus("Makepanda Final Status Report", WARNINGS)