2
0

makepanda.py 185 KB

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