makepanda.py 190 KB

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