makepanda.py 192 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851
  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/mesadisplay/
  2711. #
  2712. if (sys.platform != "win32"):
  2713. IPATH=['panda/src/mesadisplay', 'panda/src/glstuff']
  2714. OPTS=['BUILDING_PANDAGLUT', 'NSPR', 'GLUT']
  2715. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mesadisplay_composite.cxx', obj='mesadisplay_composite.obj')
  2716. IPATH=['panda/metalibs/pandagl']
  2717. EnqueueLink(opts=['GLUT', 'NSPR'], dll='libpandamesa.dll', obj=[
  2718. 'mesadisplay_composite.obj',
  2719. 'libpanda.dll',
  2720. 'libpandaexpress.dll',
  2721. 'libglstuff.dll',
  2722. 'libpandafx.dll',
  2723. 'libdtoolconfig.dll',
  2724. 'libdtool.dll',
  2725. ])
  2726. #
  2727. # DIRECTORY: panda/src/glxdisplay/
  2728. #
  2729. if (sys.platform != "win32"):
  2730. IPATH=['panda/src/glxdisplay']
  2731. OPTS=['BUILDING_PANDAGLUT', 'NSPR', 'GLUT', 'NVIDIACG', 'CGGL']
  2732. EnqueueCxx(ipath=IPATH, opts=OPTS, src='glxdisplay_composite.cxx', obj='glxdisplay_composite.obj')
  2733. IPATH=['panda/metalibs/pandagl']
  2734. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandagl.cxx', obj='pandagl_pandagl.obj')
  2735. EnqueueLink(opts=['GLUT', 'NVIDIACG', 'CGGL', 'NSPR'], dll='libpandagl.dll', obj=[
  2736. 'pandagl_pandagl.obj',
  2737. 'glgsg_config_glgsg.obj',
  2738. 'glgsg_glgsg.obj',
  2739. 'glxdisplay_composite.obj',
  2740. 'libpanda.dll',
  2741. 'libpandaexpress.dll',
  2742. 'libglstuff.dll',
  2743. 'libpandafx.dll',
  2744. 'libdtoolconfig.dll',
  2745. 'libdtool.dll',
  2746. ])
  2747. #
  2748. # DIRECTORY: panda/src/wgldisplay/
  2749. #
  2750. if (sys.platform == "win32"):
  2751. IPATH=['panda/src/wgldisplay', 'panda/src/glstuff']
  2752. OPTS=['BUILDING_PANDAGL', 'NSPR', 'NVIDIACG', 'CGGL']
  2753. EnqueueCxx(ipath=IPATH, opts=OPTS, src='wgldisplay_composite.cxx', obj='wgldisplay_composite.obj')
  2754. IPATH=['panda/metalibs/pandagl']
  2755. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandagl.cxx', obj='pandagl_pandagl.obj')
  2756. EnqueueLink(opts=['WINGDI', 'GLUT', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NSPR', 'NVIDIACG', 'CGGL'],
  2757. dll='libpandagl.dll', obj=[
  2758. 'pandagl_pandagl.obj',
  2759. 'glgsg_config_glgsg.obj',
  2760. 'glgsg_glgsg.obj',
  2761. 'wgldisplay_composite.obj',
  2762. 'libwindisplay.dll',
  2763. 'libpanda.dll',
  2764. 'libpandaexpress.dll',
  2765. 'libglstuff.dll',
  2766. 'libpandafx.dll',
  2767. 'libdtoolconfig.dll',
  2768. 'libdtool.dll',
  2769. ])
  2770. #
  2771. # DIRECTORY: panda/src/physics/
  2772. #
  2773. IPATH=['panda/src/physics']
  2774. OPTS=['BUILDING_PANDAPHYSICS', 'NSPR']
  2775. # CopyAllHeaders('panda/src/physics')
  2776. EnqueueCxx(ipath=IPATH, opts=OPTS, src='physics_composite.cxx', obj='physics_composite.obj')
  2777. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libphysics.in', obj='libphysics_igate.obj',
  2778. src='panda/src/physics', module='pandaphysics', library='libphysics',
  2779. skip=["forces.h"], also=["physics_composite.cxx"])
  2780. #
  2781. # DIRECTORY: panda/src/particlesystem/
  2782. #
  2783. IPATH=['panda/src/particlesystem']
  2784. OPTS=['BUILDING_PANDAPHYSICS', 'NSPR']
  2785. # CopyAllHeaders('panda/src/particlesystem')
  2786. EnqueueCxx(ipath=IPATH, opts=OPTS, src='particlesystem_composite.cxx', obj='particlesystem_composite.obj')
  2787. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libparticlesystem.in', obj='libparticlesystem_igate.obj',
  2788. src='panda/src/particlesystem', module='pandaphysics', library='libparticlesystem',
  2789. skip=['orientedParticle.h', 'orientedParticleFactory.h', 'particlefactories.h', 'emitters.h', 'particles.h'],
  2790. also=["particlesystem_composite.cxx"])
  2791. #
  2792. # DIRECTORY: panda/metalibs/pandaphysics/
  2793. #
  2794. IPATH=['panda/metalibs/pandaphysics']
  2795. # CopyAllHeaders('panda/metalibs/pandaphysics')
  2796. OPTS=['BUILDING_PANDAPHYSICS', 'NSPR']
  2797. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaphysics.cxx', obj='pandaphysics_pandaphysics.obj')
  2798. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandaphysics_module.obj',
  2799. module='pandaphysics', library='libpandaphysics',
  2800. files=['libphysics.in', 'libparticlesystem.in'])
  2801. EnqueueLink(dll='libpandaphysics.dll', opts=['ADVAPI', 'NSPR'], obj=[
  2802. 'pandaphysics_pandaphysics.obj',
  2803. 'libpandaphysics_module.obj',
  2804. 'physics_composite.obj',
  2805. 'libphysics_igate.obj',
  2806. 'particlesystem_composite.obj',
  2807. 'libparticlesystem_igate.obj',
  2808. 'libpanda.dll',
  2809. 'libpandaexpress.dll',
  2810. 'libdtoolconfig.dll',
  2811. 'libdtool.dll',
  2812. ])
  2813. #
  2814. # DIRECTORY: panda/src/testbed/
  2815. #
  2816. IPATH=['panda/src/testbed']
  2817. OPTS=['NSPR']
  2818. # CopyAllHeaders('panda/src/testbed')
  2819. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pview.cxx', obj='pview_pview.obj')
  2820. EnqueueLink(dll='pview.exe', opts=['ADVAPI', 'NSPR'], obj=[
  2821. 'pview_pview.obj',
  2822. 'libframework.dll',
  2823. 'libpanda.dll',
  2824. 'libpandafx.dll',
  2825. 'libpandaexpress.dll',
  2826. 'libdtoolconfig.dll',
  2827. 'libdtool.dll',
  2828. 'libpystub.dll',
  2829. ])
  2830. #
  2831. # DIRECTORY: direct/src/directbase/
  2832. #
  2833. if (OMIT.count("PYTHON")==0):
  2834. IPATH=['direct/src/directbase']
  2835. OPTS=['BUILDING_DIRECT', 'NSPR']
  2836. # CopyAllHeaders('direct/src/directbase')
  2837. EnqueueCxx(ipath=IPATH, opts=OPTS, src='directbase.cxx', obj='directbase_directbase.obj')
  2838. if (sys.platform != "win32"):
  2839. EnqueueCxx(ipath=IPATH, opts=['BUILDING_PPYTHON'], src='ppython.cxx', obj='ppython.obj')
  2840. EnqueueLink(opts=['WINUSER'], dll='ppython.exe', obj=['ppython.obj'])
  2841. EnqueueCxx(ipath=IPATH, opts=['BUILDING_GENPYCODE'], src='ppython.cxx', obj='genpycode.obj')
  2842. EnqueueLink(opts=['WINUSER'], dll='genpycode.exe', obj=['genpycode.obj'])
  2843. EnqueueCxx(ipath=IPATH, opts=['BUILDING_PACKPANDA'], src='ppython.cxx', obj='packpanda.obj')
  2844. EnqueueLink(opts=['WINUSER'], dll='packpanda.exe', obj=['packpanda.obj'])
  2845. #
  2846. # DIRECTORY: direct/src/dcparser/
  2847. #
  2848. if (OMIT.count("PYTHON")==0):
  2849. IPATH=['direct/src/dcparser']
  2850. OPTS=['WITHINPANDA', 'BUILDING_DIRECT', 'NSPR']
  2851. # CopyAllHeaders('direct/src/dcparser')
  2852. EnqueueBison(ipath=IPATH, opts=OPTS, pre='dcyy', src='dcParser.yxx', dsth='dcParser.h', obj='dcparser_dcParser.obj')
  2853. EnqueueFlex(ipath=IPATH, opts=OPTS, pre='dcyy', src='dcLexer.lxx', obj='dcparser_dcLexer.obj', dashi=0)
  2854. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dcparser_composite.cxx', obj='dcparser_composite.obj')
  2855. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdcparser.in', obj='libdcparser_igate.obj',
  2856. src='direct/src/dcparser', module='direct', library='libdcparser',
  2857. skip=['dcmsgtypes.h'],
  2858. also=["dcparser_composite.cxx"])
  2859. #
  2860. # DIRECTORY: direct/src/deadrec/
  2861. #
  2862. if (OMIT.count("PYTHON")==0):
  2863. IPATH=['direct/src/deadrec']
  2864. OPTS=['BUILDING_DIRECT', 'NSPR']
  2865. # CopyAllHeaders('direct/src/deadrec')
  2866. EnqueueCxx(ipath=IPATH, opts=OPTS, src='deadrec_composite.cxx', obj='deadrec_composite.obj')
  2867. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdeadrec.in', obj='libdeadrec_igate.obj',
  2868. src='direct/src/deadrec', module='direct', library='libdeadrec',
  2869. skip=[], also=["deadrec_composite.cxx"])
  2870. #
  2871. # DIRECTORY: direct/src/distributed/
  2872. #
  2873. if (OMIT.count("PYTHON")==0):
  2874. IPATH=['direct/src/distributed', 'direct/src/dcparser']
  2875. OPTS=['WITHINPANDA', 'BUILDING_DIRECT', 'OPENSSL', 'NSPR']
  2876. # CopyAllHeaders('direct/src/distributed')
  2877. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_distributed.cxx', obj='distributed_config_distributed.obj')
  2878. EnqueueCxx(ipath=IPATH, opts=OPTS, src='cConnectionRepository.cxx', obj='distributed_cConnectionRepository.obj')
  2879. EnqueueCxx(ipath=IPATH, opts=OPTS, src='cDistributedSmoothNodeBase.cxx', obj='distributed_cDistributedSmoothNodeBase.obj')
  2880. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdistributed.in', obj='libdistributed_igate.obj',
  2881. src='direct/src/distributed', module='direct', library='libdistributed',
  2882. skip=[], also=['config_distributed.cxx', 'cConnectionRepository.cxx', 'cDistributedSmoothNodeBase.cxx'])
  2883. #
  2884. # DIRECTORY: direct/src/interval/
  2885. #
  2886. if (OMIT.count("PYTHON")==0):
  2887. IPATH=['direct/src/interval']
  2888. OPTS=['BUILDING_DIRECT', 'NSPR']
  2889. # CopyAllHeaders('direct/src/interval')
  2890. EnqueueCxx(ipath=IPATH, opts=OPTS, src='interval_composite.cxx', obj='interval_composite.obj')
  2891. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libinterval.in', obj='libinterval_igate.obj',
  2892. src='direct/src/interval', module='direct', library='libinterval',
  2893. skip=[], also=["interval_composite.cxx"])
  2894. #
  2895. # DIRECTORY: direct/src/showbase/
  2896. #
  2897. if (OMIT.count("PYTHON")==0):
  2898. IPATH=['direct/src/showbase']
  2899. OPTS=['BUILDING_DIRECT', 'NSPR']
  2900. # CopyAllHeaders('direct/src/showbase')
  2901. EnqueueCxx(ipath=IPATH, opts=OPTS, src='showBase.cxx', obj='showbase_showBase.obj')
  2902. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libshowbase.in', obj='libshowbase_igate.obj',
  2903. src='direct/src/showbase', module='direct', library='libshowbase',
  2904. skip=[], also=["showBase.cxx"])
  2905. #
  2906. # DIRECTORY: direct/metalibs/direct/
  2907. #
  2908. if (OMIT.count("PYTHON")==0):
  2909. IPATH=['direct/metalibs/direct']
  2910. OPTS=['BUILDING_DIRECT', 'NSPR']
  2911. # CopyAllHeaders('direct/metalibs/direct')
  2912. EnqueueCxx(ipath=IPATH, opts=OPTS, src='direct.cxx', obj='direct_direct.obj')
  2913. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libdirect_module.obj',
  2914. module='direct', library='libdirect',
  2915. files=['libdcparser.in', 'libshowbase.in', 'libdeadrec.in', 'libinterval.in', 'libdistributed.in'])
  2916. EnqueueLink(dll='libdirect.dll', opts=['ADVAPI', 'NSPR', 'OPENSSL'], obj=[
  2917. 'direct_direct.obj',
  2918. 'libdirect_module.obj',
  2919. 'directbase_directbase.obj',
  2920. 'dcparser_composite.obj',
  2921. 'dcparser_dcParser.obj',
  2922. 'dcparser_dcLexer.obj',
  2923. 'libdcparser_igate.obj',
  2924. 'showbase_showBase.obj',
  2925. 'libshowbase_igate.obj',
  2926. 'deadrec_composite.obj',
  2927. 'libdeadrec_igate.obj',
  2928. 'interval_composite.obj',
  2929. 'libinterval_igate.obj',
  2930. 'distributed_config_distributed.obj',
  2931. 'distributed_cConnectionRepository.obj',
  2932. 'distributed_cDistributedSmoothNodeBase.obj',
  2933. 'libdistributed_igate.obj',
  2934. 'libpanda.dll',
  2935. 'libpandaexpress.dll',
  2936. 'libdtoolconfig.dll',
  2937. 'libdtool.dll',
  2938. ])
  2939. #
  2940. # DIRECTORY: direct/src/dcparse/
  2941. #
  2942. if (OMIT.count("PYTHON")==0):
  2943. IPATH=['direct/src/dcparse', 'direct/src/dcparser']
  2944. OPTS=['WITHINPANDA', 'NSPR']
  2945. # CopyAllHeaders('direct/src/dcparse')
  2946. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dcparse.cxx', obj='dcparse_dcparse.obj')
  2947. EnqueueLink(dll='dcparse.exe', opts=['ADVAPI', 'NSPR'], obj=[
  2948. 'dcparse_dcparse.obj',
  2949. 'libdirect.dll',
  2950. 'libpandaexpress.dll',
  2951. 'libdtoolconfig.dll',
  2952. 'libdtool.dll',
  2953. 'libpystub.dll',
  2954. ])
  2955. #
  2956. # DIRECTORY: direct/src/heapq/
  2957. #
  2958. if (OMIT.count("PYTHON")==0):
  2959. IPATH=['direct/src/heapq']
  2960. OPTS=['NSPR']
  2961. # CopyAllHeaders('direct/src/heapq')
  2962. EnqueueCxx(ipath=IPATH, opts=OPTS, src='heapq.cxx', obj='heapq_heapq.obj')
  2963. EnqueueLink(dll='libheapq.dll', opts=['ADVAPI', 'NSPR'], obj=[
  2964. 'heapq_heapq.obj',
  2965. 'libpandaexpress.dll',
  2966. 'libdtoolconfig.dll',
  2967. 'libdtool.dll',
  2968. ])
  2969. #
  2970. # DIRECTORY: pandatool/src/pandatoolbase/
  2971. #
  2972. if (OMIT.count("PANDATOOL")==0):
  2973. IPATH=['pandatool/src/pandatoolbase']
  2974. OPTS=['NSPR']
  2975. # CopyAllHeaders('pandatool/src/pandatoolbase')
  2976. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandatoolbase_composite1.cxx', obj='pandatoolbase_composite1.obj')
  2977. EnqueueLib(lib='libpandatoolbase.lib', obj=['pandatoolbase_composite1.obj'])
  2978. #
  2979. # DIRECTORY: pandatool/src/converter/
  2980. #
  2981. if (OMIT.count("PANDATOOL")==0):
  2982. IPATH=['pandatool/src/converter']
  2983. OPTS=['NSPR']
  2984. # CopyAllHeaders('pandatool/src/converter')
  2985. EnqueueCxx(ipath=IPATH, opts=OPTS, src='somethingToEggConverter.cxx', obj='converter_somethingToEggConverter.obj')
  2986. EnqueueLib(lib='libconverter.lib', obj=['converter_somethingToEggConverter.obj'])
  2987. #
  2988. # DIRECTORY: pandatool/src/progbase/
  2989. #
  2990. if (OMIT.count("PANDATOOL")==0):
  2991. IPATH=['pandatool/src/progbase']
  2992. OPTS=['NSPR', 'ZLIB']
  2993. # CopyAllHeaders('pandatool/src/progbase')
  2994. EnqueueCxx(ipath=IPATH, opts=OPTS, src='progbase_composite1.cxx', obj='progbase_composite1.obj')
  2995. EnqueueLib(lib='libprogbase.lib', obj=['progbase_composite1.obj'])
  2996. #
  2997. # DIRECTORY: pandatool/src/eggbase/
  2998. #
  2999. if (OMIT.count("PANDATOOL")==0):
  3000. IPATH=['pandatool/src/eggbase']
  3001. OPTS=['NSPR']
  3002. # CopyAllHeaders('pandatool/src/eggbase')
  3003. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggbase_composite1.cxx', obj='eggbase_composite1.obj')
  3004. EnqueueLib(lib='libeggbase.lib', obj=['eggbase_composite1.obj'])
  3005. #
  3006. # DIRECTORY: pandatool/src/bam/
  3007. #
  3008. if (OMIT.count("PANDATOOL")==0):
  3009. IPATH=['pandatool/src/bam']
  3010. OPTS=['NSPR']
  3011. # CopyAllHeaders('pandatool/src/bam')
  3012. EnqueueCxx(ipath=IPATH, opts=OPTS, src='bamInfo.cxx', obj='bam-info_bamInfo.obj')
  3013. EnqueueLink(dll='bam-info.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3014. 'bam-info_bamInfo.obj',
  3015. 'libprogbase.lib',
  3016. 'libpandatoolbase.lib',
  3017. 'libpandaegg.dll',
  3018. 'libpanda.dll',
  3019. 'libpandaexpress.dll',
  3020. 'libdtoolconfig.dll',
  3021. 'libdtool.dll',
  3022. 'libpystub.dll',
  3023. ])
  3024. EnqueueCxx(ipath=IPATH, opts=OPTS, src='bamToEgg.cxx', obj='bam2egg_bamToEgg.obj')
  3025. EnqueueLink(dll='bam2egg.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3026. 'bam2egg_bamToEgg.obj',
  3027. 'libconverter.lib',
  3028. 'libeggbase.lib',
  3029. 'libprogbase.lib',
  3030. 'libpandatoolbase.lib',
  3031. 'libpandaegg.dll',
  3032. 'libpanda.dll',
  3033. 'libpandaexpress.dll',
  3034. 'libdtoolconfig.dll',
  3035. 'libdtool.dll',
  3036. 'libpystub.dll',
  3037. ])
  3038. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToBam.cxx', obj='egg2bam_eggToBam.obj')
  3039. EnqueueLink(dll='egg2bam.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3040. 'egg2bam_eggToBam.obj',
  3041. 'libeggbase.lib',
  3042. 'libprogbase.lib',
  3043. 'libconverter.lib',
  3044. 'libpandatoolbase.lib',
  3045. 'libpandaegg.dll',
  3046. 'libpanda.dll',
  3047. 'libpandaexpress.dll',
  3048. 'libdtoolconfig.dll',
  3049. 'libdtool.dll',
  3050. 'libpystub.dll',
  3051. ])
  3052. #
  3053. # DIRECTORY: pandatool/src/cvscopy/
  3054. #
  3055. if (OMIT.count("PANDATOOL")==0):
  3056. IPATH=['pandatool/src/cvscopy']
  3057. OPTS=['NSPR']
  3058. # CopyAllHeaders('pandatool/src/cvscopy')
  3059. EnqueueCxx(ipath=IPATH, opts=OPTS, src='cvscopy_composite1.cxx', obj='cvscopy_composite1.obj')
  3060. EnqueueLib(lib='libcvscopy.lib', obj=['cvscopy_composite1.obj'])
  3061. #
  3062. # DIRECTORY: pandatool/src/dxf/
  3063. #
  3064. if (OMIT.count("PANDATOOL")==0):
  3065. IPATH=['pandatool/src/dxf']
  3066. OPTS=['NSPR']
  3067. # CopyAllHeaders('pandatool/src/dxf')
  3068. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxf_composite1.cxx', obj='dxf_composite1.obj')
  3069. EnqueueLib(lib='libdxf.lib', obj=['dxf_composite1.obj'])
  3070. #
  3071. # DIRECTORY: pandatool/src/dxfegg/
  3072. #
  3073. if (OMIT.count("PANDATOOL")==0):
  3074. IPATH=['pandatool/src/dxfegg']
  3075. OPTS=['NSPR']
  3076. # CopyAllHeaders('pandatool/src/dxfegg')
  3077. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfToEggConverter.cxx', obj='dxfegg_dxfToEggConverter.obj')
  3078. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfToEggLayer.cxx', obj='dxfegg_dxfToEggLayer.obj')
  3079. EnqueueLib(lib='libdxfegg.lib', obj=[
  3080. 'dxfegg_dxfToEggConverter.obj',
  3081. 'dxfegg_dxfToEggLayer.obj',
  3082. ])
  3083. #
  3084. # DIRECTORY: pandatool/src/dxfprogs/
  3085. #
  3086. if (OMIT.count("PANDATOOL")==0):
  3087. IPATH=['pandatool/src/dxfprogs']
  3088. OPTS=['NSPR']
  3089. # CopyAllHeaders('pandatool/src/dxfprogs')
  3090. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfPoints.cxx', obj='dxf-points_dxfPoints.obj')
  3091. EnqueueLink(dll='dxf-points.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3092. 'dxf-points_dxfPoints.obj',
  3093. 'libprogbase.lib',
  3094. 'libdxf.lib',
  3095. 'libpandatoolbase.lib',
  3096. 'libpanda.dll',
  3097. 'libpandaexpress.dll',
  3098. 'libdtoolconfig.dll',
  3099. 'libdtool.dll',
  3100. 'libpystub.dll',
  3101. ])
  3102. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfToEgg.cxx', obj='dxf2egg_dxfToEgg.obj')
  3103. EnqueueLink(dll='dxf2egg.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3104. 'dxf2egg_dxfToEgg.obj',
  3105. 'libdxfegg.lib',
  3106. 'libdxf.lib',
  3107. 'libeggbase.lib',
  3108. 'libprogbase.lib',
  3109. 'libpandatoolbase.lib',
  3110. 'libconverter.lib',
  3111. 'libpandaegg.dll',
  3112. 'libpanda.dll',
  3113. 'libpandaexpress.dll',
  3114. 'libdtoolconfig.dll',
  3115. 'libdtool.dll',
  3116. 'libpystub.dll',
  3117. ])
  3118. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToDXF.cxx', obj='egg2dxf_eggToDXF.obj')
  3119. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToDXFLayer.cxx', obj='egg2dxf_eggToDXFLayer.obj')
  3120. EnqueueLink(dll='egg2dxf.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3121. 'egg2dxf_eggToDXF.obj',
  3122. 'egg2dxf_eggToDXFLayer.obj',
  3123. 'libdxf.lib',
  3124. 'libeggbase.lib',
  3125. 'libprogbase.lib',
  3126. 'libpandatoolbase.lib',
  3127. 'libconverter.lib',
  3128. 'libpandaegg.dll',
  3129. 'libpanda.dll',
  3130. 'libpandaexpress.dll',
  3131. 'libdtoolconfig.dll',
  3132. 'libdtool.dll',
  3133. 'libpystub.dll',
  3134. ])
  3135. #
  3136. # DIRECTORY: pandatool/src/palettizer/
  3137. #
  3138. if (OMIT.count("PANDATOOL")==0):
  3139. IPATH=['pandatool/src/palettizer']
  3140. OPTS=['NSPR']
  3141. # CopyAllHeaders('pandatool/src/palettizer')
  3142. EnqueueCxx(ipath=IPATH, opts=OPTS, src='palettizer_composite1.cxx', obj='palettizer_composite1.obj')
  3143. EnqueueLib(lib='libpalettizer.lib', obj=['palettizer_composite1.obj'])
  3144. #
  3145. # DIRECTORY: pandatool/src/egg-mkfont/
  3146. #
  3147. if (OMIT.count("FREETYPE")==0) and (OMIT.count("PANDATOOL")==0):
  3148. IPATH=['pandatool/src/egg-mkfont', 'pandatool/src/palettizer']
  3149. OPTS=['NSPR', 'FREETYPE']
  3150. # CopyAllHeaders('pandatool/src/egg-mkfont')
  3151. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggMakeFont.cxx', obj='egg-mkfont_eggMakeFont.obj')
  3152. EnqueueCxx(ipath=IPATH, opts=OPTS, src='rangeDescription.cxx', obj='egg-mkfont_rangeDescription.obj')
  3153. EnqueueCxx(ipath=IPATH, opts=OPTS, src='rangeIterator.cxx', obj='egg-mkfont_rangeIterator.obj')
  3154. EnqueueLink(dll='egg-mkfont.exe', opts=['ADVAPI', 'NSPR', 'FREETYPE'], obj=[
  3155. 'egg-mkfont_eggMakeFont.obj',
  3156. 'egg-mkfont_rangeDescription.obj',
  3157. 'egg-mkfont_rangeIterator.obj',
  3158. 'libpalettizer.lib',
  3159. 'libeggbase.lib',
  3160. 'libprogbase.lib',
  3161. 'libpandatoolbase.lib',
  3162. 'libconverter.lib',
  3163. 'libpandaegg.dll',
  3164. 'libpanda.dll',
  3165. 'libpandaexpress.dll',
  3166. 'libdtoolconfig.dll',
  3167. 'libdtool.dll',
  3168. 'libpystub.dll',
  3169. ])
  3170. #
  3171. # DIRECTORY: pandatool/src/eggcharbase/
  3172. #
  3173. if (OMIT.count("PANDATOOL")==0):
  3174. IPATH=['pandatool/src/eggcharbase']
  3175. OPTS=['ZLIB', 'NSPR']
  3176. # CopyAllHeaders('pandatool/src/eggcharbase')
  3177. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggcharbase_composite1.cxx', obj='eggcharbase_composite1.obj')
  3178. EnqueueLib(lib='libeggcharbase.lib', obj=['eggcharbase_composite1.obj'])
  3179. #
  3180. # DIRECTORY: pandatool/src/egg-optchar/
  3181. #
  3182. if (OMIT.count("PANDATOOL")==0):
  3183. IPATH=['pandatool/src/egg-optchar']
  3184. OPTS=['NSPR']
  3185. # CopyAllHeaders('pandatool/src/egg-optchar')
  3186. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_egg_optchar.cxx', obj='egg-optchar_config_egg_optchar.obj')
  3187. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggOptchar.cxx', obj='egg-optchar_eggOptchar.obj')
  3188. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggOptcharUserData.cxx', obj='egg-optchar_eggOptcharUserData.obj')
  3189. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vertexMembership.cxx', obj='egg-optchar_vertexMembership.obj')
  3190. EnqueueLink(dll='egg-optchar.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3191. 'egg-optchar_config_egg_optchar.obj',
  3192. 'egg-optchar_eggOptchar.obj',
  3193. 'egg-optchar_eggOptcharUserData.obj',
  3194. 'egg-optchar_vertexMembership.obj',
  3195. 'libeggcharbase.lib',
  3196. 'libconverter.lib',
  3197. 'libeggbase.lib',
  3198. 'libprogbase.lib',
  3199. 'libpandatoolbase.lib',
  3200. 'libpandaegg.dll',
  3201. 'libpanda.dll',
  3202. 'libpandaexpress.dll',
  3203. 'libdtoolconfig.dll',
  3204. 'libdtool.dll',
  3205. 'libpystub.dll',
  3206. ])
  3207. #
  3208. # DIRECTORY: pandatool/src/egg-palettize/
  3209. #
  3210. if (OMIT.count("PANDATOOL")==0):
  3211. IPATH=['pandatool/src/egg-palettize', 'pandatool/src/palettizer']
  3212. OPTS=['NSPR']
  3213. # CopyAllHeaders('pandatool/src/egg-palettize')
  3214. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggPalettize.cxx', obj='egg-palettize_eggPalettize.obj')
  3215. EnqueueLink(dll='egg-palettize.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3216. 'egg-palettize_eggPalettize.obj',
  3217. 'libpalettizer.lib',
  3218. 'libeggbase.lib',
  3219. 'libprogbase.lib',
  3220. 'libpandatoolbase.lib',
  3221. 'libconverter.lib',
  3222. 'libpandaegg.dll',
  3223. 'libpanda.dll',
  3224. 'libpandaexpress.dll',
  3225. 'libdtoolconfig.dll',
  3226. 'libdtool.dll',
  3227. 'libpystub.dll',
  3228. ])
  3229. #
  3230. # DIRECTORY: pandatool/src/egg-qtess/
  3231. #
  3232. if (OMIT.count("PANDATOOL")==0):
  3233. IPATH=['pandatool/src/egg-qtess']
  3234. OPTS=['NSPR']
  3235. # CopyAllHeaders('pandatool/src/egg-qtess')
  3236. EnqueueCxx(ipath=IPATH, opts=OPTS, src='egg-qtess_composite1.cxx', obj='egg-qtess_composite1.obj')
  3237. EnqueueLink(dll='egg-qtess.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3238. 'egg-qtess_composite1.obj',
  3239. 'libeggbase.lib',
  3240. 'libprogbase.lib',
  3241. 'libconverter.lib',
  3242. 'libpandatoolbase.lib',
  3243. 'libpandaegg.dll',
  3244. 'libpanda.dll',
  3245. 'libpandaexpress.dll',
  3246. 'libdtoolconfig.dll',
  3247. 'libdtool.dll',
  3248. 'libpystub.dll',
  3249. ])
  3250. #
  3251. # DIRECTORY: pandatool/src/eggprogs/
  3252. #
  3253. if (OMIT.count("PANDATOOL")==0):
  3254. IPATH=['pandatool/src/eggprogs']
  3255. OPTS=['NSPR']
  3256. # CopyAllHeaders('pandatool/src/eggprogs')
  3257. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggCrop.cxx', obj='egg-crop_eggCrop.obj')
  3258. EnqueueLink(dll='egg-crop.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3259. 'egg-crop_eggCrop.obj',
  3260. 'libconverter.lib',
  3261. 'libeggbase.lib',
  3262. 'libprogbase.lib',
  3263. 'libpandatoolbase.lib',
  3264. 'libpandaegg.dll',
  3265. 'libpanda.dll',
  3266. 'libpandaexpress.dll',
  3267. 'libdtoolconfig.dll',
  3268. 'libdtool.dll',
  3269. 'libpystub.dll',
  3270. ])
  3271. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggMakeTube.cxx', obj='egg-make-tube_eggMakeTube.obj')
  3272. EnqueueLink(dll='egg-make-tube.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3273. 'egg-make-tube_eggMakeTube.obj',
  3274. 'libconverter.lib',
  3275. 'libeggbase.lib',
  3276. 'libprogbase.lib',
  3277. 'libpandatoolbase.lib',
  3278. 'libpandaegg.dll',
  3279. 'libpanda.dll',
  3280. 'libpandaexpress.dll',
  3281. 'libdtoolconfig.dll',
  3282. 'libdtool.dll',
  3283. 'libpystub.dll',
  3284. ])
  3285. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggTextureCards.cxx', obj='egg-texture-cards_eggTextureCards.obj')
  3286. EnqueueLink(dll='egg-texture-cards.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3287. 'egg-texture-cards_eggTextureCards.obj',
  3288. 'libconverter.lib',
  3289. 'libeggbase.lib',
  3290. 'libprogbase.lib',
  3291. 'libpandatoolbase.lib',
  3292. 'libpandaegg.dll',
  3293. 'libpanda.dll',
  3294. 'libpandaexpress.dll',
  3295. 'libdtoolconfig.dll',
  3296. 'libdtool.dll',
  3297. 'libpystub.dll',
  3298. ])
  3299. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggTopstrip.cxx', obj='egg-topstrip_eggTopstrip.obj')
  3300. EnqueueLink(dll='egg-topstrip.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3301. 'egg-topstrip_eggTopstrip.obj',
  3302. 'libeggcharbase.lib',
  3303. 'libconverter.lib',
  3304. 'libeggbase.lib',
  3305. 'libprogbase.lib',
  3306. 'libpandatoolbase.lib',
  3307. 'libpandaegg.dll',
  3308. 'libpanda.dll',
  3309. 'libpandaexpress.dll',
  3310. 'libdtoolconfig.dll',
  3311. 'libdtool.dll',
  3312. 'libpystub.dll',
  3313. ])
  3314. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggTrans.cxx', obj='egg-trans_eggTrans.obj')
  3315. EnqueueLink(dll='egg-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3316. 'egg-trans_eggTrans.obj',
  3317. 'libconverter.lib',
  3318. 'libeggbase.lib',
  3319. 'libprogbase.lib',
  3320. 'libpandatoolbase.lib',
  3321. 'libpandaegg.dll',
  3322. 'libpanda.dll',
  3323. 'libpandaexpress.dll',
  3324. 'libdtoolconfig.dll',
  3325. 'libdtool.dll',
  3326. 'libpystub.dll',
  3327. ])
  3328. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToC.cxx', obj='egg2c_eggToC.obj')
  3329. EnqueueLink(dll='egg2c.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3330. 'egg2c_eggToC.obj',
  3331. 'libconverter.lib',
  3332. 'libeggbase.lib',
  3333. 'libprogbase.lib',
  3334. 'libpandatoolbase.lib',
  3335. 'libpandaegg.dll',
  3336. 'libpanda.dll',
  3337. 'libpandaexpress.dll',
  3338. 'libdtoolconfig.dll',
  3339. 'libdtool.dll',
  3340. 'libpystub.dll',
  3341. ])
  3342. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggRename.cxx', obj='egg-rename_eggRename.obj')
  3343. EnqueueLink(dll='egg-rename.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3344. 'egg-rename_eggRename.obj',
  3345. 'libconverter.lib',
  3346. 'libeggbase.lib',
  3347. 'libprogbase.lib',
  3348. 'libpandatoolbase.lib',
  3349. 'libpandaegg.dll',
  3350. 'libpanda.dll',
  3351. 'libpandaexpress.dll',
  3352. 'libdtoolconfig.dll',
  3353. 'libdtool.dll',
  3354. 'libpystub.dll',
  3355. ])
  3356. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggRetargetAnim.cxx', obj='egg-retarget-anim_eggRetargetAnim.obj')
  3357. EnqueueLink(dll='egg-retarget-anim.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3358. 'egg-retarget-anim_eggRetargetAnim.obj',
  3359. 'libeggcharbase.lib',
  3360. 'libconverter.lib',
  3361. 'libeggbase.lib',
  3362. 'libprogbase.lib',
  3363. 'libpandatoolbase.lib',
  3364. 'libpandaegg.dll',
  3365. 'libpanda.dll',
  3366. 'libpandaexpress.dll',
  3367. 'libdtoolconfig.dll',
  3368. 'libdtool.dll',
  3369. 'libpystub.dll',
  3370. ])
  3371. #
  3372. # DIRECTORY: pandatool/src/flt/
  3373. #
  3374. if (OMIT.count("PANDATOOL")==0):
  3375. IPATH=['pandatool/src/flt']
  3376. OPTS=['NSPR', 'ZLIB']
  3377. # CopyAllHeaders('pandatool/src/flt')
  3378. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltVectorRecord.cxx', obj='flt_fltVectorRecord.obj')
  3379. EnqueueCxx(ipath=IPATH, opts=OPTS, src='flt_composite1.cxx', obj='flt_composite1.obj')
  3380. EnqueueLib(lib='libflt.lib', obj=['flt_fltVectorRecord.obj', 'flt_composite1.obj'])
  3381. #
  3382. # DIRECTORY: pandatool/src/fltegg/
  3383. #
  3384. if (OMIT.count("PANDATOOL")==0):
  3385. IPATH=['pandatool/src/fltegg']
  3386. OPTS=['NSPR']
  3387. # CopyAllHeaders('pandatool/src/fltegg')
  3388. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltToEggConverter.cxx', obj='fltegg_fltToEggConverter.obj')
  3389. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltToEggLevelState.cxx', obj='fltegg_fltToEggLevelState.obj')
  3390. EnqueueLib(lib='libfltegg.lib', obj=['fltegg_fltToEggConverter.obj', 'fltegg_fltToEggLevelState.obj'])
  3391. #
  3392. # DIRECTORY: pandatool/src/fltprogs/
  3393. #
  3394. if (OMIT.count("PANDATOOL")==0):
  3395. IPATH=['pandatool/src/fltprogs', 'pandatool/src/flt', 'pandatool/src/cvscopy']
  3396. OPTS=['NSPR']
  3397. # CopyAllHeaders('pandatool/src/fltprogs')
  3398. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToFlt.cxx', obj='egg2flt_eggToFlt.obj')
  3399. EnqueueLink(dll='egg2flt.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3400. 'egg2flt_eggToFlt.obj',
  3401. 'libflt.lib',
  3402. 'libeggbase.lib',
  3403. 'libprogbase.lib',
  3404. 'libconverter.lib',
  3405. 'libpandatoolbase.lib',
  3406. 'libpandaegg.dll',
  3407. 'libpanda.dll',
  3408. 'libpandaexpress.dll',
  3409. 'libdtoolconfig.dll',
  3410. 'libdtool.dll',
  3411. 'libpystub.dll',
  3412. ])
  3413. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltInfo.cxx', obj='flt-info_fltInfo.obj')
  3414. EnqueueLink(dll='flt-info.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3415. 'flt-info_fltInfo.obj',
  3416. 'libprogbase.lib',
  3417. 'libflt.lib',
  3418. 'libpandatoolbase.lib',
  3419. 'libconverter.lib',
  3420. 'libpandaegg.dll',
  3421. 'libpanda.dll',
  3422. 'libpandaexpress.dll',
  3423. 'libdtoolconfig.dll',
  3424. 'libdtool.dll',
  3425. 'libpystub.dll',
  3426. ])
  3427. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltTrans.cxx', obj='flt-trans_fltTrans.obj')
  3428. EnqueueLink(dll='flt-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3429. 'flt-trans_fltTrans.obj',
  3430. 'libprogbase.lib',
  3431. 'libflt.lib',
  3432. 'libpandatoolbase.lib',
  3433. 'libconverter.lib',
  3434. 'libpandaegg.dll',
  3435. 'libpanda.dll',
  3436. 'libpandaexpress.dll',
  3437. 'libdtoolconfig.dll',
  3438. 'libdtool.dll',
  3439. 'libpystub.dll',
  3440. ])
  3441. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltToEgg.cxx', obj='flt2egg_fltToEgg.obj')
  3442. EnqueueLink(dll='flt2egg.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3443. 'flt2egg_fltToEgg.obj',
  3444. 'libflt.lib',
  3445. 'libfltegg.lib',
  3446. 'libeggbase.lib',
  3447. 'libprogbase.lib',
  3448. 'libconverter.lib',
  3449. 'libpandatoolbase.lib',
  3450. 'libpandaegg.dll',
  3451. 'libpanda.dll',
  3452. 'libpandaexpress.dll',
  3453. 'libdtoolconfig.dll',
  3454. 'libdtool.dll',
  3455. 'libpystub.dll',
  3456. ])
  3457. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltCopy.cxx', obj='fltcopy_fltCopy.obj')
  3458. EnqueueLink(dll='fltcopy.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3459. 'fltcopy_fltCopy.obj',
  3460. 'libcvscopy.lib',
  3461. 'libflt.lib',
  3462. 'libprogbase.lib',
  3463. 'libpandatoolbase.lib',
  3464. 'libconverter.lib',
  3465. 'libpandaegg.dll',
  3466. 'libpanda.dll',
  3467. 'libpandaexpress.dll',
  3468. 'libdtoolconfig.dll',
  3469. 'libdtool.dll',
  3470. 'libpystub.dll',
  3471. ])
  3472. #
  3473. # DIRECTORY: pandatool/src/imagebase/
  3474. #
  3475. if (OMIT.count("PANDATOOL")==0):
  3476. IPATH=['pandatool/src/imagebase']
  3477. OPTS=['NSPR']
  3478. # CopyAllHeaders('pandatool/src/imagebase')
  3479. EnqueueCxx(ipath=IPATH, opts=OPTS, src='imagebase_composite1.cxx', obj='imagebase_composite1.obj')
  3480. EnqueueLib(lib='libimagebase.lib', obj=['imagebase_composite1.obj'])
  3481. #
  3482. # DIRECTORY: pandatool/src/imageprogs/
  3483. #
  3484. if (OMIT.count("PANDATOOL")==0):
  3485. IPATH=['pandatool/src/imageprogs']
  3486. OPTS=['NSPR']
  3487. # CopyAllHeaders('pandatool/src/imageprogs')
  3488. EnqueueCxx(ipath=IPATH, opts=OPTS, src='imageInfo.cxx', obj='image-info_imageInfo.obj')
  3489. EnqueueLink(dll='image-info.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3490. 'image-info_imageInfo.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='imageResize.cxx', obj='image-resize_imageResize.obj')
  3502. EnqueueLink(dll='image-resize.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3503. 'image-resize_imageResize.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. EnqueueCxx(ipath=IPATH, opts=OPTS, src='imageTrans.cxx', obj='image-trans_imageTrans.obj')
  3515. EnqueueLink(dll='image-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3516. 'image-trans_imageTrans.obj',
  3517. 'libimagebase.lib',
  3518. 'libprogbase.lib',
  3519. 'libpandatoolbase.lib',
  3520. 'libpandaegg.dll',
  3521. 'libpanda.dll',
  3522. 'libpandaexpress.dll',
  3523. 'libdtoolconfig.dll',
  3524. 'libdtool.dll',
  3525. 'libpystub.dll',
  3526. ])
  3527. #
  3528. # DIRECTORY: pandatool/src/lwo/
  3529. #
  3530. if (OMIT.count("PANDATOOL")==0):
  3531. IPATH=['pandatool/src/lwo']
  3532. OPTS=['NSPR']
  3533. # CopyAllHeaders('pandatool/src/lwo')
  3534. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwo_composite1.cxx', obj='lwo_composite1.obj')
  3535. EnqueueLib(lib='liblwo.lib', obj=['lwo_composite1.obj'])
  3536. #
  3537. # DIRECTORY: pandatool/src/lwoegg/
  3538. #
  3539. if (OMIT.count("PANDATOOL")==0):
  3540. IPATH=['pandatool/src/lwoegg']
  3541. OPTS=['NSPR']
  3542. # CopyAllHeaders('pandatool/src/lwoegg')
  3543. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwoegg_composite1.cxx', obj='lwoegg_composite1.obj')
  3544. EnqueueLib(lib='liblwoegg.lib', obj=['lwoegg_composite1.obj'])
  3545. #
  3546. # DIRECTORY: pandatool/src/lwoprogs/
  3547. #
  3548. if (OMIT.count("PANDATOOL")==0):
  3549. IPATH=['pandatool/src/lwoprogs', 'pandatool/src/lwo']
  3550. OPTS=['NSPR']
  3551. # CopyAllHeaders('pandatool/src/lwoprogs')
  3552. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwoScan.cxx', obj='lwo-scan_lwoScan.obj')
  3553. EnqueueLink(dll='lwo-scan.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3554. 'lwo-scan_lwoScan.obj',
  3555. 'liblwo.lib',
  3556. 'libprogbase.lib',
  3557. 'libpandatoolbase.lib',
  3558. 'libpandaegg.dll',
  3559. 'libpanda.dll',
  3560. 'libpandaexpress.dll',
  3561. 'libdtoolconfig.dll',
  3562. 'libdtool.dll',
  3563. 'libpystub.dll',
  3564. ])
  3565. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwoToEgg.cxx', obj='lwo2egg_lwoToEgg.obj')
  3566. EnqueueLink(dll='lwo2egg.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3567. 'lwo2egg_lwoToEgg.obj',
  3568. 'liblwo.lib',
  3569. 'liblwoegg.lib',
  3570. 'libeggbase.lib',
  3571. 'libprogbase.lib',
  3572. 'libpandatoolbase.lib',
  3573. 'libconverter.lib',
  3574. 'libpandaegg.dll',
  3575. 'libpanda.dll',
  3576. 'libpandaexpress.dll',
  3577. 'libdtoolconfig.dll',
  3578. 'libdtool.dll',
  3579. 'libpystub.dll',
  3580. ])
  3581. #
  3582. # DIRECTORY: pandatool/src/maya/
  3583. #
  3584. for VER in MAYAVERSIONS:
  3585. if (OMIT.count("MAYA"+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3586. IPATH=['pandatool/src/maya']
  3587. OPTS=['MAYA'+VER, 'NSPR']
  3588. # CopyAllHeaders('pandatool/src/maya')
  3589. EnqueueCxx(ipath=IPATH, opts=OPTS, src='maya_composite1.cxx', obj='maya'+VER+'_composite1.obj')
  3590. EnqueueLib(lib='libmaya'+VER+'.lib', obj=[ 'maya'+VER+'_composite1.obj' ])
  3591. #
  3592. # DIRECTORY: pandatool/src/mayaegg/
  3593. #
  3594. for VER in MAYAVERSIONS:
  3595. if (OMIT.count("MAYA"+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3596. IPATH=['pandatool/src/mayaegg', 'pandatool/src/maya']
  3597. OPTS=['MAYA'+VER, 'NSPR']
  3598. # CopyAllHeaders('pandatool/src/mayaegg')
  3599. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaEggLoader.cxx', obj='mayaegg'+VER+'_loader.obj')
  3600. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaegg_composite1.cxx', obj='mayaegg'+VER+'_composite1.obj')
  3601. EnqueueLib(lib='libmayaegg'+VER+'.lib', obj=[ 'mayaegg'+VER+'_composite1.obj' ])
  3602. #
  3603. # DIRECTORY: pandatool/src/maxegg/
  3604. #
  3605. for VER in MAXVERSIONS:
  3606. if (OMIT.count("MAX"+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3607. IPATH=['pandatool/src/maxegg']
  3608. OPTS=['MAX'+VER, 'NSPR', "WINCOMCTL", "WINCOMDLG", "WINUSER", "MSFORSCOPE"]
  3609. # CopyAllHeaders('pandatool/src/maxegg')
  3610. CopyFile("built/tmp/maxEgg.obj", "pandatool/src/maxegg/maxEgg.obj")
  3611. EnqueueCxx(ipath=IPATH, opts=OPTS, src='maxEggLoader.cxx',obj='maxegg'+VER+'_loader.obj')
  3612. EnqueueCxx(ipath=IPATH, opts=OPTS, src='maxegg_composite1.cxx',obj='maxegg'+VER+'_composite1.obj')
  3613. EnqueueLink(opts=OPTS, dll='maxegg'+VER+'.dlo', ldef="pandatool/src/maxegg/maxEgg.def", obj=[
  3614. 'maxegg'+VER+'_composite1.obj',
  3615. 'maxEgg.obj',
  3616. 'libeggbase.lib',
  3617. 'libprogbase.lib',
  3618. 'libpandatoolbase.lib',
  3619. 'libconverter.lib',
  3620. 'libpandaegg.dll',
  3621. 'libpanda.dll',
  3622. 'libpandaexpress.dll',
  3623. 'libdtoolconfig.dll',
  3624. 'libdtool.dll',
  3625. 'libpystub.dll'
  3626. ])
  3627. #
  3628. # DIRECTORY: pandatool/src/maxprogs/
  3629. #
  3630. for VER in MAXVERSIONS:
  3631. if (OMIT.count("MAX"+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3632. IPATH=['pandatool/src/maxprogs']
  3633. OPTS=['MAX'+VER, 'NSPR', "WINCOMCTL", "WINCOMDLG", "WINUSER", "MSFORSCOPE"]
  3634. # CopyAllHeaders('pandatool/src/maxprogs')
  3635. CopyFile("built/tmp/maxImportRes.obj", "pandatool/src/maxprogs/maxImportRes.obj")
  3636. EnqueueCxx(ipath=IPATH, opts=OPTS, src='maxEggImport.cxx',obj='maxprogs'+VER+'_maxeggimport.obj')
  3637. EnqueueLink(opts=OPTS, dll='maxeggimport'+VER+'.dle', ldef="pandatool/src/maxprogs/maxEggImport.def", obj=[
  3638. 'maxegg'+VER+'_loader.obj',
  3639. 'maxprogs'+VER+'_maxeggimport.obj',
  3640. 'maxImportRes.obj',
  3641. 'libpandaegg.dll',
  3642. 'libpanda.dll',
  3643. 'libpandaexpress.dll',
  3644. 'libdtoolconfig.dll',
  3645. 'libdtool.dll',
  3646. 'libpystub.dll'
  3647. ])
  3648. #
  3649. # DIRECTORY: pandatool/src/vrml/
  3650. #
  3651. if (OMIT.count("PANDATOOL")==0):
  3652. IPATH=['pandatool/src/vrml']
  3653. OPTS=['ZLIB', 'NSPR']
  3654. # CopyAllHeaders('pandatool/src/vrml')
  3655. EnqueueBison(ipath=IPATH, opts=OPTS, pre='vrmlyy', src='vrmlParser.yxx', dsth='vrmlParser.h', obj='pvrml_vrmlParser.obj')
  3656. EnqueueFlex(ipath=IPATH, opts=OPTS, pre='vrmlyy', src='vrmlLexer.lxx', obj='pvrml_vrmlLexer.obj', dashi=0)
  3657. EnqueueCxx(ipath=IPATH, opts=OPTS, src='parse_vrml.cxx', obj='pvrml_parse_vrml.obj')
  3658. EnqueueCxx(ipath=IPATH, opts=OPTS, src='standard_nodes.cxx', obj='pvrml_standard_nodes.obj')
  3659. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlNode.cxx', obj='pvrml_vrmlNode.obj')
  3660. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlNodeType.cxx', obj='pvrml_vrmlNodeType.obj')
  3661. EnqueueLib(lib='libpvrml.lib', obj=[
  3662. 'pvrml_parse_vrml.obj',
  3663. 'pvrml_standard_nodes.obj',
  3664. 'pvrml_vrmlNode.obj',
  3665. 'pvrml_vrmlNodeType.obj',
  3666. 'pvrml_vrmlParser.obj',
  3667. 'pvrml_vrmlLexer.obj',
  3668. ])
  3669. #
  3670. # DIRECTORY: pandatool/src/vrmlegg/
  3671. #
  3672. if (OMIT.count("PANDATOOL")==0):
  3673. IPATH=['pandatool/src/vrmlegg', 'pandatool/src/vrml']
  3674. OPTS=['NSPR']
  3675. # CopyAllHeaders('pandatool/src/vrmlegg')
  3676. EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexedFaceSet.cxx', obj='vrmlegg_indexedFaceSet.obj')
  3677. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlAppearance.cxx', obj='vrmlegg_vrmlAppearance.obj')
  3678. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlToEggConverter.cxx', obj='vrmlegg_vrmlToEggConverter.obj')
  3679. EnqueueLib(lib='libvrmlegg.lib', obj=[
  3680. 'vrmlegg_indexedFaceSet.obj',
  3681. 'vrmlegg_vrmlAppearance.obj',
  3682. 'vrmlegg_vrmlToEggConverter.obj',
  3683. ])
  3684. #
  3685. # DIRECTORY: pandatool/src/xfile/
  3686. #
  3687. if (OMIT.count("PANDATOOL")==0):
  3688. IPATH=['pandatool/src/xfile']
  3689. OPTS=['ZLIB', 'NSPR']
  3690. # CopyAllHeaders('pandatool/src/xfile')
  3691. EnqueueBison(ipath=IPATH, opts=OPTS, pre='xyy', src='xParser.yxx', dsth='xParser.h', obj='xfile_xParser.obj')
  3692. EnqueueFlex(ipath=IPATH, opts=OPTS, pre='xyy', src='xLexer.lxx', obj='xfile_xLexer.obj', dashi=1)
  3693. EnqueueCxx(ipath=IPATH, opts=OPTS, src='xfile_composite1.cxx', obj='xfile_composite1.obj')
  3694. EnqueueLib(lib='libxfile.lib', obj=[
  3695. 'xfile_composite1.obj',
  3696. 'xfile_xParser.obj',
  3697. 'xfile_xLexer.obj',
  3698. ])
  3699. #
  3700. # DIRECTORY: pandatool/src/xfileegg/
  3701. #
  3702. if (OMIT.count("PANDATOOL")==0):
  3703. IPATH=['pandatool/src/xfileegg', 'pandatool/src/xfile']
  3704. OPTS=['NSPR']
  3705. # CopyAllHeaders('pandatool/src/xfileegg')
  3706. EnqueueCxx(ipath=IPATH, opts=OPTS, src='xfileegg_composite1.cxx', obj='xfileegg_composite1.obj')
  3707. EnqueueLib(lib='libxfileegg.lib', obj=[
  3708. 'xfileegg_composite1.obj',
  3709. ])
  3710. #
  3711. # DIRECTORY: pandatool/src/ptloader/
  3712. #
  3713. if (OMIT.count("PANDATOOL")==0):
  3714. IPATH=['pandatool/src/ptloader', 'pandatool/src/flt', 'pandatool/src/lwo', 'pandatool/src/xfile', 'pandatool/src/xfileegg']
  3715. OPTS=['BUILDING_PTLOADER', 'NSPR']
  3716. # CopyAllHeaders('pandatool/src/ptloader')
  3717. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_ptloader.cxx', obj='ptloader_config_ptloader.obj')
  3718. EnqueueCxx(ipath=IPATH, opts=OPTS, src='loaderFileTypePandatool.cxx', obj='ptloader_loaderFileTypePandatool.obj')
  3719. EnqueueLink(dll='libptloader.dll', opts=['ADVAPI', 'NSPR'], obj=[
  3720. 'ptloader_config_ptloader.obj',
  3721. 'ptloader_loaderFileTypePandatool.obj',
  3722. 'libfltegg.lib',
  3723. 'libflt.lib',
  3724. 'liblwoegg.lib',
  3725. 'liblwo.lib',
  3726. 'libdxfegg.lib',
  3727. 'libdxf.lib',
  3728. 'libvrmlegg.lib',
  3729. 'libpvrml.lib',
  3730. 'libxfileegg.lib',
  3731. 'libxfile.lib',
  3732. 'libconverter.lib',
  3733. 'libpandatoolbase.lib',
  3734. 'libeggbase.lib',
  3735. 'libprogbase.lib',
  3736. 'libpandaegg.dll',
  3737. 'libpanda.dll',
  3738. 'libpandaexpress.dll',
  3739. 'libdtoolconfig.dll',
  3740. 'libdtool.dll',
  3741. ])
  3742. #
  3743. # DIRECTORY: pandatool/src/mayaprogs/
  3744. #
  3745. for VER in MAYAVERSIONS:
  3746. if (OMIT.count('MAYA'+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3747. IPATH=['pandatool/src/mayaprogs', 'pandatool/src/maya', 'pandatool/src/mayaegg',
  3748. 'pandatool/src/cvscopy']
  3749. OPTS=['BUILDING_MISC', 'MAYA'+VER, 'NSPR']
  3750. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaEggImport.cxx', obj='mayaeggimport'+VER+'_mayaeggimport.obj')
  3751. EnqueueLink(opts=OPTS, dll='mayaeggimport'+VER+'.mll', obj=[
  3752. 'mayaegg'+VER+'_loader.obj',
  3753. 'mayaeggimport'+VER+'_mayaeggimport.obj',
  3754. 'libpandaegg.dll',
  3755. 'libpanda.dll',
  3756. 'libpandaexpress.dll',
  3757. 'libdtoolconfig.dll',
  3758. 'libdtool.dll',
  3759. 'libpystub.dll'
  3760. ])
  3761. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_mayaloader.cxx', obj='mayaloader'+VER+'_config_mayaloader.obj')
  3762. EnqueueLink(dll='libmayaloader'+VER+'.dll', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3763. 'mayaloader'+VER+'_config_mayaloader.obj',
  3764. 'libmayaegg'+VER+'.lib',
  3765. 'libptloader.lib',
  3766. 'libconverter.lib',
  3767. 'libpandatoolbase.lib',
  3768. 'libmaya'+VER+'.lib',
  3769. 'libfltegg.lib',
  3770. 'libflt.lib',
  3771. 'liblwoegg.lib',
  3772. 'liblwo.lib',
  3773. 'libdxfegg.lib',
  3774. 'libdxf.lib',
  3775. 'libvrmlegg.lib',
  3776. 'libpvrml.lib',
  3777. 'libxfileegg.lib',
  3778. 'libxfile.lib',
  3779. 'libeggbase.lib',
  3780. 'libprogbase.lib',
  3781. 'libpandaegg.dll',
  3782. 'libpanda.dll',
  3783. 'libpandaexpress.dll',
  3784. 'libdtoolconfig.dll',
  3785. 'libdtool.dll',
  3786. ])
  3787. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaPview.cxx', obj='mayapview'+VER+'_mayaPview.obj')
  3788. EnqueueLink(dll='libmayapview'+VER+'.mll', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3789. 'mayapview'+VER+'_mayaPview.obj',
  3790. 'libmayaegg'+VER+'.lib',
  3791. 'libmaya'+VER+'.lib',
  3792. 'libconverter.lib',
  3793. 'libpandatoolbase.lib',
  3794. 'libpandaegg.dll',
  3795. 'libframework.dll',
  3796. 'libpanda.dll',
  3797. 'libpandaexpress.dll',
  3798. 'libdtoolconfig.dll',
  3799. 'libdtool.dll',
  3800. 'libpystub.dll',
  3801. ])
  3802. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaToEgg.cxx', obj='maya2egg'+VER+'_mayaToEgg.obj')
  3803. EnqueueLink(dll='maya2egg'+VER+'.exe', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3804. 'maya2egg'+VER+'_mayaToEgg.obj',
  3805. 'libmayaegg'+VER+'.lib',
  3806. 'libmaya'+VER+'.lib',
  3807. 'libeggbase.lib',
  3808. 'libprogbase.lib',
  3809. 'libconverter.lib',
  3810. 'libpandatoolbase.lib',
  3811. 'libpandaegg.dll',
  3812. 'libpanda.dll',
  3813. 'libpandaexpress.dll',
  3814. 'libdtoolconfig.dll',
  3815. 'libdtool.dll',
  3816. 'libpystub.dll',
  3817. ])
  3818. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaCopy.cxx', obj='mayacopy'+VER+'_mayaCopy.obj')
  3819. EnqueueLink(dll='mayacopy'+VER+'.exe', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3820. 'mayacopy'+VER+'_mayaCopy.obj',
  3821. 'libcvscopy.lib',
  3822. 'libmaya'+VER+'.lib',
  3823. 'libprogbase.lib',
  3824. 'libpandatoolbase.lib',
  3825. 'libconverter.lib',
  3826. 'libpandaegg.dll',
  3827. 'libpanda.dll',
  3828. 'libpandaexpress.dll',
  3829. 'libdtoolconfig.dll',
  3830. 'libdtool.dll',
  3831. 'libpystub.dll',
  3832. ])
  3833. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaSavePview.cxx', obj='mayasavepview'+VER+'_mayaSavePview.obj')
  3834. EnqueueLink(dll='libmayasavepview'+VER+'.mll', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3835. 'mayasavepview'+VER+'_mayaSavePview.obj',
  3836. ])
  3837. #
  3838. # DIRECTORY: pandatool/src/miscprogs/
  3839. #
  3840. if (OMIT.count("PANDATOOL")==0):
  3841. IPATH=['pandatool/src/miscprogs']
  3842. OPTS=['NSPR']
  3843. # CopyAllHeaders('pandatool/src/miscprogs')
  3844. EnqueueCxx(ipath=IPATH, opts=OPTS, src='binToC.cxx', obj='bin2c_binToC.obj')
  3845. EnqueueLink(dll='bin2c.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3846. 'bin2c_binToC.obj',
  3847. 'libprogbase.lib',
  3848. 'libpandatoolbase.lib',
  3849. 'libpanda.dll',
  3850. 'libpandaexpress.dll',
  3851. 'libdtoolconfig.dll',
  3852. 'libdtool.dll',
  3853. 'libpystub.dll',
  3854. ])
  3855. #
  3856. # DIRECTORY: pandatool/src/pstatserver/
  3857. #
  3858. if (OMIT.count("NSPR")==0) and (OMIT.count("PANDATOOL")==0):
  3859. IPATH=['pandatool/src/pstatserver']
  3860. OPTS=['NSPR']
  3861. # CopyAllHeaders('pandatool/src/pstatserver')
  3862. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pstatserver_composite1.cxx', obj='pstatserver_composite1.obj')
  3863. EnqueueLib(lib='libpstatserver.lib', obj=[ 'pstatserver_composite1.obj' ])
  3864. #
  3865. # DIRECTORY: pandatool/src/softprogs/
  3866. #
  3867. if (OMIT.count("PANDATOOL")==0):
  3868. IPATH=['pandatool/src/softprogs']
  3869. OPTS=['NSPR']
  3870. # CopyAllHeaders('pandatool/src/softprogs')
  3871. EnqueueCxx(ipath=IPATH, opts=OPTS, src='softCVS.cxx', obj='softcvs_softCVS.obj')
  3872. EnqueueCxx(ipath=IPATH, opts=OPTS, src='softFilename.cxx', obj='softcvs_softFilename.obj')
  3873. EnqueueLink(opts=['ADVAPI', 'NSPR'], dll='softcvs.exe', obj=[
  3874. 'softcvs_softCVS.obj',
  3875. 'softcvs_softFilename.obj',
  3876. 'libprogbase.lib',
  3877. 'libpandatoolbase.lib',
  3878. 'libpandaegg.dll',
  3879. 'libpanda.dll',
  3880. 'libpandaexpress.dll',
  3881. 'libdtoolconfig.dll',
  3882. 'libdtool.dll',
  3883. 'libpystub.dll',
  3884. ])
  3885. #
  3886. # DIRECTORY: pandatool/src/text-stats/
  3887. #
  3888. if (OMIT.count("NSPR")==0) and (OMIT.count("PANDATOOL")==0):
  3889. IPATH=['pandatool/src/text-stats']
  3890. OPTS=['NSPR']
  3891. # CopyAllHeaders('pandatool/src/text-stats')
  3892. EnqueueCxx(ipath=IPATH, opts=OPTS, src='textMonitor.cxx', obj='text-stats_textMonitor.obj')
  3893. EnqueueCxx(ipath=IPATH, opts=OPTS, src='textStats.cxx', obj='text-stats_textStats.obj')
  3894. EnqueueLink(opts=['ADVAPI', 'NSPR'], dll='text-stats.exe', obj=[
  3895. 'text-stats_textMonitor.obj',
  3896. 'text-stats_textStats.obj',
  3897. 'libprogbase.lib',
  3898. 'libpstatserver.lib',
  3899. 'libpandatoolbase.lib',
  3900. 'libpandaegg.dll',
  3901. 'libpanda.dll',
  3902. 'libpandaexpress.dll',
  3903. 'libdtoolconfig.dll',
  3904. 'libdtool.dll',
  3905. 'libpystub.dll',
  3906. ])
  3907. #
  3908. # DIRECTORY: pandatool/src/vrmlprogs/
  3909. #
  3910. if (OMIT.count("PANDATOOL")==0):
  3911. IPATH=['pandatool/src/vrmlprogs', 'pandatool/src/vrml', 'pandatool/src/vrmlegg']
  3912. OPTS=['NSPR']
  3913. # CopyAllHeaders('pandatool/src/vrmlprogs')
  3914. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlTrans.cxx', obj='vrml-trans_vrmlTrans.obj')
  3915. EnqueueLink(opts=['ADVAPI', 'NSPR'], dll='vrml-trans.exe', obj=[
  3916. 'vrml-trans_vrmlTrans.obj',
  3917. 'libprogbase.lib',
  3918. 'libpvrml.lib',
  3919. 'libpandatoolbase.lib',
  3920. 'libpanda.dll',
  3921. 'libpandaexpress.dll',
  3922. 'libdtoolconfig.dll',
  3923. 'libdtool.dll',
  3924. 'libpystub.dll',
  3925. ])
  3926. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlToEgg.cxx', obj='vrml2egg_vrmlToEgg.obj')
  3927. EnqueueLink(opts=['ADVAPI', 'NSPR'], dll='vrml2egg.exe', obj=[
  3928. 'vrml2egg_vrmlToEgg.obj',
  3929. 'libvrmlegg.lib',
  3930. 'libpvrml.lib',
  3931. 'libeggbase.lib',
  3932. 'libprogbase.lib',
  3933. 'libpandatoolbase.lib',
  3934. 'libconverter.lib',
  3935. 'libpandaegg.dll',
  3936. 'libpanda.dll',
  3937. 'libpandaexpress.dll',
  3938. 'libdtoolconfig.dll',
  3939. 'libdtool.dll',
  3940. 'libpystub.dll',
  3941. ])
  3942. #
  3943. # DIRECTORY: pandatool/src/win-stats/
  3944. #
  3945. if (OMIT.count("NSPR")==0) and (OMIT.count("PANDATOOL")==0) and (sys.platform == "win32"):
  3946. IPATH=['pandatool/src/win-stats']
  3947. OPTS=['NSPR']
  3948. # CopyAllHeaders('pandatool/src/win-stats')
  3949. EnqueueCxx(ipath=IPATH, opts=OPTS, src='winstats_composite1.cxx', obj='pstats_composite1.obj')
  3950. EnqueueLink(opts=['WINSOCK', 'WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NSPR'],
  3951. dll='pstats.exe', obj=[
  3952. 'pstats_composite1.obj',
  3953. 'libprogbase.lib',
  3954. 'libpstatserver.lib',
  3955. 'libpandatoolbase.lib',
  3956. 'libpandaexpress.dll',
  3957. 'libpanda.dll',
  3958. 'libdtoolconfig.dll',
  3959. 'libdtool.dll',
  3960. 'libpystub.dll',
  3961. ])
  3962. #
  3963. # DIRECTORY: pandatool/src/xfileprogs/
  3964. #
  3965. if (OMIT.count("PANDATOOL")==0):
  3966. IPATH=['pandatool/src/xfileprogs', 'pandatool/src/xfile', 'pandatool/src/xfileegg']
  3967. OPTS=['NSPR']
  3968. # CopyAllHeaders('pandatool/src/xfileprogs')
  3969. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToX.cxx', obj='egg2x_eggToX.obj')
  3970. EnqueueLink(dll='egg2x.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3971. 'egg2x_eggToX.obj',
  3972. 'libxfileegg.lib',
  3973. 'libxfile.lib',
  3974. 'libeggbase.lib',
  3975. 'libprogbase.lib',
  3976. 'libpandatoolbase.lib',
  3977. 'libconverter.lib',
  3978. 'libpandaegg.dll',
  3979. 'libpanda.dll',
  3980. 'libpandaexpress.dll',
  3981. 'libdtoolconfig.dll',
  3982. 'libdtool.dll',
  3983. 'libpystub.dll',
  3984. ])
  3985. EnqueueCxx(ipath=IPATH, opts=OPTS, src='xFileTrans.cxx', obj='x-trans_xFileTrans.obj')
  3986. EnqueueLink(dll='x-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3987. 'x-trans_xFileTrans.obj',
  3988. 'libprogbase.lib',
  3989. 'libxfile.lib',
  3990. 'libpandatoolbase.lib',
  3991. 'libpanda.dll',
  3992. 'libpandaexpress.dll',
  3993. 'libdtoolconfig.dll',
  3994. 'libdtool.dll',
  3995. 'libpystub.dll',
  3996. ])
  3997. EnqueueCxx(ipath=IPATH, opts=OPTS, src='xFileToEgg.cxx', obj='x2egg_xFileToEgg.obj')
  3998. EnqueueLink(opts=['ADVAPI', 'NSPR'], dll='x2egg.exe', obj=[
  3999. 'x2egg_xFileToEgg.obj',
  4000. 'libxfileegg.lib',
  4001. 'libxfile.lib',
  4002. 'libconverter.lib',
  4003. 'libeggbase.lib',
  4004. 'libprogbase.lib',
  4005. 'libpandatoolbase.lib',
  4006. 'libpandaegg.dll',
  4007. 'libpanda.dll',
  4008. 'libpandaexpress.dll',
  4009. 'libdtoolconfig.dll',
  4010. 'libdtool.dll',
  4011. 'libpystub.dll',
  4012. ])
  4013. #
  4014. # DIRECTORY: pandaapp/src/pandaappbase/
  4015. #
  4016. if (OMIT.count("PANDAAPP")==0):
  4017. IPATH=['pandaapp/src/pandaappbase']
  4018. OPTS=['NSPR']
  4019. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaappbase.cxx', obj='pandaappbase_pandaappbase.obj')
  4020. EnqueueLib(lib='libpandaappbase.lib', obj=['pandaappbase_pandaappbase.obj'])
  4021. #
  4022. # DIRECTORY: pandaapp/src/httpbackup/
  4023. #
  4024. if (OMIT.count("OPENSSL")==0) and (OMIT.count("PANDAAPP")==0):
  4025. IPATH=['pandaapp/src/httpbackup', 'pandaapp/src/pandaappbase']
  4026. OPTS=['OPENSSL', 'NSPR']
  4027. EnqueueCxx(ipath=IPATH, opts=OPTS, src='backupCatalog.cxx', obj='httpbackup_backupCatalog.obj')
  4028. EnqueueCxx(ipath=IPATH, opts=OPTS, src='httpBackup.cxx', obj='httpbackup_httpBackup.obj')
  4029. EnqueueLink(opts=['ADVAPI', 'NSPR', 'OPENSSL'], dll='httpbackup.exe', obj=[
  4030. 'httpbackup_backupCatalog.obj',
  4031. 'httpbackup_httpBackup.obj',
  4032. 'libpandaappbase.lib',
  4033. 'libpandaexpress.dll',
  4034. 'libpanda.dll',
  4035. 'libdtool.dll',
  4036. 'libdtoolconfig.dll',
  4037. 'libprogbase.lib',
  4038. 'libpandatoolbase.lib',
  4039. 'libpystub.dll',
  4040. ])
  4041. #
  4042. # DIRECTORY: pandaapp/src/indexify/
  4043. #
  4044. if (OMIT.count("FREETYPE")==0) and (OMIT.count("PANDAAPP")==0):
  4045. IPATH=['pandaapp/src/indexify']
  4046. OPTS=['NSPR', 'FREETYPE']
  4047. EnqueueCxx(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='font-samples_default_font.obj')
  4048. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fontSamples.cxx', obj='font-samples_fontSamples.obj')
  4049. EnqueueLink(opts=['ADVAPI', 'NSPR', 'FREETYPE'], dll='font-samples.exe', obj=[
  4050. 'font-samples_default_font.obj',
  4051. 'font-samples_fontSamples.obj',
  4052. 'libpanda.dll',
  4053. 'libpandaexpress.dll',
  4054. 'libdtool.dll',
  4055. 'libdtoolconfig.dll',
  4056. 'libprogbase.lib',
  4057. 'libpandatoolbase.lib',
  4058. 'libpystub.dll',
  4059. ])
  4060. EnqueueCxx(ipath=IPATH, opts=OPTS, src='default_index_icons.cxx', obj='indexify_default_index_icons.obj')
  4061. EnqueueCxx(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='indexify_default_font.obj')
  4062. EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexImage.cxx', obj='indexify_indexImage.obj')
  4063. EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexParameters.cxx', obj='indexify_indexParameters.obj')
  4064. EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexify.cxx', obj='indexify_indexify.obj')
  4065. EnqueueCxx(ipath=IPATH, opts=OPTS, src='photo.cxx', obj='indexify_photo.obj')
  4066. EnqueueCxx(ipath=IPATH, opts=OPTS, src='rollDirectory.cxx', obj='indexify_rollDirectory.obj')
  4067. EnqueueLink(opts=['ADVAPI', 'NSPR', 'FREETYPE'], dll='indexify.exe', obj=[
  4068. 'indexify_default_index_icons.obj',
  4069. 'indexify_default_font.obj',
  4070. 'indexify_indexImage.obj',
  4071. 'indexify_indexParameters.obj',
  4072. 'indexify_indexify.obj',
  4073. 'indexify_photo.obj',
  4074. 'indexify_rollDirectory.obj',
  4075. 'libpanda.dll',
  4076. 'libpandaexpress.dll',
  4077. 'libdtool.dll',
  4078. 'libdtoolconfig.dll',
  4079. 'libprogbase.lib',
  4080. 'libpandatoolbase.lib',
  4081. 'libpystub.dll',
  4082. ])
  4083. #
  4084. # DIRECTORY: pandaapp/src/stitchbase/
  4085. #
  4086. if (OMIT.count("PANDAAPP")==0):
  4087. IPATH=['pandaapp/src/stitchbase', 'pandaapp/src/pandaappbase']
  4088. OPTS=['NSPR']
  4089. EnqueueBison(ipath=IPATH, opts=OPTS, pre='stitchyy', src='stitchParser.yxx', dsth='stitchParser.h', obj='stitchbase_stitchParser.obj')
  4090. EnqueueFlex(ipath=IPATH, opts=OPTS, pre='stitchyy', src='stitchLexer.lxx', obj='stitchbase_stitchLexer.obj', dashi=1)
  4091. EnqueueCxx(ipath=IPATH, opts=OPTS, src='stitchbase_composite1.cxx', obj='stitchbase_composite1.obj')
  4092. EnqueueCxx(ipath=IPATH, opts=OPTS, src='stitchbase_composite2.cxx', obj='stitchbase_composite2.obj')
  4093. EnqueueLib(lib='libstitchbase.lib', obj=[
  4094. 'stitchbase_composite1.obj',
  4095. 'stitchbase_composite2.obj',
  4096. 'stitchbase_stitchParser.obj',
  4097. 'stitchbase_stitchLexer.obj',
  4098. ])
  4099. #
  4100. # DIRECTORY: pandaapp/src/stitch/
  4101. #
  4102. if (OMIT.count("PANDAAPP")==0):
  4103. IPATH=['pandaapp/src/stitch', 'pandaapp/src/stitchbase', 'pandaapp/src/pandaappbase']
  4104. OPTS=['NSPR']
  4105. EnqueueCxx(ipath=IPATH, opts=OPTS, src='stitchCommandProgram.cxx', obj='stitch-command_stitchCommandProgram.obj')
  4106. EnqueueLink(opts=['ADVAPI', 'NSPR', 'FFTW'], dll='stitch-command.exe', obj=[
  4107. 'stitch-command_stitchCommandProgram.obj',
  4108. 'libstitchbase.lib',
  4109. 'libpandaappbase.lib',
  4110. 'libpanda.dll',
  4111. 'libpandaexpress.dll',
  4112. 'libdtoolconfig.dll',
  4113. 'libdtool.dll',
  4114. 'libprogbase.lib',
  4115. 'libpandatoolbase.lib',
  4116. 'libconverter.lib',
  4117. 'libpystub.dll',
  4118. ])
  4119. EnqueueCxx(ipath=IPATH, opts=OPTS, src='stitchImageProgram.cxx', obj='stitch-image_stitchImageProgram.obj')
  4120. EnqueueLink(opts=['ADVAPI', 'NSPR', 'FFTW'], dll='stitch-image.exe', obj=[
  4121. 'stitch-image_stitchImageProgram.obj',
  4122. 'libstitchbase.lib',
  4123. 'libpandaappbase.lib',
  4124. 'libpanda.dll',
  4125. 'libpandaexpress.dll',
  4126. 'libdtoolconfig.dll',
  4127. 'libdtool.dll',
  4128. 'libprogbase.lib',
  4129. 'libpandatoolbase.lib',
  4130. 'libconverter.lib',
  4131. 'libpystub.dll',
  4132. ])
  4133. #
  4134. # Generate the models directory
  4135. #
  4136. if (OMIT.count("PANDATOOL")==0):
  4137. EnqueueBam("-pr ../=", "built/models/gui/dialog_box_gui.bam", "dmodels/src/gui/dialog_box_gui.flt")
  4138. EnqueueBam("-pr ../=", "built/models/misc/camera.bam", "dmodels/src/misc/camera.flt")
  4139. EnqueueBam("-pr ../=", "built/models/misc/fade.bam", "dmodels/src/misc/fade.flt")
  4140. EnqueueBam("-pr ../=", "built/models/misc/fade_sphere.bam", "dmodels/src/misc/fade_sphere.flt")
  4141. EnqueueBam("-pr ../=", "built/models/misc/gridBack.bam", "dmodels/src/misc/gridBack.flt")
  4142. EnqueueBam("-pr ../=", "built/models/misc/iris.bam", "dmodels/src/misc/iris.flt")
  4143. EnqueueBam("-pr ../=", "built/models/misc/lilsmiley.bam", "dmodels/src/misc/lilsmiley.egg")
  4144. EnqueueBam("-pr ../=", "built/models/misc/objectHandles.bam", "dmodels/src/misc/objectHandles.flt")
  4145. EnqueueBam("-pr ../=", "built/models/misc/rgbCube.bam", "dmodels/src/misc/rgbCube.flt")
  4146. EnqueueBam("-pr ../=", "built/models/misc/smiley.bam", "dmodels/src/misc/smiley.egg")
  4147. EnqueueBam("-pr ../=", "built/models/misc/sphere.bam", "dmodels/src/misc/sphere.flt")
  4148. EnqueueBam("-pr ../=", "built/models/misc/Pointlight.bam", "dmodels/src/misc/Pointlight.egg")
  4149. EnqueueBam("-pr ../=", "built/models/misc/Dirlight.bam", "dmodels/src/misc/Dirlight.egg")
  4150. EnqueueBam("-pr ../=", "built/models/misc/Spotlight.bam", "dmodels/src/misc/Spotlight.egg")
  4151. EnqueueBam("-pr ../=", "built/models/misc/xyzAxis.bam", "dmodels/src/misc/xyzAxis.flt")
  4152. CopyAllFiles("built/models/audio/sfx/", "dmodels/src/audio/sfx/", ".wav")
  4153. CopyAllFiles("built/models/icons/", "dmodels/src/icons/", ".gif")
  4154. CopyAllFiles("built/models/", "models/", ".egg")
  4155. CopyAllFiles("built/models/", "models/", ".bam")
  4156. CopyAllFiles("built/models/maps/", "models/maps/", ".jpg")
  4157. CopyAllFiles("built/models/maps/", "models/maps/", ".png")
  4158. CopyAllFiles("built/models/maps/", "models/maps/", ".rgb")
  4159. CopyAllFiles("built/models/maps/", "models/maps/", ".rgba")
  4160. CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".jpg")
  4161. CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".png")
  4162. CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".rgb")
  4163. CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".rgba")
  4164. ##########################################################################################
  4165. #
  4166. # Dependency-Based Distributed Build System.
  4167. #
  4168. ##########################################################################################
  4169. def BuildWorker(taskqueue, donequeue, slave):
  4170. print "Slave online: "+slave
  4171. while (1):
  4172. task = taskqueue.get()
  4173. sys.stdout.flush()
  4174. if (task == 0): return
  4175. try:
  4176. apply(task[0],task[1])
  4177. donequeue.put(task)
  4178. except:
  4179. donequeue.put(0)
  4180. def AllSourcesReady(task, pending):
  4181. sources = task[3]
  4182. for x in sources:
  4183. if (pending.has_key(x)):
  4184. return 0
  4185. altsources = task[4]
  4186. for x in altsources:
  4187. if (pending.has_key(x)):
  4188. return 0
  4189. return 1
  4190. def ParallelMake(tasklist):
  4191. # Read the slave-file.
  4192. slaves = []
  4193. for i in range(THREADCOUNT):
  4194. slaves.append("local")
  4195. # create the communication queues.
  4196. donequeue=Queue.Queue()
  4197. taskqueue=Queue.Queue()
  4198. # build up a table listing all the pending targets
  4199. pending = {}
  4200. for task in tasklist:
  4201. for target in task[2]:
  4202. pending[target] = 1
  4203. # create the workers
  4204. for slave in slaves:
  4205. th = threading.Thread(target=BuildWorker, args=[taskqueue,donequeue,slave])
  4206. th.setDaemon(1)
  4207. th.start()
  4208. # feed tasks to the workers.
  4209. tasksqueued = 0
  4210. while (1):
  4211. if (tasksqueued < len(slaves)*2):
  4212. extras = []
  4213. for task in tasklist:
  4214. if (tasksqueued < len(slaves)*3) & (AllSourcesReady(task, pending)):
  4215. if (NeedsBuild(task[2], task[3])):
  4216. tasksqueued += 1
  4217. taskqueue.put(task)
  4218. else:
  4219. for target in task[2]:
  4220. del pending[target]
  4221. else:
  4222. extras.append(task)
  4223. tasklist = extras
  4224. sys.stdout.flush()
  4225. if (tasksqueued == 0): break
  4226. donetask = donequeue.get()
  4227. if (donetask == 0):
  4228. exit("Build process aborting.")
  4229. sys.stdout.flush()
  4230. tasksqueued -= 1
  4231. JustBuilt(donetask[2], donetask[3])
  4232. for target in donetask[2]:
  4233. del pending[target]
  4234. # kill the workers.
  4235. for slave in slaves:
  4236. taskqueue.put(0)
  4237. # make sure there aren't any unsatisfied tasks
  4238. if (len(tasklist)>0):
  4239. exit("Dependency problem - task unsatisfied: "+str(tasklist[0][2]))
  4240. def SequentialMake(tasklist):
  4241. for task in tasklist:
  4242. if (NeedsBuild(task[2], task[3])):
  4243. apply(task[0], task[1])
  4244. JustBuilt(task[2], task[3])
  4245. def RunDependencyQueue(tasklist):
  4246. if (THREADCOUNT!=0):
  4247. ParallelMake(tasklist)
  4248. else:
  4249. SequentialMake(tasklist)
  4250. RunDependencyQueue(DEPENDENCYQUEUE)
  4251. ##########################################################################################
  4252. #
  4253. # Copy Sounds, Icons, and Models into the build.
  4254. #
  4255. ##########################################################################################
  4256. ##########################################################################################
  4257. #
  4258. # Run genpycode
  4259. #
  4260. ##########################################################################################
  4261. if (OMIT.count("PYTHON")==0):
  4262. allin = os.listdir("built/pandac/input")
  4263. inputs = xpaths("built/pandac/input/",allin,"")
  4264. if (NeedsBuild(['built/pandac/PandaModules.py'],inputs)):
  4265. if (GENMAN): oscmd("built/bin/genpycode -d")
  4266. else : oscmd("built/bin/genpycode")
  4267. JustBuilt(['built/pandac/PandaModules.py'],inputs)
  4268. ##########################################################################################
  4269. #
  4270. # The Installers
  4271. #
  4272. # Under windows, we can build an 'exe' package using NSIS
  4273. # Under linux, we can build an 'deb' package using dpkg-deb
  4274. # Makepanda does not build RPMs. To do that, use 'rpm -tb' on the source tarball.
  4275. #
  4276. ##########################################################################################
  4277. def MakeInstallerNSIS(file,fullname,smdirectory,installdir):
  4278. print "Building "+fullname+" installer. This can take up to an hour."
  4279. if (COMPRESSOR != "lzma"):
  4280. print("Note: you are using zlib, which is faster, but lzma gives better compression.")
  4281. if (os.path.exists(file)):
  4282. os.remove(file)
  4283. if (os.path.exists("nsis-output.exe")):
  4284. os.remove("nsis-output.exe")
  4285. psource=os.path.abspath(".")
  4286. panda=os.path.abspath("built")
  4287. cmd="thirdparty/win-nsis/makensis /V2 "
  4288. cmd=cmd+'/DCOMPRESSOR="'+COMPRESSOR+'" '
  4289. cmd=cmd+'/DNAME="'+fullname+'" '
  4290. cmd=cmd+'/DSMDIRECTORY="'+smdirectory+'" '
  4291. cmd=cmd+'/DINSTALLDIR="'+installdir+'" '
  4292. cmd=cmd+'/DOUTFILE="'+psource+'\\nsis-output.exe" '
  4293. cmd=cmd+'/DLICENSE="'+panda+'\\LICENSE" '
  4294. cmd=cmd+'/DLANGUAGE="Panda3DEnglish" '
  4295. cmd=cmd+'/DRUNTEXT="Run the Panda Greeting Card" '
  4296. cmd=cmd+'/DIBITMAP="panda-install.bmp" '
  4297. cmd=cmd+'/DUBITMAP="panda-uninstall.bmp" '
  4298. cmd=cmd+'/DPANDA="'+panda+'" '
  4299. cmd=cmd+'/DPSOURCE="'+psource+'" '
  4300. cmd=cmd+'/DPYEXTRAS="'+psource+'\\thirdparty\\win-extras" '
  4301. cmd=cmd+'"'+psource+'\\direct\\src\\directscripts\\packpanda.nsi"'
  4302. oscmd( cmd)
  4303. os.rename("nsis-output.exe", file)
  4304. def MakeInstallerDPKG(file):
  4305. DEB="""
  4306. Package: panda3d
  4307. Version: VERSION
  4308. Section: libdevel
  4309. Priority: optional
  4310. Architecture: i386
  4311. Essential: no
  4312. Depends: PYTHONV
  4313. Provides: panda3d
  4314. Maintainer: [email protected]
  4315. Description: The panda3D free 3D engine
  4316. """
  4317. import compileall
  4318. PYTHONV=os.path.basename(PYTHONSDK)
  4319. if (os.path.isdir("debtmp")): oscmd( "chmod -R 755 debtmp")
  4320. oscmd("rm -rf debtmp data.tar.gz control.tar.gz ")
  4321. oscmd("mkdir -p debtmp/usr/bin")
  4322. oscmd("mkdir -p debtmp/usr/include")
  4323. oscmd("mkdir -p debtmp/usr/share/panda3d")
  4324. oscmd("mkdir -p debtmp/usr/lib/"+PYTHONV+"/lib-dynload")
  4325. oscmd("mkdir -p debtmp/usr/lib/"+PYTHONV+"/site-packages")
  4326. oscmd("mkdir -p debtmp/etc")
  4327. oscmd("mkdir -p debtmp/DEBIAN")
  4328. oscmd("sed -e 's@$THIS_PRC_DIR/[.][.]@/usr/share/panda3d@' < built/etc/Config.prc > debtmp/etc/Config.prc")
  4329. oscmd("cp built/etc/Confauto.prc debtmp/etc/Confauto.prc")
  4330. oscmd("cp --recursive built/include debtmp/usr/include/panda3d")
  4331. oscmd("cp --recursive direct debtmp/usr/share/panda3d/direct")
  4332. oscmd("cp --recursive built/pandac debtmp/usr/share/panda3d/pandac")
  4333. oscmd("cp --recursive built/Pmw debtmp/usr/share/panda3d/Pmw")
  4334. oscmd("cp built/direct/__init__.py debtmp/usr/share/panda3d/direct/__init__.py")
  4335. oscmd("cp --recursive SceneEditor debtmp/usr/share/panda3d/SceneEditor")
  4336. oscmd("cp --recursive built/models debtmp/usr/share/panda3d/models")
  4337. oscmd("cp --recursive samples debtmp/usr/share/panda3d/samples")
  4338. oscmd("cp doc/LICENSE debtmp/usr/share/panda3d/LICENSE")
  4339. oscmd("cp doc/LICENSE debtmp/usr/include/panda3d/LICENSE")
  4340. oscmd("cp doc/ReleaseNotes debtmp/usr/share/panda3d/ReleaseNotes")
  4341. oscmd("echo '/usr/share/panda3d' > debtmp/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth")
  4342. oscmd("cp built/bin/* debtmp/usr/bin/")
  4343. for base in os.listdir("built/lib"):
  4344. oscmd("ln -sf /usr/lib/"+base+" debtmp/usr/lib/"+PYTHONV+"/lib-dynload/"+base)
  4345. oscmd("cp built/lib/"+base+" debtmp/usr/lib/"+base)
  4346. for base in os.listdir("debtmp/usr/share/panda3d/direct/src"):
  4347. if ((base != "extensions") and (base != "extensions_native")):
  4348. compileall.compile_dir("debtmp/usr/share/panda3d/direct/src/"+base)
  4349. compileall.compile_dir("debtmp/usr/share/panda3d/Pmw")
  4350. compileall.compile_dir("debtmp/usr/share/panda3d/SceneEditor")
  4351. oscmd("chmod -R 555 debtmp/usr/share/panda3d")
  4352. oscmd("cd debtmp ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums")
  4353. oscmd("cd debtmp ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums")
  4354. WriteFile("debtmp/DEBIAN/conffiles","/etc/Config.prc\n")
  4355. WriteFile("debtmp/DEBIAN/control",DEB[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV))
  4356. oscmd("dpkg-deb -b debtmp "+file)
  4357. oscmd("chmod -R 755 debtmp")
  4358. oscmd("rm -rf debtmp")
  4359. if (INSTALLER != 0):
  4360. if (sys.platform == "win32"):
  4361. MakeInstallerNSIS("Panda3D-"+VERSION+".exe", "Panda3D", "Panda3D "+VERSION, "C:\\Panda3D-"+VERSION)
  4362. elif (sys.platform == "linux2") and (os.path.isfile("/usr/bin/dpkg-deb")):
  4363. MakeInstallerDPKG("panda3d_"+VERSION+"_i386.deb")
  4364. else:
  4365. exit("Do not know how to make an installer for this platform")
  4366. ##########################################################################################
  4367. #
  4368. # Print final status report.
  4369. #
  4370. ##########################################################################################
  4371. SaveDependencyCache()
  4372. WARNINGS.append("Elapsed Time: "+PrettyTime(time.time() - STARTTIME))
  4373. #WARNINGS.append("Time(EnqueueCxx): "+PrettyTime(TIMECOMPILEC))
  4374. #WARNINGS.append("Time(CompileLib): "+PrettyTime(TIMECOMPILELIB))
  4375. #WARNINGS.append("Time(EnqueueLink): "+PrettyTime(TIMECOMPILELINK))
  4376. #WARNINGS.append("Time(EnqueueIgate): "+PrettyTime(TIMEINTERROGATE))
  4377. #WARNINGS.append("Time(EnqueueImod): "+PrettyTime(TIMEINTERROGATEMODULE))
  4378. printStatus("Makepanda Final Status Report", WARNINGS)