makepanda.py 185 KB

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