makepanda.py 187 KB

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