makepanda.py 192 KB

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