makepanda.py 185 KB

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