makepanda.py 185 KB

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