makepanda.py 187 KB

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