otherMakePanda.py 199 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721
  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
  15. from glob import glob
  16. #
  17. ########################################################################
  18. ##
  19. ## Utility Routines
  20. ##
  21. ## filedate(f) - returns the last modified date of the specified file.
  22. ## youngest(f1,f2...) - returns date of most recently modified file.
  23. ## older(f,f1,f2...) - return true if f is older than all the others.
  24. ## xpaths(pre,pathlist,suf) - appends prefix and suffix to every path.
  25. ##
  26. ########################################################################
  27. global FileDateCache
  28. FileDateCache = {}
  29. def filedate(path):
  30. global FileDateCache
  31. if FileDateCache.has_key(path):
  32. return FileDateCache[path]
  33. try: date = os.path.getmtime(path)
  34. except: date = 0
  35. FileDateCache[path] = date
  36. return date
  37. def updatefiledate(path):
  38. global FileDateCache
  39. try: date = os.path.getmtime(path)
  40. except: date = 0
  41. FileDateCache[path] = date
  42. def youngest(files):
  43. if type(files) == str:
  44. source = filedate(files)
  45. if (source==0):
  46. sys.exit("Error: source file not readable: "+files)
  47. return source
  48. result = 0
  49. for sfile in files:
  50. source = youngest(sfile)
  51. if (source > result): result = source
  52. return result
  53. def older(file,others):
  54. return filedate(file)<youngest(others)
  55. def xpaths(prefix,base,suffix):
  56. if type(base) == str:
  57. return prefix + base + suffix
  58. result = []
  59. for x in base:
  60. result.append(xpaths(prefix,x,suffix))
  61. return result
  62. if sys.platform == "win32":
  63. import _winreg
  64. def GetRegistryKey(path, subkey):
  65. k1=0
  66. key=0
  67. try:
  68. key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, path, 0, _winreg.KEY_READ)
  69. k1, k2 = _winreg.QueryValueEx(key, subkey)
  70. except: pass
  71. if (key!=0): _winreg.CloseKey(key)
  72. return k1
  73. def oslocalcmd(cd, cmd):
  74. if VERBOSE:
  75. if cd != ".":
  76. print "( cd "+cd+"; "+cmd+" )"
  77. else:
  78. print cmd
  79. if cd != ".":
  80. base=os.getcwd()
  81. os.chdir(cd)
  82. sys.stdout.flush()
  83. if sys.platform == "win32":
  84. exe = cmd.split()[0]
  85. if os.path.isfile(exe)==0:
  86. for i in os.environ["PATH"].split(";"):
  87. if os.path.isfile(os.path.join(i, exe)):
  88. exe = os.path.join(i, exe)
  89. break
  90. if os.path.isfile(exe)==0:
  91. sys.exit("Cannot find "+exe+" on search path")
  92. res = os.spawnl(os.P_WAIT, exe, cmd)
  93. else:
  94. res = os.system(cmd)
  95. if res != 0:
  96. if not VERBOSE:
  97. print "\n------------- Command Failed ---------------"
  98. if cd != ".":
  99. print "( cd "+cd+"; "+cmd+" )"
  100. else:
  101. print cmd
  102. print "--------------------------------------------"
  103. sys.exit(res)
  104. if cd != ".":
  105. os.chdir(base)
  106. def oscmd(cmd):
  107. oslocalcmd(".",cmd)
  108. def osmove(src,dst):
  109. """
  110. Move src file or directory to dst. dst will be removed if it
  111. exists (i.e. overwritten).
  112. """
  113. global VERBOSE
  114. if VERBOSE >= 1:
  115. print "Moving \"%s\" to \"%s\""%(src, dst)
  116. try: os.remove(dst)
  117. except OSError: pass
  118. os.rename(src, dst)
  119. def replaceInFile(srcPath, dstPath, replaceA, withB):
  120. global VERBOSE
  121. if VERBOSE >= 1:
  122. print "Replacing '%s' in \"%s\" with '%s' and writing it to \"%s\""%(
  123. replaceA, srcPath, withB, dstPath)
  124. f=file(srcPath, "rb")
  125. data=f.read()
  126. f.close()
  127. data=data.replace(replaceA, withB)
  128. f=file(dstPath, "wb")
  129. f.write(data)
  130. f.close()
  131. def buildingwhat(opts):
  132. building = 0
  133. for x in opts:
  134. if (x[:9]=="BUILDING_"): building = x[9:]
  135. return building
  136. def ReadFile(wfile):
  137. try:
  138. srchandle = open(wfile, "rb")
  139. data = srchandle.read()
  140. srchandle.close()
  141. return data
  142. except: sys.exit("Cannot read "+wfile)
  143. def WriteFile(wfile,data):
  144. try:
  145. dsthandle = open(wfile, "wb")
  146. dsthandle.write(data)
  147. dsthandle.close()
  148. except: sys.exit("Cannot write "+wfile)
  149. def prettyTime(t):
  150. t = int(t)
  151. hours = t/3600
  152. t -= hours*3600
  153. minutes = t/60
  154. t -= minutes*60
  155. seconds = t
  156. if (hours): return str(hours)+" hours "+str(minutes)+" min"
  157. if (minutes): return str(minutes)+" min "+str(seconds)+" sec"
  158. return str(seconds)+" sec"
  159. def MakeDirectory(path):
  160. if os.path.isdir(path): return 0
  161. os.mkdir(path)
  162. ########################################################################
  163. ##
  164. ## Default options:
  165. ##
  166. ## You might be tempted to change the defaults by editing them
  167. ## here. Don't do it. Instead, create a script that compiles
  168. ## panda with your preferred options.
  169. ##
  170. ########################################################################
  171. if (sys.platform == "win32"): COMPILERS=["MSVC7"]
  172. if (sys.platform == "linux2"): COMPILERS=["LINUXA"]
  173. PREFIX="built"
  174. COMPILER=COMPILERS[0]
  175. OPTIMIZE="3"
  176. INSTALLER=0
  177. GENMAN=0
  178. PPGAME=0
  179. COMPLETE=0
  180. THIRDPARTY="thirdparty"
  181. VERSION="0.0.0"
  182. VERBOSE=1
  183. COMPRESSOR="zlib"
  184. PACKAGES=["ZLIB","PNG","JPEG","TIFF","VRPN","FMOD","NVIDIACG","HELIX","NSPR",
  185. "SSL","FREETYPE","FFTW","MILES","MAYA5","MAYA6","MAYA65","MAX5","MAX6","MAX7"]
  186. OMIT=PACKAGES[:]
  187. WARNINGS=[]
  188. DIRECTXSDK = None
  189. PythonSDK = None
  190. MAYASDK = {}
  191. MAXSDK = {}
  192. MAXSDKCS = {}
  193. try:
  194. # If there is a makepandaPreferences.py, import it:
  195. from makepandaPreferences import *
  196. except ImportError:
  197. # If it's not there, no problem:
  198. pass
  199. STARTTIME=time.time()
  200. ##########################################################################################
  201. #
  202. # Read the default version number out of dtool/PandaVersion.pp
  203. #
  204. ##########################################################################################
  205. try:
  206. f = file("dtool/PandaVersion.pp","r")
  207. pattern = re.compile('^[ \t]*[#][ \t]*define[ \t]+PANDA_VERSION[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)')
  208. for line in f:
  209. match = pattern.match(line,0)
  210. if (match):
  211. VERSION = match.group(1)+"."+match.group(2)+"."+match.group(3)
  212. break
  213. f.close()
  214. except: pass
  215. ##########################################################################################
  216. #
  217. # Initialize DTOOLCONFIG based on platform (Win/Unix)
  218. #
  219. # These are the defaults for the two broad classes of operating system.
  220. # Subsequent analysis will cause these values to be tweaked.
  221. #
  222. ##########################################################################################
  223. DTOOLDEFAULTS=[
  224. #_Variable_________________________Windows___________________Unix__________
  225. ("HAVE_PYTHON", '1', '1'),
  226. ("PYTHON_FRAMEWORK", 'UNDEF', 'UNDEF'),
  227. ("COMPILE_IN_DEFAULT_FONT", '1', '1'),
  228. ("HAVE_MAYA", '1', '1'),
  229. ("MAYA_PRE_5_0", 'UNDEF', 'UNDEF'),
  230. ("HAVE_SOFTIMAGE", 'UNDEF', 'UNDEF'),
  231. ("SSL_097", 'UNDEF', 'UNDEF'),
  232. ("REPORT_OPENSSL_ERRORS", '1', '1'),
  233. ("HAVE_GL", '1', '1'),
  234. ("HAVE_MESA", 'UNDEF', 'UNDEF'),
  235. ("MESA_MGL", 'UNDEF', 'UNDEF'),
  236. ("HAVE_SGIGL", 'UNDEF', 'UNDEF'),
  237. ("HAVE_GLX", 'UNDEF', '1'),
  238. ("HAVE_WGL", '1', 'UNDEF'),
  239. ("HAVE_DX", '1', 'UNDEF'),
  240. ("HAVE_CHROMIUM", 'UNDEF', 'UNDEF'),
  241. ("HAVE_THREADS", 'UNDEF', 'UNDEF'),
  242. ("HAVE_AUDIO", '1', '1'),
  243. ("NOTIFY_DEBUG", 'UNDEF', 'UNDEF'),
  244. ("DO_PSTATS", 'UNDEF', 'UNDEF'),
  245. ("DO_COLLISION_RECORDING", 'UNDEF', 'UNDEF'),
  246. ("TRACK_IN_INTERPRETER", 'UNDEF', 'UNDEF'),
  247. ("DO_MEMORY_USAGE", 'UNDEF', 'UNDEF'),
  248. ("DO_PIPELINING", 'UNDEF', 'UNDEF'),
  249. ("EXPORT_TEMPLATES", 'yes', 'yes'),
  250. ("LINK_IN_GL", 'UNDEF', 'UNDEF'),
  251. ("LINK_IN_PHYSICS", 'UNDEF', 'UNDEF'),
  252. ("DEFAULT_PATHSEP", '";"', '":"'),
  253. ("DEFAULT_PRC_DIR", '"<auto>etc"', '"<auto>etc"'),
  254. ("PRC_DIR_ENVVARS", '"PANDA_PRC_DIR"', '"PANDA_PRC_DIR"'),
  255. ("PRC_PATH_ENVVARS", '"PANDA_PRC_PATH"', '"PANDA_PRC_PATH"'),
  256. ("PRC_PATTERNS", '"*.prc"', '"*.prc"'),
  257. ("PRC_EXECUTABLE_PATTERNS", '""', '""'),
  258. ("PRC_EXECUTABLE_ARGS_ENVVAR", '"PANDA_PRC_XARGS"', '"PANDA_PRC_XARGS"'),
  259. ("PRC_PUBLIC_KEYS_FILENAME", '""', '""'),
  260. ("PRC_RESPECT_TRUST_LEVEL", 'UNDEF', 'UNDEF'),
  261. ("PRC_SAVE_DESCRIPTIONS", '1', '1'),
  262. ("WORDS_BIGENDIAN", 'UNDEF', 'UNDEF'),
  263. ("HAVE_NAMESPACE", '1', '1'),
  264. ("HAVE_OPEN_MASK", 'UNDEF', 'UNDEF'),
  265. ("HAVE_WCHAR_T", '1', '1'),
  266. ("HAVE_WSTRING", '1', '1'),
  267. ("HAVE_TYPENAME", '1', '1'),
  268. ("SIMPLE_STRUCT_POINTERS", '1', 'UNDEF'),
  269. ("HAVE_DINKUM", 'UNDEF', 'UNDEF'),
  270. ("HAVE_STL_HASH", 'UNDEF', 'UNDEF'),
  271. ("HAVE_GETTIMEOFDAY", 'UNDEF', '1'),
  272. ("GETTIMEOFDAY_ONE_PARAM", 'UNDEF', 'UNDEF'),
  273. ("HAVE_GETOPT", 'UNDEF', '1'),
  274. ("HAVE_GETOPT_LONG_ONLY", 'UNDEF', '1'),
  275. ("HAVE_GETOPT_H", 'UNDEF', '1'),
  276. ("IOCTL_TERMINAL_WIDTH", 'UNDEF', '1'),
  277. ("HAVE_STREAMSIZE", '1', '1'),
  278. ("HAVE_IOS_TYPEDEFS", '1', '1'),
  279. ("HAVE_IOS_BINARY", '1', '1'),
  280. ("STATIC_INIT_GETENV", '1', 'UNDEF'),
  281. ("HAVE_PROC_SELF_EXE", 'UNDEF', '1'),
  282. ("HAVE_PROC_SELF_MAPS", 'UNDEF', '1'),
  283. ("HAVE_PROC_SELF_ENVIRON", 'UNDEF', '1'),
  284. ("HAVE_PROC_SELF_CMDLINE", 'UNDEF', '1'),
  285. ("HAVE_GLOBAL_ARGV", '1', 'UNDEF'),
  286. ("PROTOTYPE_GLOBAL_ARGV", 'UNDEF', 'UNDEF'),
  287. ("GLOBAL_ARGV", '__argv', 'UNDEF'),
  288. ("GLOBAL_ARGC", '__argc', 'UNDEF'),
  289. ("HAVE_IO_H", '1', 'UNDEF'),
  290. ("HAVE_IOSTREAM", '1', '1'),
  291. ("HAVE_MALLOC_H", '1', '1'),
  292. ("HAVE_SYS_MALLOC_H", 'UNDEF', 'UNDEF'),
  293. ("HAVE_ALLOCA_H", 'UNDEF', '1'),
  294. ("HAVE_LOCALE_H", 'UNDEF', '1'),
  295. ("HAVE_MINMAX_H", '1', 'UNDEF'),
  296. ("HAVE_SSTREAM", '1', '1'),
  297. ("HAVE_NEW", '1', '1'),
  298. ("HAVE_SYS_TYPES_H", '1', '1'),
  299. ("HAVE_SYS_TIME_H", 'UNDEF', '1'),
  300. ("HAVE_UNISTD_H", 'UNDEF', '1'),
  301. ("HAVE_UTIME_H", 'UNDEF', '1'),
  302. ("HAVE_GLOB_H", 'UNDEF', '1'),
  303. ("HAVE_DIRENT_H", 'UNDEF', '1'),
  304. ("HAVE_SYS_SOUNDCARD_H", 'UNDEF', '1'),
  305. ("HAVE_RTTI", '1', '1'),
  306. ("GLOBAL_OPERATOR_NEW_EXCEPTIONS", 'UNDEF', '1'),
  307. ("OLD_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'),
  308. ("GNU_STYLE_ALLOCATOR", 'UNDEF', '1'),
  309. ("VC6_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'),
  310. ("MODERN_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'),
  311. ("NO_STYLE_ALLOCATOR", '1', 'UNDEF'),
  312. ("HAVE_ZLIB", 'UNDEF', 'UNDEF'),
  313. ("HAVE_PNG", 'UNDEF', 'UNDEF'),
  314. ("HAVE_JPEG", 'UNDEF', 'UNDEF'),
  315. ("HAVE_TIFF", 'UNDEF', 'UNDEF'),
  316. ("HAVE_VRPN", 'UNDEF', 'UNDEF'),
  317. ("HAVE_FMOD", 'UNDEF', 'UNDEF'),
  318. ("HAVE_NVIDIACG", 'UNDEF', 'UNDEF'),
  319. ("HAVE_NSPR", 'UNDEF', 'UNDEF'),
  320. ("HAVE_FREETYPE", 'UNDEF', 'UNDEF'),
  321. ("HAVE_FFTW", 'UNDEF', 'UNDEF'),
  322. ("HAVE_SSL", 'UNDEF', 'UNDEF'),
  323. ("HAVE_NET", 'UNDEF', 'UNDEF'),
  324. ("HAVE_CG", 'UNDEF', 'UNDEF'),
  325. ("HAVE_CGGL", 'UNDEF', 'UNDEF'),
  326. ]
  327. DTOOLCONFIG={}
  328. if (sys.platform == "win32"):
  329. for key,win,unix in DTOOLDEFAULTS:
  330. DTOOLCONFIG[key] = win
  331. else:
  332. for key,win,unix in DTOOLDEFAULTS:
  333. DTOOLCONFIG[key] = unix
  334. ########################################################################
  335. ##
  336. ## Help with packages.
  337. ##
  338. ## Output some brief information to help someone understand what the
  339. ## package options are.
  340. ##
  341. ########################################################################
  342. def packageInfo():
  343. print """
  344. See panda3d/doc/INSTALL-PP for more detailed information.
  345. 3D modeling an painting packages:
  346. MAX5 3D Studio Max version 5
  347. MAX6 3D Studio Max version 6
  348. MAX7 3D Studio Max version 7
  349. "uri?"
  350. (for .??? files)
  351. MAYA5 Maya version 5
  352. MAYA6 Maya version 6
  353. "uri?"
  354. (for .??? files)
  355. Audio playback:
  356. FMOD f mod
  357. "http://www.fmod.org/"
  358. A music and sound effects library (including playback).
  359. (for .wav, .mp3 and other files)
  360. MILES Miles Sound System from RAD Game Tools
  361. "http://www.radgametools.com/default.htm"
  362. A proprietary (non-opensource) audio library.
  363. (for .wav, .mp3, and other files).
  364. Compression/decompression:
  365. ZLIB z lib
  366. "http://www.gzip.org/zlib"
  367. A commression/decomression library.
  368. (for .zip and similar files and data)
  369. Font manipulation:
  370. FREETYPE free type
  371. "http://www.freetype.org/"
  372. A font manipulation library.
  373. (for .ttf files).
  374. Image support libraries:
  375. JPEG Join Photographic Experts Group
  376. "http://www.ijg.org"
  377. An image library.
  378. (.jpg and .jpeg files)
  379. PNG Portable Network Graphics
  380. "http://www.libpng.org"
  381. An image library.
  382. (.png files)
  383. TIFF Tagged Image File Format
  384. "ftp://ftp.sgi.com/graphics/tiff"
  385. An image library.
  386. (.tiff files)
  387. Misc libraries:
  388. HELIX
  389. "uri?"
  390. (for .??? files)
  391. A ??? library.
  392. FFTW Fast Fourier Transform (in the West)
  393. "http://www.fftw.org/"
  394. A library for computing DFT in one or more dimensions.
  395. NVIDIACG nVidia cg
  396. "http://developer.nvidia.com/page/cg_main.html"
  397. (for .??? files)
  398. A library for gpu programming (shaders and such).
  399. Network communication:
  400. SSL Open Secure Socket Layer
  401. "http://www.openssl.org/"
  402. A network encryption library.
  403. NSPR Netscape Portable Runtime
  404. "http://www.mozilla.org/projects/nspr/"
  405. Used for network sockets and threading.
  406. User input:
  407. VRPN Virtual Reality Peripheral Network
  408. "http://www.cs.unc.edu/Research/vrpn/"
  409. A controller/peripheral input library.
  410. """
  411. sys.exit(1)
  412. ########################################################################
  413. ##
  414. ## Command-line parser.
  415. ##
  416. ## You can type "makepanda --help" to see all the options.
  417. ##
  418. ########################################################################
  419. def usage(problem):
  420. if (problem):
  421. print ""
  422. print problem
  423. print ""
  424. print "Makepanda generates a 'built' subdirectory containing a"
  425. print "compiled copy of Panda3D. Command-line arguments are:"
  426. print ""
  427. print " --help (print the help message you're reading now)"
  428. print " --package-info (help info about the optional packages)"
  429. print " --prefix X (install into prefix dir, default \"built\")"
  430. print " --compiler X (currently, compiler can only be MSVC7,LINUXA)"
  431. print " --optimize X (optimization level can be 1,2,3,4)"
  432. print " --thirdparty X (directory containing third-party software)"
  433. print " --complete (copy samples and direct into the build)"
  434. print " --installer (build an executable installer)"
  435. print " --ppgame X (build a prepackaged game - see manual)"
  436. print " --v1 X (set the major version number)"
  437. print " --v2 X (set the minor version number)"
  438. print " --v3 X (set the sequence version number)"
  439. print " --lzma (use lzma compression when building installer)"
  440. print ""
  441. for pkg in PACKAGES:
  442. p = pkg.lower()
  443. print " --use-%-9s --no-%-9s (enable/disable use of %s)"%(p, p, pkg)
  444. print ""
  445. print " --nothing (disable every third-party lib)"
  446. print " --everything (enable every third-party lib)"
  447. print ""
  448. print " --quiet (print less output)"
  449. print " --verbose (print more output and debugging info)"
  450. print ""
  451. print "The simplest way to compile panda is to just type:"
  452. print ""
  453. print " makepanda --everything"
  454. print ""
  455. sys.exit(1)
  456. def parseopts(args):
  457. global PREFIX,COMPILER,OPTIMIZE,OMIT,THIRDPARTY,INSTALLER,GENMAN
  458. global PPGAME,COPYEXTRAS,VERSION,COMPRESSOR,DIRECTXSDK,VERBOSE
  459. longopts = [
  460. "help","package-info","prefix=","compiler=","directx-sdk=","thirdparty=",
  461. "optimize=","everything","nothing","installer","ppgame=","quiet","verbose",
  462. "complete","version=","lzma"]
  463. anything = 0
  464. for pkg in PACKAGES: longopts.append("no-"+pkg.lower())
  465. for pkg in PACKAGES: longopts.append("use-"+pkg.lower())
  466. try:
  467. opts, extras = getopt.getopt(args, "", longopts)
  468. for option,value in opts:
  469. if (option=="--help"): raise "usage"
  470. elif (option=="--package-info"): raise "package-info"
  471. elif (option=="--prefix"): PREFIX=value
  472. elif (option=="--compiler"): COMPILER=value
  473. elif (option=="--directx-sdk"): DIRECTXSDK=value
  474. elif (option=="--thirdparty"): THIRDPARTY=value
  475. elif (option=="--optimize"): OPTIMIZE=value
  476. elif (option=="--quiet"): VERBOSE-=1
  477. elif (option=="--verbose"): VERBOSE+=1
  478. elif (option=="--installer"): INSTALLER=1
  479. elif (option=="--genman"): GENMAN=1
  480. elif (option=="--ppgame"): PPGAME=value
  481. elif (option=="--complete"): COMPLETE=1
  482. elif (option=="--everything"): OMIT=[]
  483. elif (option=="--nothing"): OMIT=PACKAGES[:]
  484. elif (option=="--version"):
  485. VERSION=value
  486. if (len(VERSION.split(".")) != 3): raise "usage"
  487. elif (option=="--lzma"): COMPRESSOR="lzma"
  488. else:
  489. for pkg in PACKAGES:
  490. if (option=="--use-"+pkg.lower()):
  491. if (OMIT.count(pkg)): OMIT.remove(pkg)
  492. break
  493. for pkg in PACKAGES:
  494. if (option=="--no-"+pkg.lower()):
  495. if (OMIT.count(pkg)==0): OMIT.append(pkg)
  496. break
  497. anything = 1
  498. except "package-info": packageInfo()
  499. except: usage(0)
  500. if (anything==0): usage(0)
  501. if (OPTIMIZE=="1"): OPTIMIZE=1
  502. elif (OPTIMIZE=="2"): OPTIMIZE=2
  503. elif (OPTIMIZE=="3"): OPTIMIZE=3
  504. elif (OPTIMIZE=="4"): OPTIMIZE=4
  505. else: usage("Invalid setting for OPTIMIZE")
  506. if (COMPILERS.count(COMPILER)==0): usage("Invalid setting for COMPILER: "+COMPILER)
  507. parseopts(sys.argv[1:])
  508. ########################################################################
  509. #
  510. # Avoid trouble by not allowing weird --prefix or --thirdparty
  511. #
  512. # One of my goals for makepanda was for it to be maintainable.
  513. # I found that trying to support arbitrary pathnames for "prefix"
  514. # and "thirdparty" required the use of lots of backslashes and
  515. # quotation marks, which were quite frankly hard to get right.
  516. # I think it's better to simply rule out weird pathnames.
  517. #
  518. ########################################################################
  519. PREFIX = PREFIX.replace("\\","/")
  520. THIRDPARTY = THIRDPARTY.replace("\\","/")
  521. if (PREFIX.count(" ") or THIRDPARTY.count(" ")):
  522. sys.exit("The --prefix and --thirdparty may not contain spaces")
  523. if (PREFIX.count('"') or THIRDPARTY.count('"')):
  524. sys.exit("The --prefix and --thirdparty may not contain quotation marks")
  525. ########################################################################
  526. #
  527. # Locate the root of the panda tree
  528. #
  529. ########################################################################
  530. PANDASOURCE=os.path.dirname(os.path.abspath(sys.path[0]))
  531. if ((os.path.exists(os.path.join(PANDASOURCE,"makepanda/makepanda.py"))==0) or
  532. (os.path.exists(os.path.join(PANDASOURCE,"dtool","src","dtoolbase","dtoolbase.h"))==0) or
  533. (os.path.exists(os.path.join(PANDASOURCE,"panda","src","pandabase","pandabase.h"))==0)):
  534. sys.exit("I am unable to locate the root of the panda source tree.")
  535. os.chdir(PANDASOURCE)
  536. ########################################################################
  537. ##
  538. ## If you have the "sdks" directory, supply all sdks
  539. ##
  540. ## This is a temporary hack, it may go away.
  541. ##
  542. ########################################################################
  543. if (os.path.isdir("sdks")):
  544. DIRECTXSDK="sdks/directx"
  545. MAXSDKCS["MAX5"] = "sdks/maxsdk5"
  546. MAXSDKCS["MAX6"] = "sdks/maxsdk6"
  547. MAXSDKCS["MAX7"] = "sdks/maxsdk7"
  548. MAXSDK["MAX5"] = "sdks/maxsdk5"
  549. MAXSDK["MAX6"] = "sdks/maxsdk6"
  550. MAXSDK["MAX7"] = "sdks/maxsdk7"
  551. MAYASDK["MAYA5"] = "sdks/maya5"
  552. MAYASDK["MAYA6"] = "sdks/maya6"
  553. MAYASDK["MAYA65"] = "sdks/maya65"
  554. ########################################################################
  555. ##
  556. ## Locate the DirectX SDK
  557. ##
  558. ########################################################################
  559. if sys.platform == "win32" and DIRECTXSDK is None:
  560. dxdir = GetRegistryKey("SOFTWARE\\Microsoft\\DirectX SDK", "DX9SDK Samples Path")
  561. if (dxdir != 0): DIRECTXSDK = os.path.dirname(dxdir)
  562. else:
  563. dxdir = GetRegistryKey("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment","DXSDK_DIR")
  564. if (dxdir != 0): DIRECTXSDK=dxdir
  565. else:
  566. dxdir = GetRegistryKey("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment","DXSDKROOT")
  567. if dxdir != 0:
  568. if dxdir[-2:]=="/.":
  569. DIRECTXSDK=dxdir[:-1]
  570. else:
  571. DIRECTXSDK=dxdir
  572. else:
  573. sys.exit("The registry does not appear to contain a pointer to the DirectX 9.0 SDK.")
  574. DIRECTXSDK=DIRECTXSDK.replace("\\", "/").rstrip("/")
  575. ########################################################################
  576. ##
  577. ## Locate the Maya 5.0 and Maya 6.0 SDK
  578. ##
  579. ########################################################################
  580. MAYAVERSIONS=[("MAYA5", "SOFTWARE\\Alias|Wavefront\\Maya\\5.0\\Setup\\InstallPath"),
  581. ("MAYA6", "SOFTWARE\\Alias|Wavefront\\Maya\\6.0\\Setup\\InstallPath"),
  582. ("MAYA65", "SOFTWARE\\Alias|Wavefront\\Maya\\6.5\\Setup\\InstallPath")
  583. ]
  584. for (ver,key) in MAYAVERSIONS:
  585. if (OMIT.count(ver)==0) and (MAYASDK.has_key(ver)==0):
  586. if (sys.platform == "win32"):
  587. MAYASDK[ver]=GetRegistryKey(key, "MAYA_INSTALL_LOCATION")
  588. if (MAYASDK[ver] == 0):
  589. WARNINGS.append("The registry does not appear to contain a pointer to the "+ver+" SDK.")
  590. WARNINGS.append("I have automatically added this command-line option: --no-"+ver.lower())
  591. OMIT.append(ver)
  592. else:
  593. MAYASDK[ver] = MAYASDK[ver].replace("\\", "/").rstrip("/")
  594. else:
  595. WARNINGS.append(ver+" not yet supported under linux")
  596. WARNINGS.append("I have automatically added this command-line option: --no-"+ver.lower())
  597. OMIT.append(ver)
  598. ########################################################################
  599. ##
  600. ## Locate the 3D Studio Max and Character Studio SDKs
  601. ##
  602. ########################################################################
  603. MAXVERSIONS = [("MAX5", "SOFTWARE\\Autodesk\\3DSMAX\\5.0\\MAX-1:409", "uninstallpath", "Cstudio\\Sdk"),
  604. ("MAX6", "SOFTWARE\\Autodesk\\3DSMAX\\6.0", "installdir", "maxsdk\\cssdk\\include"),
  605. ("MAX7", "SOFTWARE\\Autodesk\\3DSMAX\\7.0", "Installdir", "maxsdk\\include\\CS")]
  606. for version,key1,key2,subdir in MAXVERSIONS:
  607. if (OMIT.count(version)==0) and (MAXSDK.has_key(version)==0):
  608. if (sys.platform == "win32"):
  609. top = GetRegistryKey(key1,key2)
  610. if (top == 0):
  611. WARNINGS.append("The registry does not appear to contain a pointer to "+version)
  612. WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
  613. OMIT.append(version)
  614. else:
  615. if (os.path.isdir(top + "\\" + subdir)==0):
  616. WARNINGS.append("Your copy of "+version+" does not include the character studio SDK")
  617. WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
  618. OMIT.append(version)
  619. else:
  620. MAXSDK[version] = top + "maxsdk"
  621. MAXSDKCS[version] = top + subdir
  622. else:
  623. WARNINGS.append(version+" not yet supported under linux")
  624. WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
  625. OMIT.append(version)
  626. ########################################################################
  627. ##
  628. ## Locate the Python SDK
  629. ##
  630. ########################################################################
  631. if PythonSDK is None:
  632. if sys.platform == "win32":
  633. if os.path.isdir("C:/Python22"): PythonSDK = "C:/Python22"
  634. elif os.path.isdir("C:/Python23"): PythonSDK = "C:/Python23"
  635. elif os.path.isdir("C:/Python24"): PythonSDK = "C:/Python24"
  636. elif os.path.isdir("C:/Python25"): PythonSDK = "C:/Python25"
  637. elif os.path.isdir('thirdparty/win-python'): PythonSDK = "thirdparty/win-python"
  638. else:
  639. sys.exit("Cannot find the python SDK")
  640. else:
  641. if os.path.isdir("/usr/include/python2.5"): PythonSDK = "/usr/include/python2.5"
  642. elif os.path.isdir("/usr/include/python2.4"): PythonSDK = "/usr/include/python2.4"
  643. elif os.path.isdir("/usr/include/python2.3"): PythonSDK = "/usr/include/python2.3"
  644. elif os.path.isdir("/usr/include/python2.2"): PythonSDK = "/usr/include/python2.2"
  645. else: sys.exit("Cannot find the python SDK")
  646. # this is so that the user can find out which version of python was used.
  647. ########################################################################
  648. ##
  649. ## Locate Visual Studio 7.0 or 7.1
  650. ##
  651. ## The visual studio compiler doesn't work unless you set up a
  652. ## couple of environment variables to point at the compiler.
  653. ##
  654. ########################################################################
  655. if (COMPILER == "MSVC7"):
  656. vcdir = GetRegistryKey("SOFTWARE\\Microsoft\\VisualStudio\\7.1", "InstallDir")
  657. if ((vcdir == 0) or (vcdir[-13:] != "\\Common7\\IDE\\")):
  658. vcdir = GetRegistryKey("SOFTWARE\\Microsoft\\VisualStudio\\7.0", "InstallDir")
  659. if ((vcdir == 0) or (vcdir[-13:] != "\\Common7\\IDE\\")):
  660. sys.exit("The registry does not appear to contain a pointer to the Visual Studio 7 install directory")
  661. vcdir = vcdir[:-12]
  662. old_env_path = ""
  663. old_env_include = ""
  664. old_env_lib = ""
  665. if (os.environ.has_key("PATH")): old_env_path = os.environ["PATH"]
  666. if (os.environ.has_key("INCLUDE")): old_env_include = os.environ["INCLUDE"]
  667. if (os.environ.has_key("LIB")): old_env_lib = os.environ["LIB"]
  668. os.environ["PATH"] = vcdir + "vc7\\bin;" + vcdir + "Common7\\IDE;" + vcdir + "Common7\\Tools;" + vcdir + "Common7\\Tools\\bin\\prerelease;" + vcdir + "Common7\\Tools\\bin;" + old_env_path
  669. os.environ["INCLUDE"] = vcdir + "vc7\\ATLMFC\\INCLUDE;" + vcdir + "vc7\\include;" + vcdir + "vc7\\PlatformSDK\\include\\prerelease;" + vcdir + "vc7\\PlatformSDK\\include;" + old_env_include
  670. os.environ["LIB"] = vcdir + "vc7\\ATLMFC\\LIB;" + vcdir + "vc7\\LIB;" + vcdir + "vc7\\PlatformSDK\\lib\\prerelease;" + vcdir + "vc7\\PlatformSDK\\lib;" + old_env_lib
  671. sys.stdout.flush()
  672. ##########################################################################################
  673. #
  674. # Disable Helix unless running under Windows
  675. #
  676. ##########################################################################################
  677. if (sys.platform != "win32"):
  678. if (OMIT.count("HELIX")==0):
  679. WARNINGS.append("HELIX not yet supported under linux")
  680. WARNINGS.append("I have automatically added this command-line option: --no-helix")
  681. OMIT.append("HELIX")
  682. ##########################################################################################
  683. #
  684. # See if there's a "MILES" subdirectory under 'thirdparty'
  685. #
  686. ##########################################################################################
  687. if (os.path.isdir(os.path.join(THIRDPARTY, "win-libs-vc7", "miles"))==0):
  688. if (OMIT.count("MILES")==0):
  689. WARNINGS.append("You do not have a copy of MILES sound system")
  690. WARNINGS.append("I have automatically added this command-line option: --no-miles")
  691. OMIT.append("MILES")
  692. ##########################################################################################
  693. #
  694. # Enable or Disable runtime debugging mechanisms based on optimize level.
  695. #
  696. ##########################################################################################
  697. for x in PACKAGES:
  698. if (OMIT.count(x)==0):
  699. if (DTOOLCONFIG.has_key("HAVE_"+x)):
  700. DTOOLCONFIG["HAVE_"+x] = '1'
  701. DTOOLCONFIG["HAVE_NET"] = DTOOLCONFIG["HAVE_NSPR"]
  702. if (OMIT.count("NVIDIACG")==0):
  703. DTOOLCONFIG["HAVE_CG"] = '1'
  704. DTOOLCONFIG["HAVE_CGGL"] = '1'
  705. if (OPTIMIZE <= 3):
  706. if (DTOOLCONFIG["HAVE_NET"] != 'UNDEF'):
  707. DTOOLCONFIG["DO_PSTATS"] = '1'
  708. if (OPTIMIZE <= 3):
  709. DTOOLCONFIG["DO_COLLISION_RECORDING"] = '1'
  710. #if (OPTIMIZE <= 2):
  711. # DTOOLCONFIG["TRACK_IN_INTERPRETER"] = '1'
  712. if (OPTIMIZE <= 3):
  713. DTOOLCONFIG["DO_MEMORY_USAGE"] = '1'
  714. #if (OPTIMIZE <= 1):
  715. # DTOOLCONFIG["DO_PIPELINING"] = '1'
  716. if (OPTIMIZE <= 3):
  717. DTOOLCONFIG["NOTIFY_DEBUG"] = '1'
  718. ##########################################################################################
  719. #
  720. # Verify that LD_LIBRARY_PATH contains the PREFIX/lib directory.
  721. #
  722. # If not, add it on a temporary basis, and issue a warning.
  723. #
  724. ##########################################################################################
  725. if (sys.platform != "win32"):
  726. BUILTLIB = os.path.abspath(PREFIX+"/lib")
  727. try:
  728. LDPATH = []
  729. f = file("/etc/ld.so.conf","r")
  730. for line in f: LDPATH.append(line.rstrip())
  731. f.close()
  732. except: LDPATH = []
  733. if (os.environ.has_key("LD_LIBRARY_PATH")):
  734. LDPATH = LDPATH + os.environ["LD_LIBRARY_PATH"].split(":")
  735. if (LDPATH.count(BUILTLIB)==0):
  736. WARNINGS.append("Caution: the "+PREFIX+"/lib directory is not in LD_LIBRARY_PATH")
  737. WARNINGS.append("or /etc/ld.so.conf. You must add it before using panda.")
  738. if (os.environ.has_key("LD_LIBRARY_PATH")):
  739. os.environ["LD_LIBRARY_PATH"] = BUILTLIB + ":" + os.environ["LD_LIBRARY_PATH"]
  740. else:
  741. os.environ["LD_LIBRARY_PATH"] = BUILTLIB
  742. ########################################################################
  743. ##
  744. ## Give a Status Report on Command-Line Options
  745. ##
  746. ########################################################################
  747. def printStatus(header,warnings):
  748. global VERBOSE
  749. if VERBOSE >= -2:
  750. print ""
  751. print "-------------------------------------------------------------------"
  752. print header
  753. tkeep = ""
  754. tomit = ""
  755. for x in PACKAGES:
  756. if (OMIT.count(x)==0): tkeep = tkeep + x + " "
  757. else: tomit = tomit + x + " "
  758. print "Makepanda: Prefix Directory:",PREFIX
  759. print "Makepanda: Compiler:",COMPILER
  760. print "Makepanda: Optimize:",OPTIMIZE
  761. print "Makepanda: Keep Pkg:",tkeep
  762. print "Makepanda: Omit Pkg:",tomit
  763. print "Makepanda: Thirdparty dir:",THIRDPARTY
  764. print "Makepanda: DirectX SDK dir:",DIRECTXSDK
  765. print "Makepanda: Verbose vs. Quiet Level:",VERBOSE
  766. print "Makepanda: PythonSDK:", PythonSDK
  767. if (GENMAN): print "Makepanda: Generate API reference manual"
  768. else : print "Makepanda: Don't generate API reference manual"
  769. if (sys.platform == "win32"):
  770. if INSTALLER: print "Makepanda: Build installer, using",COMPRESSOR
  771. else : print "Makepanda: Don't build installer"
  772. if PPGAME!=0: print "Makepanda: Build pprepackaged game ",PPGAME,"using",COMPRESSOR
  773. else : print "Makepanda: Don't build pprepackaged game"
  774. print "Makepanda: Version ID: "+VERSION
  775. for x in warnings: print "Makepanda: "+x
  776. print "-------------------------------------------------------------------"
  777. print ""
  778. sys.stdout.flush()
  779. printStatus("Makepanda Initial Status Report", WARNINGS)
  780. ##########################################################################################
  781. #
  782. # Create the directory tree
  783. #
  784. ##########################################################################################
  785. MakeDirectory(PREFIX)
  786. MakeDirectory(PREFIX+"/bin")
  787. MakeDirectory(PREFIX+"/lib")
  788. MakeDirectory(PREFIX+"/etc")
  789. MakeDirectory(PREFIX+"/plugins")
  790. MakeDirectory(PREFIX+"/pandac")
  791. MakeDirectory(PREFIX+"/pandac/input")
  792. MakeDirectory(PREFIX+"/include")
  793. MakeDirectory(PREFIX+"/include/parser-inc")
  794. MakeDirectory(PREFIX+"/include/parser-inc/openssl")
  795. MakeDirectory(PREFIX+"/include/parser-inc/Cg")
  796. MakeDirectory(PREFIX+"/include/openssl")
  797. MakeDirectory(PREFIX+"/direct")
  798. MakeDirectory(PREFIX+"/tmp")
  799. ########################################################################
  800. ##
  801. ## PkgSelected(package-list,package)
  802. ##
  803. ## This function returns true if the package-list contains the
  804. ## package, AND the OMIT list does not contain the package.
  805. ##
  806. ########################################################################
  807. def PkgSelected(pkglist, pkg):
  808. if (pkglist.count(pkg)==0): return 0
  809. if (OMIT.count(pkg)): return 0
  810. return 1
  811. ########################################################################
  812. ##
  813. ## These two globals accumulate a global list of everything compiled.
  814. ##
  815. ########################################################################
  816. ALLIN=[]
  817. ALLTARGETS=[]
  818. ########################################################################
  819. ##
  820. ## The CXX include-cache.
  821. ##
  822. ## Dictionary: for each CXX source file, a list of all the
  823. ## include-directives inside that file.
  824. ##
  825. ## Makepanda analyzes include-directives to determine the dependencies
  826. ## of C source files. This requires us to read the C source files,
  827. ## a time-consuming process. This means that doing a 'makepanda'
  828. ## takes quite a bit of time, even if there's nothing to compile.
  829. ##
  830. ## To accelerate this process, we store the list of include-directives
  831. ## in each source file in the "CXX include-cache". This cache is
  832. ## preserved (using the 'cPickle' module) from execution to execution
  833. ## of makepanda. The use of file dates in the cache makes it very
  834. ## unlikely for the cache to get out-of-sync with the source tree.
  835. ##
  836. ########################################################################
  837. global CxxIncludeCache
  838. CxxIncludeCache = {}
  839. iCachePath=PREFIX+"/tmp/makepanda-icache"
  840. try: icache = open(iCachePath,'rb')
  841. except: icache = 0
  842. if (icache!=0):
  843. CxxIncludeCache = cPickle.load(icache)
  844. icache.close()
  845. ########################################################################
  846. ##
  847. ## CxxGetIncludes
  848. ##
  849. ## return a list of the include-directives in a given source file
  850. ##
  851. ########################################################################
  852. global CxxIncludeRegex
  853. CxxIncludeRegex = re.compile('^[ \t]*[#][ \t]*include[ \t]+"([^"]+)"[ \t\r\n]*$')
  854. def CxxGetIncludes(path):
  855. date = filedate(path)
  856. if (CxxIncludeCache.has_key(path)):
  857. cached = CxxIncludeCache[path]
  858. if (cached[0]==date): return cached[1]
  859. try: sfile = open(path, 'rb')
  860. except: sys.exit("Cannot open source file \""+path+"\" for reading.")
  861. include = []
  862. for line in sfile:
  863. match = CxxIncludeRegex.match(line,0)
  864. if (match):
  865. incname = match.group(1)
  866. include.append(incname)
  867. sfile.close()
  868. CxxIncludeCache[path] = [date, include]
  869. return include
  870. ########################################################################
  871. ##
  872. ## CxxFindSource
  873. ##
  874. ## given a source file name and a directory list, searches the
  875. ## directory list for the given source file. Returns the full
  876. ## pathname of the located file.
  877. ##
  878. ########################################################################
  879. def CxxFindSource(name, ipath):
  880. for dir in ipath:
  881. if (dir == "."): full = name
  882. else: full = dir + "/" + name
  883. if filedate(full) > 0: return full
  884. return 0
  885. ########################################################################
  886. ##
  887. ## CxxFindHeader
  888. ##
  889. ## given a source file name and an include directive in that source
  890. ## file, locates the relevant header file.
  891. ##
  892. ########################################################################
  893. def CxxFindHeader(srcfile, incfile, ipath):
  894. if (incfile[:1]=="."):
  895. last = srcfile.rfind("/")
  896. if (last < 0): sys.exit("CxxFindHeader cannot handle this case #1")
  897. srcdir = srcfile[:last+1]
  898. while (incfile[:1]=="."):
  899. if (incfile[:2]=="./"):
  900. incfile = incfile[2:]
  901. elif (incfile[:3]=="../"):
  902. incfile = incfile[3:]
  903. last = srcdir[:-1].rfind("/")
  904. if (last < 0): sys.exit("CxxFindHeader cannot handle this case #2")
  905. srcdir = srcdir[:last+1]
  906. else: sys.exit("CxxFindHeader cannot handle this case #3")
  907. full = srcdir + incfile
  908. if filedate(full) > 0: return full
  909. return 0
  910. else: return CxxFindSource(incfile, ipath)
  911. ########################################################################
  912. ##
  913. ## CxxCalcDependencies(srcfile, ipath, ignore)
  914. ##
  915. ## Calculate the dependencies of a source file given a
  916. ## particular include-path. Any file in the list of files to
  917. ## ignore is not considered.
  918. ##
  919. ########################################################################
  920. global CxxIgnoreHeader
  921. global CxxDependencyCache
  922. CxxIgnoreHeader = {}
  923. CxxDependencyCache = {}
  924. def CxxCalcDependencies(srcfile, ipath, ignore):
  925. if (CxxDependencyCache.has_key(srcfile)):
  926. return CxxDependencyCache[srcfile]
  927. if (ignore.count(srcfile)): return []
  928. dep = {}
  929. dep[srcfile] = 1
  930. includes = CxxGetIncludes(srcfile)
  931. for include in includes:
  932. if (CxxIgnoreHeader.has_key(include)==0):
  933. header = CxxFindHeader(srcfile, include, ipath)
  934. if (header==0):
  935. print "CAUTION: header file "+include+" cannot be found."
  936. else:
  937. if (ignore.count(header)==0):
  938. hdeps = CxxCalcDependencies(header, ipath, [srcfile]+ignore)
  939. for x in hdeps: dep[x] = 1
  940. result = dep.keys()
  941. CxxDependencyCache[srcfile] = result
  942. return result
  943. def CxxCalcDependenciesAll(srcfiles, ipath):
  944. dep = {}
  945. for srcfile in srcfiles:
  946. for x in CxxCalcDependencies(srcfile, ipath, []):
  947. dep[x] = 1
  948. return dep.keys()
  949. ########################################################################
  950. ##
  951. ## ConditionalWriteFile
  952. ##
  953. ## Creates the given file, but only if it doesn't already
  954. ## contain the correct contents.
  955. ##
  956. ########################################################################
  957. def ConditionalWriteFile(dest,desiredcontents):
  958. try:
  959. rfile = open(dest, 'rb')
  960. contents = rfile.read(-1)
  961. rfile.close()
  962. except:
  963. contents=0
  964. if contents != desiredcontents:
  965. if VERBOSE:
  966. print "Regenerating file: "+dest
  967. sys.stdout.flush()
  968. WriteFile(dest,desiredcontents)
  969. ########################################################################
  970. ##
  971. ## CopyFile
  972. ##
  973. ## Copy a file into the build tree.
  974. ##
  975. ########################################################################
  976. def CopyFile(dstfile,srcfile):
  977. if (dstfile[-1]=='/'):
  978. dstdir = dstfile
  979. fnl = srcfile.rfind("/")
  980. if (fnl < 0): fn = srcfile
  981. else: fn = srcfile[fnl+1:]
  982. dstfile = dstdir + fn
  983. if (older(dstfile,srcfile)):
  984. global VERBOSE
  985. if VERBOSE >= 1:
  986. print "Copying \"%s\" --> \"%s\""%(srcfile, dstfile)
  987. WriteFile(dstfile,ReadFile(srcfile))
  988. updatefiledate(dstfile)
  989. ALLTARGETS.append(dstfile)
  990. ########################################################################
  991. ##
  992. ## CopyAllFiles
  993. ##
  994. ## Copy the contents of an entire directory into the build tree.
  995. ##
  996. ########################################################################
  997. def CopyAllFiles(dstdir, srcdir, suffix=""):
  998. suflen = len(suffix)
  999. files = os.listdir(srcdir)
  1000. for x in files:
  1001. if (os.path.isfile(srcdir+x)):
  1002. if (suflen==0) or (x[-suflen:]==suffix):
  1003. CopyFile(dstdir+x, srcdir+x)
  1004. ########################################################################
  1005. ##
  1006. ## CopyTree
  1007. ##
  1008. ## Copy a directory into the build tree.
  1009. ##
  1010. ########################################################################
  1011. def CopyTree(dstdir,srcdir):
  1012. if (os.path.isdir(dstdir)): return 0
  1013. if (COMPILER=="MSVC7"): cmd = 'xcopy.exe /I/Y/E/Q "' + srcdir + '" "' + dstdir + '"'
  1014. if (COMPILER=="LINUXA"): cmd = 'cp --recursive --force ' + srcdir + ' ' + dstdir
  1015. oscmd(cmd)
  1016. updatefiledate(dstdir)
  1017. def CompileBison(pre,dstc,dsth,src):
  1018. """
  1019. Generate a CXX file from a source YXX file.
  1020. """
  1021. (base, fn) = os.path.split(src)
  1022. dstc=base+"/"+dstc
  1023. dsth=base+"/"+dsth
  1024. if (older(dstc,src) or older(dsth,src)):
  1025. CopyFile(PREFIX+"/tmp/", src)
  1026. if (COMPILER=="MSVC7"):
  1027. CopyFile(PREFIX+"/tmp/", "thirdparty/win-util/bison.simple")
  1028. bisonFullPath=os.path.abspath("thirdparty/win-util/bison.exe")
  1029. oslocalcmd(PREFIX+"/tmp", bisonFullPath+" -y -d -p " + pre + " " + fn)
  1030. osmove(PREFIX+"/tmp/y_tab.c", dstc)
  1031. osmove(PREFIX+"/tmp/y_tab.h", dsth)
  1032. if (COMPILER=="LINUXA"):
  1033. oslocalcmd(PREFIX+"/tmp", "bison -y -d -p "+pre+" "+fn)
  1034. osmove(PREFIX+"/tmp/y.tab.c", dstc)
  1035. osmove(PREFIX+"/tmp/y.tab.h", dsth)
  1036. updatefiledate(dstc)
  1037. updatefiledate(dsth)
  1038. def CompileFlex(pre,dst,src,dashi):
  1039. """
  1040. Generate a CXX file from a source LXX file.
  1041. """
  1042. last = src.rfind("/")
  1043. fn = src[last+1:]
  1044. dst = PREFIX+"/tmp/"+dst
  1045. if (older(dst,src)):
  1046. CopyFile(PREFIX+"/tmp/", src)
  1047. if (COMPILER=="MSVC7"):
  1048. flexFullPath=os.path.abspath("thirdparty/win-util/flex.exe")
  1049. if (dashi): oslocalcmd(PREFIX+"/tmp", flexFullPath+" -i -P" + pre + " -olex.yy.c " + fn)
  1050. else: oslocalcmd(PREFIX+"/tmp", flexFullPath+" -P" + pre + " -olex.yy.c " + fn)
  1051. replaceInFile(PREFIX+'/tmp/lex.yy.c', dst, '#include <unistd.h>', '')
  1052. if (COMPILER=="LINUXA"):
  1053. if (dashi): oslocalcmd(PREFIX+"/tmp", "flex -i -P" + pre + " -olex.yy.c " + fn)
  1054. else: oslocalcmd(PREFIX+"/tmp", "flex -P" + pre + " -olex.yy.c " + fn)
  1055. oscmd('cp '+PREFIX+'/tmp/lex.yy.c '+dst)
  1056. updatefiledate(dst)
  1057. ########################################################################
  1058. ##
  1059. ## CompileC
  1060. ##
  1061. ## Generate an OBJ file from a source CXX file.
  1062. ##
  1063. ########################################################################
  1064. priorIPath=None
  1065. def checkIfNewDir(path):
  1066. global priorIPath
  1067. if priorIPath != path:
  1068. print "\nStarting compile in \"%s\" (%s):\n"%(path,prettyTime(time.time()-STARTTIME),)
  1069. priorIPath=path
  1070. def CompileC(obj=0,src=0,ipath=[],opts=[]):
  1071. global VERBOSE
  1072. if ((obj==0)|(src==0)): sys.exit("syntax error in CompileC directive")
  1073. ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"]
  1074. fullsrc = CxxFindSource(src, ipath)
  1075. if (fullsrc == 0): sys.exit("Cannot find source file "+src)
  1076. dep = CxxCalcDependencies(fullsrc, ipath, [])
  1077. if (COMPILER=="MSVC7"):
  1078. wobj = PREFIX+"/tmp/"+obj
  1079. if (older(wobj, dep)):
  1080. if VERBOSE >= 0:
  1081. checkIfNewDir(ipath[1])
  1082. cmd = "cl.exe /Fo" + wobj + " /nologo /c"
  1083. cmd = cmd + " /I" + PREFIX + "/python/include"
  1084. if (opts.count("DXSDK")): cmd = cmd + ' /I"' + DIRECTXSDK + '/include"'
  1085. for ver in ["MAYA5","MAYA6","MAYA65"]:
  1086. if (opts.count(ver)): cmd = cmd + ' /I"' + MAYASDK[ver] + '/include"'
  1087. for max in ["MAX5","MAX6","MAX7"]:
  1088. if (PkgSelected(opts,max)):
  1089. cmd = cmd + ' /I"' + MAXSDK[max] + '/include" /I"' + MAXSDKCS[max] + '" /D' + max
  1090. for pkg in PACKAGES:
  1091. if (pkg[:4] != "MAYA") and PkgSelected(opts,pkg):
  1092. cmd = cmd + " /I" + THIRDPARTY + "/win-libs-vc7/" + pkg.lower() + "/include"
  1093. for x in ipath: cmd = cmd + " /I" + x
  1094. if (opts.count('NOFLOATWARN')): cmd = cmd + ' /wd4244 /wd4305'
  1095. if (opts.count("WITHINPANDA")): cmd = cmd + ' /DWITHIN_PANDA'
  1096. if (OPTIMIZE==1): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING /RTCs /GS"
  1097. if (OPTIMIZE==2): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING "
  1098. if (OPTIMIZE==3): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING "
  1099. if (OPTIMIZE==4): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING /GL /DNDEBUG "
  1100. cmd = cmd + " /Fd" + wobj[:-4] + ".pdb"
  1101. building = buildingwhat(opts)
  1102. if (building): cmd = cmd + " /DBUILDING_" + building
  1103. cmd = cmd + " /EHsc /Zm300 /DWIN32_VC /DWIN32 /W3 " + fullsrc
  1104. oscmd(cmd)
  1105. updatefiledate(wobj)
  1106. if (COMPILER=="LINUXA"):
  1107. wobj = PREFIX+"/tmp/" + obj[:-4] + ".o"
  1108. if (older(wobj, dep)):
  1109. if VERBOSE >= 0:
  1110. checkIfNewDir(ipath[1])
  1111. if (src[-2:]==".c"): cmd = 'gcc -c -o ' + wobj
  1112. else: cmd = 'g++ -ftemplate-depth-30 -c -o ' + wobj
  1113. cmd = cmd + ' -I"' + PythonSDK + '"'
  1114. if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/vrpn/include'
  1115. if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/fftw/include'
  1116. if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/fmod/include'
  1117. if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/nvidiacg/include'
  1118. if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/nspr/include'
  1119. if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' -I/usr/include/freetype2'
  1120. for x in ipath: cmd = cmd + ' -I' + x
  1121. if (opts.count("WITHINPANDA")): cmd = cmd + ' -DWITHIN_PANDA'
  1122. if (OPTIMIZE==1): cmd = cmd + " -g"
  1123. if (OPTIMIZE==2): cmd = cmd + " -O1"
  1124. if (OPTIMIZE==3): cmd = cmd + " -O2"
  1125. if (OPTIMIZE==4): cmd = cmd + " -O2"
  1126. building = buildingwhat(opts)
  1127. if (building): cmd = cmd + " -DBUILDING_" + building
  1128. cmd = cmd + ' ' + fullsrc
  1129. oscmd(cmd)
  1130. updatefiledate(wobj)
  1131. ########################################################################
  1132. ##
  1133. ## CompileRES
  1134. ##
  1135. ## Generate an RES file from a source RC file.
  1136. ##
  1137. ########################################################################
  1138. def CompileRES(obj=0,src=0,ipath=[],opts=[]):
  1139. if ((obj==0)|(src==0)): sys.exit("syntax error in CompileRES directive")
  1140. fullsrc = CxxFindSource(src, ipath)
  1141. if (fullsrc == 0): sys.exit("Cannot find source file "+src)
  1142. obj = PREFIX+"/tmp/"+obj
  1143. wdep = CxxCalcDependencies(fullsrc, ipath, [])
  1144. if (COMPILER=="MSVC7"):
  1145. if (older(obj, wdep)):
  1146. cmd = 'rc.exe /d "NDEBUG" /l 0x409'
  1147. for x in ipath: cmd = cmd + " /I" + x
  1148. cmd = cmd + ' /fo' + obj
  1149. cmd = cmd + ' ' + fullsrc
  1150. oscmd(cmd)
  1151. updatefiledate(obj)
  1152. if (COMPILER=="LINUXA"):
  1153. sys.exit("Can only compile RES files on Windows.")
  1154. ########################################################################
  1155. ##
  1156. ## Interrogate
  1157. ##
  1158. ## Generate an IN file and a CXX-stub file from CXX source files
  1159. ##
  1160. ########################################################################
  1161. def Interrogate(ipath=0, opts=0, outd=0, outc=0, src=0, module=0, library=0, files=0):
  1162. if ((ipath==0)|(opts==0)|(outd==0)|(outc==0)|(src==0)|(module==0)|(library==0)|(files==0)):
  1163. sys.exit("syntax error in Interrogate directive")
  1164. ALLIN.append(outd)
  1165. ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"]
  1166. outd = PREFIX+"/pandac/input/"+outd
  1167. outc = PREFIX+"/tmp/"+outc
  1168. paths = xpaths(src+"/",files,"")
  1169. dep = CxxCalcDependenciesAll(paths, ipath)
  1170. dotdots = ""
  1171. for i in range(0,src.count("/")+1): dotdots = dotdots + "../"
  1172. building = 0
  1173. for x in opts:
  1174. if (x[:9]=="BUILDING_"): building = x[9:]
  1175. if (older(outc, dep) or older(outd, dep)):
  1176. if (COMPILER=="MSVC7"):
  1177. cmd = dotdots + PREFIX + "/bin/interrogate.exe"
  1178. cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32'
  1179. cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall'
  1180. if (OPTIMIZE==1): cmd = cmd + ' '
  1181. if (OPTIMIZE==2): cmd = cmd + ' '
  1182. if (OPTIMIZE==3): cmd = cmd + ' -DFORCE_INLINING'
  1183. if (OPTIMIZE==4): cmd = cmd + ' -DFORCE_INLINING'
  1184. cmd = cmd + ' -S' + dotdots + PREFIX + '/include/parser-inc'
  1185. cmd = cmd + ' -I' + dotdots + PREFIX + '/python/include'
  1186. for pkg in PACKAGES:
  1187. if (PkgSelected(opts,pkg)):
  1188. cmd = cmd + ' -I' + dotdots + THIRDPARTY + "/win-libs-vc7/" + pkg.lower() + "/include"
  1189. if (COMPILER=="LINUXA"):
  1190. cmd = dotdots + PREFIX + '/bin/interrogate'
  1191. cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const'
  1192. if (OPTIMIZE==1): cmd = cmd + ' '
  1193. if (OPTIMIZE==2): cmd = cmd + ' '
  1194. if (OPTIMIZE==3): cmd = cmd + ' '
  1195. if (OPTIMIZE==4): cmd = cmd + ' '
  1196. cmd = cmd + ' -S' + dotdots + PREFIX + '/include/parser-inc -S/usr/include'
  1197. cmd = cmd + ' -I' + dotdots + PREFIX + '/python/include'
  1198. for pkg in PACKAGES:
  1199. if (PkgSelected(opts,pkg)):
  1200. cmd = cmd + ' -I' + dotdots + THIRDPARTY + "/linux-libs-a/" + pkg.lower() + "/include"
  1201. cmd = cmd + ' -oc ' + dotdots + outc + ' -od ' + dotdots + outd
  1202. cmd = cmd + ' -fnames -string -refcount -assert -python'
  1203. for x in ipath: cmd = cmd + ' -I' + dotdots + x
  1204. if (building): cmd = cmd + " -DBUILDING_"+building
  1205. if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA"
  1206. cmd = cmd + ' -module ' + module + ' -library ' + library
  1207. if ((COMPILER=="MSVC7") and opts.count("DXSDK")): cmd = cmd + ' -I"' + DIRECTXSDK + '/include"'
  1208. for ver in ["MAYA5","MAYA6","MAYA65"]:
  1209. if ((COMPILER=="MSVC7") and opts.count(ver)): cmd = cmd + ' -I"' + MAYASDK[ver] + '/include"'
  1210. for x in files: cmd = cmd + ' ' + x
  1211. oslocalcmd(src, cmd)
  1212. updatefiledate(outd)
  1213. updatefiledate(outc)
  1214. ########################################################################
  1215. ##
  1216. ## InterrogateModule
  1217. ##
  1218. ## Generate a python-stub CXX file from a bunch of IN files.
  1219. ##
  1220. ########################################################################
  1221. def InterrogateModule(outc=0, module=0, library=0, files=0):
  1222. if ((outc==0)|(module==0)|(library==0)|(files==0)):
  1223. sys.exit("syntax error in InterrogateModule directive")
  1224. outc = PREFIX+"/tmp/"+outc
  1225. files = xpaths(PREFIX+"/pandac/input/",files,"")
  1226. if (older(outc, files)):
  1227. global VERBOSE
  1228. if VERBOSE >= 1:
  1229. print "Generating Python-stub cxx file for %s"%(library,)
  1230. if (COMPILER=="MSVC7"):
  1231. cmd = PREFIX + '/bin/interrogate_module.exe '
  1232. if (COMPILER=="LINUXA"):
  1233. cmd = PREFIX + '/bin/interrogate_module '
  1234. cmd = cmd + ' -oc ' + outc + ' -module ' + module + ' -library ' + library + ' -python '
  1235. for x in files: cmd = cmd + ' ' + x
  1236. oscmd(cmd)
  1237. updatefiledate(outc)
  1238. ########################################################################
  1239. ##
  1240. ## CompileLIB
  1241. ##
  1242. ## Generate a LIB file from a bunch of OBJ files.
  1243. ##
  1244. ########################################################################
  1245. def CompileLIB(lib=0, obj=[], opts=[]):
  1246. if (lib==0): sys.exit("syntax error in CompileLIB directive")
  1247. if (COMPILER=="MSVC7"):
  1248. if (lib[-4:]==".ilb"): wlib = PREFIX+"/tmp/" + lib[:-4] + ".lib"
  1249. else: wlib = PREFIX+"/lib/" + lib[:-4] + ".lib"
  1250. wobj = xpaths(PREFIX+"/tmp/",obj,"")
  1251. ALLTARGETS.append(wlib)
  1252. if (older(wlib, wobj)):
  1253. cmd = 'lib.exe /nologo /OUT:' + wlib
  1254. if (OPTIMIZE==4): cmd = cmd + " /LTCG "
  1255. for x in wobj: cmd = cmd + ' ' + x
  1256. oscmd(cmd)
  1257. updatefiledate(wlib)
  1258. if (COMPILER=="LINUXA"):
  1259. if (lib[-4:]==".ilb"): wlib = PREFIX+"/tmp/" + lib[:-4] + ".a"
  1260. else: wlib = PREFIX+"/lib/" + lib[:-4] + ".a"
  1261. wobj = []
  1262. for x in obj: wobj.append(PREFIX + "/tmp/" + x[:-4] + ".o")
  1263. if (older(wlib, wobj)):
  1264. cmd = 'ar cru ' + wlib
  1265. for x in wobj: cmd=cmd + ' ' + x
  1266. oscmd(cmd)
  1267. updatefiledate(wlib)
  1268. ########################################################################
  1269. ##
  1270. ## CompileLink
  1271. ##
  1272. ## Generate a DLL or EXE file from a bunch of OBJ and LIB files.
  1273. ##
  1274. ########################################################################
  1275. def CompileLink(dll=0, obj=[], opts=[], xdep=[]):
  1276. if (dll==0): sys.exit("Syntax error in CompileLink directive")
  1277. if (COMPILER=="MSVC7"):
  1278. lib = PREFIX+"/lib/"+dll[:-4]+".lib"
  1279. if ((dll[-4:] != ".exe") and (dll[-4:] != ".dll")):
  1280. dll = PREFIX+"/plugins/"+dll
  1281. else:
  1282. dll = PREFIX+"/bin/"+dll
  1283. ALLTARGETS.append(dll)
  1284. wobj = []
  1285. for x in obj:
  1286. suffix = x[-4:]
  1287. if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x)
  1288. elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".lib")
  1289. elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x)
  1290. elif (suffix==".ilb"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".lib")
  1291. elif (suffix==".res"): wobj.append(PREFIX+"/tmp/"+x)
  1292. else: sys.exit("unknown suffix in object list.")
  1293. if (older(dll, wobj+xdep)):
  1294. cmd = 'link.exe /nologo /NODEFAULTLIB:LIBCI.LIB'
  1295. if (dll[-4:]!=".exe"): cmd = cmd + " /DLL"
  1296. if (OPTIMIZE==1): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF "
  1297. if (OPTIMIZE==2): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF "
  1298. if (OPTIMIZE==3): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF "
  1299. if (OPTIMIZE==4): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF /LTCG "
  1300. cmd = cmd + " /MAP /MAPINFO:EXPORTS /MAPINFO:LINES /fixed:no /incremental:no /stack:4194304 "
  1301. if (opts.count("NOLIBCI")): cmd = cmd + " /NODEFAULTLIB:LIBCI.LIB "
  1302. if (opts.count("MAXEGGDEF")): cmd = cmd + ' /DEF:pandatool/src/maxegg/MaxEgg.def'
  1303. cmd = cmd + ' /OUT:' + dll + ' /IMPLIB:' + lib + ' /MAP:NUL'
  1304. cmd = cmd + ' /LIBPATH:' + PREFIX + '/python/libs '
  1305. for x in wobj: cmd = cmd + ' ' + x
  1306. if (dll[-4:]==".exe"): cmd = cmd + ' ' + PREFIX + '/tmp/pandaIcon.res'
  1307. if (opts.count("D3D8") or opts.count("D3D9") or opts.count("DXDRAW") or opts.count("DXSOUND") or opts.count("DXGUID")):
  1308. cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + '/lib/x86"'
  1309. cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + '/lib"'
  1310. if (opts.count("D3D8")): cmd = cmd + ' d3d8.lib d3dx8.lib dxerr8.lib'
  1311. if (opts.count("D3D9")): cmd = cmd + ' d3d9.lib d3dx9.lib dxerr9.lib'
  1312. if (opts.count("DXDRAW")): cmd = cmd + ' ddraw.lib'
  1313. if (opts.count("DXSOUND")): cmd = cmd + ' dsound.lib'
  1314. if (opts.count("DXGUID")): cmd = cmd + ' dxguid.lib'
  1315. if (opts.count("WINSOCK")): cmd = cmd + " wsock32.lib"
  1316. if (opts.count("WINSOCK2")): cmd = cmd + " wsock32.lib ws2_32.lib"
  1317. if (opts.count("WINCOMCTL")): cmd = cmd + ' comctl32.lib'
  1318. if (opts.count("WINCOMDLG")): cmd = cmd + ' comdlg32.lib'
  1319. if (opts.count("WINUSER")): cmd = cmd + " user32.lib"
  1320. if (opts.count("WINMM")): cmd = cmd + " winmm.lib"
  1321. if (opts.count("WINIMM")): cmd = cmd + " imm32.lib"
  1322. if (opts.count("WINKERNEL")): cmd = cmd + " kernel32.lib"
  1323. if (opts.count("WINOLDNAMES")): cmd = cmd + " oldnames.lib"
  1324. if (opts.count("WINGDI")): cmd = cmd + " gdi32.lib"
  1325. if (opts.count("ADVAPI")): cmd = cmd + " advapi32.lib"
  1326. if (opts.count("GLUT")): cmd = cmd + " opengl32.lib glu32.lib"
  1327. if (PkgSelected(opts,"ZLIB")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/zlib/lib/libz.lib'
  1328. if (PkgSelected(opts,"PNG")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/png/lib/libpng.lib'
  1329. if (PkgSelected(opts,"JPEG")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/jpeg/lib/libjpeg.lib'
  1330. if (PkgSelected(opts,"TIFF")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/tiff/lib/libtiff.lib'
  1331. if (PkgSelected(opts,"VRPN")):
  1332. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/vrpn/lib/vrpn.lib'
  1333. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/vrpn/lib/quat.lib'
  1334. if (PkgSelected(opts,"FMOD")):
  1335. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/fmod/lib/fmod.lib'
  1336. if (PkgSelected(opts,"MILES")):
  1337. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/miles/lib/mss32.lib'
  1338. if (PkgSelected(opts,"NVIDIACG")):
  1339. if (opts.count("CGGL")):
  1340. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/nvidiacg/lib/cgGL.lib'
  1341. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/nvidiacg/lib/cg.lib'
  1342. if (PkgSelected(opts,"HELIX")):
  1343. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/runtlib.lib'
  1344. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/syslib.lib'
  1345. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/contlib.lib'
  1346. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/debuglib.lib'
  1347. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/utillib.lib'
  1348. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/stlport_vc7.lib'
  1349. if (PkgSelected(opts,"NSPR")):
  1350. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/nspr/lib/libnspr4.lib'
  1351. if (PkgSelected(opts,"SSL")):
  1352. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/ssl/lib/ssleay32.lib'
  1353. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/ssl/lib/libeay32.lib'
  1354. if (PkgSelected(opts,"FREETYPE")):
  1355. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/freetype/lib/libfreetype.lib'
  1356. if (PkgSelected(opts,"FFTW")):
  1357. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/fftw/lib/rfftw.lib'
  1358. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/fftw/lib/fftw.lib'
  1359. for maya in ["MAYA5","MAYA6","MAYA65"]:
  1360. if (PkgSelected(opts,maya)):
  1361. cmd = cmd + ' "' + MAYASDK[maya] + '/lib/Foundation.lib"'
  1362. cmd = cmd + ' "' + MAYASDK[maya] + '/lib/OpenMaya.lib"'
  1363. cmd = cmd + ' "' + MAYASDK[maya] + '/lib/OpenMayaAnim.lib"'
  1364. for max in ["MAX5","MAX6","MAX7"]:
  1365. if PkgSelected(opts,max):
  1366. cmd = cmd + ' "' + MAXSDK[max] + '/lib/core.lib"'
  1367. cmd = cmd + ' "' + MAXSDK[max] + '/lib/edmodel.lib"'
  1368. cmd = cmd + ' "' + MAXSDK[max] + '/lib/gfx.lib"'
  1369. cmd = cmd + ' "' + MAXSDK[max] + '/lib/geom.lib"'
  1370. cmd = cmd + ' "' + MAXSDK[max] + '/lib/mesh.lib"'
  1371. cmd = cmd + ' "' + MAXSDK[max] + '/lib/maxutil.lib"'
  1372. cmd = cmd + ' "' + MAXSDK[max] + '/lib/paramblk2.lib"'
  1373. oscmd(cmd)
  1374. updatefiledate(dll)
  1375. if ((OPTIMIZE == 1) and (dll[-4:]==".dll")):
  1376. CopyFile(dll[:-4]+"_d.dll", dll)
  1377. if (COMPILER=="LINUXA"):
  1378. ALLTARGETS.append(PREFIX+"/lib/"+dll[:-4]+".so")
  1379. if (dll[-4:]==".exe"): wdll = PREFIX+"/bin/"+dll[:-4]
  1380. else: wdll = PREFIX+"/lib/"+dll[:-4]+".so"
  1381. wobj = []
  1382. for x in obj:
  1383. suffix = x[-4:]
  1384. if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".o")
  1385. elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".so")
  1386. elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x[:-4]+".a")
  1387. elif (suffix==".ilb"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".a")
  1388. else: sys.exit("unknown suffix in object list.")
  1389. if (older(wdll, wobj+xdep)):
  1390. if (dll[-4:]==".exe"): cmd = 'g++ -o ' + wdll + ' -L' + PREFIX + '/lib'
  1391. else: cmd = 'g++ -shared -o ' + wdll + ' -L' + PREFIX + '/lib'
  1392. for x in obj:
  1393. suffix = x[-4:]
  1394. if (suffix==".obj"): cmd = cmd + ' ' + PREFIX + '/tmp/' + x[:-4] + '.o'
  1395. elif (suffix==".dll"): cmd = cmd + ' -l' + x[3:-4]
  1396. elif (suffix==".lib"): cmd = cmd + ' ' + PREFIX + '/lib/' + x[:-4] + '.a'
  1397. elif (suffix==".ilb"): cmd = cmd + ' ' + PREFIX + '/tmp/' + x[:-4] + '.a'
  1398. if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -L' + THIRDPARTY + '/linux-libs-a/fmod/lib -lfmod-3.74'
  1399. if (PkgSelected(opts,"NVIDIACG")):
  1400. cmd = cmd + ' -L' + THIRDPARTY + 'nvidiacg/lib '
  1401. if (opts.count("CGGL")): cmd = cmd + " -lCgGL"
  1402. cmd = cmd + " -lCg"
  1403. if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -L' + THIRDPARTY + '/linux-libs-a/nspr/lib -lpandanspr4'
  1404. if (PkgSelected(opts,"ZLIB")): cmd = cmd + " -lz"
  1405. if (PkgSelected(opts,"PNG")): cmd = cmd + " -lpng"
  1406. if (PkgSelected(opts,"JPEG")): cmd = cmd + " -ljpeg"
  1407. if (PkgSelected(opts,"TIFF")): cmd = cmd + " -ltiff"
  1408. if (PkgSelected(opts,"SSL")): cmd = cmd + " -lssl"
  1409. if (PkgSelected(opts,"FREETYPE")): cmd = cmd + " -lfreetype"
  1410. if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -L' + THIRDPARTY + '/linux-libs-a/vrpn/lib -lvrpn -lquat'
  1411. if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -L' + THIRDPARTY + '/linux-libs-a/fftw/lib -lrfftw -lfftw'
  1412. if (opts.count("GLUT")): cmd = cmd + " -lGL -lGLU"
  1413. oscmd(cmd)
  1414. updatefiledate(wdll)
  1415. ##########################################################################################
  1416. #
  1417. # CompileBAM
  1418. #
  1419. # Generate a BAM file from an EGG or FLT
  1420. #
  1421. ##########################################################################################
  1422. def CompileBAM(preconv, bam, egg):
  1423. dotexe = ".exe"
  1424. if (sys.platform != "win32"): dotexe = ""
  1425. if (older(bam, egg)):
  1426. if (egg[-4:]==".flt"):
  1427. oscmd(PREFIX + "/bin/flt2egg" + dotexe + " -pr " + preconv + " -o " + PREFIX + "/tmp/tmp.egg" + " " + egg)
  1428. oscmd(PREFIX + "/bin/egg2bam" + dotexe + " -o " + bam + " " + PREFIX + "/tmp/tmp.egg")
  1429. else:
  1430. oscmd(PREFIX + "/bin/egg2bam" + dotexe + " -pr " + preconv + " -o " + bam + " " + egg)
  1431. ##########################################################################################
  1432. #
  1433. # If the 'make depend' process discovers an 'include'
  1434. # directive that includes one of the following files,
  1435. # the specified file is not added as a dependency,
  1436. # nor is it traversed.
  1437. #
  1438. ##########################################################################################
  1439. CxxIgnoreHeader["Python.h"] = 1
  1440. CxxIgnoreHeader["Python/Python.h"] = 1
  1441. CxxIgnoreHeader["alloc.h"] = 1
  1442. CxxIgnoreHeader["ctype.h"] = 1
  1443. CxxIgnoreHeader["stdlib.h"] = 1
  1444. CxxIgnoreHeader["ipc_thread.h"] = 1
  1445. CxxIgnoreHeader["platform/symbian/symbian_print.h"] = 1
  1446. CxxIgnoreHeader["hxtypes.h"] = 1
  1447. CxxIgnoreHeader["hxcom.h"] = 1
  1448. CxxIgnoreHeader["hxiids.h"] = 1
  1449. CxxIgnoreHeader["hxpiids.h"] = 1
  1450. CxxIgnoreHeader["dsound.h"] = 1
  1451. CxxIgnoreHeader["hlxosstr.h"] = 1
  1452. CxxIgnoreHeader["ddraw.h"] = 1
  1453. CxxIgnoreHeader["mss.h"] = 1
  1454. CxxIgnoreHeader["MacSocket.h"] = 1
  1455. CxxIgnoreHeader["textureTransition.h"] = 1
  1456. CxxIgnoreHeader["transformTransition.h"] = 1
  1457. CxxIgnoreHeader["billboardTransition.h"] = 1
  1458. CxxIgnoreHeader["transformTransition.h"] = 1
  1459. CxxIgnoreHeader["transparencyTransition.h"] = 1
  1460. CxxIgnoreHeader["allTransitionsWrapper.h"] = 1
  1461. CxxIgnoreHeader["allTransitionsWrapper.h"] = 1
  1462. CxxIgnoreHeader["namedNode.h"] = 1
  1463. CxxIgnoreHeader["renderRelation.h"] = 1
  1464. CxxIgnoreHeader["renderTraverser.h"] = 1
  1465. CxxIgnoreHeader["get_rel_pos.h"] = 1
  1466. CxxIgnoreHeader["Max.h"] = 1
  1467. CxxIgnoreHeader["iparamb2.h"] = 1
  1468. CxxIgnoreHeader["iparamm2.h"] = 1
  1469. CxxIgnoreHeader["istdplug.h"] = 1
  1470. CxxIgnoreHeader["iskin.h"] = 1
  1471. CxxIgnoreHeader["stdmat.h"] = 1
  1472. CxxIgnoreHeader["phyexp.h"] = 1
  1473. CxxIgnoreHeader["bipexp.h"] = 1
  1474. CxxIgnoreHeader["windows.h"] = 1
  1475. CxxIgnoreHeader["windef.h"] = 1
  1476. CxxIgnoreHeader["modstack.h"] = 1
  1477. CxxIgnoreHeader["afxres.h"] = 1
  1478. ##########################################################################################
  1479. #
  1480. # Generate pandaVersion.h
  1481. #
  1482. ##########################################################################################
  1483. VERSION1=int(VERSION.split(".")[0])
  1484. VERSION2=int(VERSION.split(".")[1])
  1485. VERSION3=int(VERSION.split(".")[2])
  1486. NVERSION=VERSION1*1000000+VERSION2*1000+VERSION3
  1487. conf="""
  1488. #define PANDA_MAJOR_VERSION VERSION1
  1489. #define PANDA_MINOR_VERSION VERSION2
  1490. #define PANDA_SEQUENCE_VERSION VERSION2
  1491. #undef PANDA_OFFICIAL_VERSION
  1492. #define PANDA_VERSION NVERSION
  1493. #define PANDA_VERSION_STR "VERSION1.VERSION2.VERSION3"
  1494. #define PANDA_DISTRIBUTOR "makepanda"
  1495. """
  1496. conf = conf.replace("VERSION1",str(VERSION1))
  1497. conf = conf.replace("VERSION2",str(VERSION2))
  1498. conf = conf.replace("VERSION3",str(VERSION3))
  1499. conf = conf.replace("NVERSION",str(NVERSION))
  1500. ConditionalWriteFile(PREFIX+'/include/pandaVersion.h',conf)
  1501. conf="""
  1502. # include "dtoolbase.h"
  1503. EXPCL_DTOOL int panda_version_VERSION1_VERSION2_VERSION3 = 0;
  1504. """
  1505. conf = conf.replace("VERSION1",str(VERSION1))
  1506. conf = conf.replace("VERSION2",str(VERSION2))
  1507. conf = conf.replace("VERSION3",str(VERSION3))
  1508. conf = conf.replace("NVERSION",str(NVERSION))
  1509. ConditionalWriteFile(PREFIX+'/include/checkPandaVersion.cxx',conf)
  1510. conf="""
  1511. # include "dtoolbase.h"
  1512. extern EXPCL_DTOOL int panda_version_VERSION1_VERSION2_VERSION3;
  1513. # ifndef WIN32
  1514. /* For Windows, exporting the symbol from the DLL is sufficient; the
  1515. DLL will not load unless all expected public symbols are defined.
  1516. Other systems may not mind if the symbol is absent unless we
  1517. explictly write code that references it. */
  1518. static int check_panda_version = panda_version_VERSION1_VERSION2_VERSION3;
  1519. # endif
  1520. """
  1521. conf = conf.replace("VERSION1",str(VERSION1))
  1522. conf = conf.replace("VERSION2",str(VERSION2))
  1523. conf = conf.replace("VERSION3",str(VERSION3))
  1524. conf = conf.replace("NVERSION",str(NVERSION))
  1525. ConditionalWriteFile(PREFIX+'/include/checkPandaVersion.h',conf)
  1526. ConditionalWriteFile(PREFIX + "/tmp/pythonversion", os.path.basename(PythonSDK))
  1527. ##########################################################################################
  1528. #
  1529. # If running under windows, compile up the icon.
  1530. #
  1531. ##########################################################################################
  1532. if (sys.platform == "win32"):
  1533. IPATH=["panda/src/configfiles"]
  1534. OPTS=[]
  1535. CompileRES(ipath=IPATH, opts=OPTS, src='pandaIcon.rc', obj='pandaIcon.res')
  1536. ##########################################################################################
  1537. #
  1538. # Generate direct/__init__.py
  1539. #
  1540. ##########################################################################################
  1541. DIRECTINIT="""
  1542. import os,sys
  1543. srcdir1 = os.path.join(__path__[0], 'src')
  1544. srcdir2 = os.path.join(__path__[0], '..', '..', 'direct', 'src')
  1545. if (os.path.isdir(srcdir1)): __path__[0] = srcdir1
  1546. elif (os.path.isdir(srcdir2)): __path__[0] = srcdir2
  1547. else: sys.exit("Cannot find the 'direct' tree")
  1548. """
  1549. ConditionalWriteFile(PREFIX+'/direct/__init__.py', DIRECTINIT)
  1550. ##########################################################################################
  1551. #
  1552. # Generate dtool_have_xxx.dat
  1553. #
  1554. ##########################################################################################
  1555. for x in PACKAGES:
  1556. if (OMIT.count(x)): ConditionalWriteFile(PREFIX+'/tmp/dtool_have_'+x.lower()+'.dat',"0\n")
  1557. else: ConditionalWriteFile(PREFIX+'/tmp/dtool_have_'+x.lower()+'.dat',"1\n")
  1558. ##########################################################################################
  1559. #
  1560. # Generate dtool_config.h
  1561. #
  1562. ##########################################################################################
  1563. conf = "/* dtool_config.h. Generated automatically by makepanda.py */\n"
  1564. for key,win,unix in DTOOLDEFAULTS:
  1565. val = DTOOLCONFIG[key]
  1566. if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
  1567. else: conf = conf + "#define " + key + " " + val + "\n"
  1568. ConditionalWriteFile(PREFIX+'/include/dtool_config.h',conf)
  1569. ##########################################################################################
  1570. #
  1571. # Generate the PRC files into the ETC directory.
  1572. #
  1573. ##########################################################################################
  1574. CONFAUTOPRC="""
  1575. ###########################################################
  1576. ### ###
  1577. ### Panda3D Configuration File - Auto-Generated Portion ###
  1578. ### ###
  1579. ### Editing this file is not recommended. Most of these ###
  1580. ### directives can be overriden in Config.prc ###
  1581. ### ###
  1582. ###########################################################
  1583. # Define the display types that have been compiled in. Panda will
  1584. # pick one of these by going through the list in this order until one
  1585. # is found that works, unless the user specifically requests a
  1586. # particular display type with the load-display directive.
  1587. aux-display pandagl
  1588. aux-display pandadx9
  1589. aux-display pandadx8
  1590. aux-display pandadx7
  1591. # The egg loader is handy to have available by default. This allows
  1592. # clients to load egg files. (The bam loader is built-in so bam files
  1593. # are always loadable).
  1594. # By qualifying with the extension "egg", we indicate the egg loader
  1595. # should be made available only if you explicitly name a file with an
  1596. # .egg extension.
  1597. load-file-type egg pandaegg
  1598. # The following lines define some handy object types to use within the
  1599. # egg syntax. This remaps <ObjectType> { name } into whatever egg
  1600. # syntax is given by egg-object-type-name, which makes a handy
  1601. # abbreviation for modeling packages (like Maya) to insert
  1602. # sophisticated egg syntax into the generated egg file, using a single
  1603. # object type string.
  1604. egg-object-type-portal <Scalar> portal { 1 }
  1605. egg-object-type-polylight <Scalar> polylight { 1 }
  1606. egg-object-type-seq24 <Switch> { 1 } <Scalar> fps { 24 }
  1607. egg-object-type-seq12 <Switch> { 1 } <Scalar> fps { 12 }
  1608. egg-object-type-indexed <Scalar> indexed { 1 }
  1609. # These are just shortcuts to define the Model and DCS flags, which
  1610. # indicate nodes that should not be flattened out of the hierarchy
  1611. # during the conversion process. DCS goes one step further and
  1612. # indicates that the node's transform is important and should be
  1613. # preserved (DCS stands for Dynamic Coordinate System).
  1614. egg-object-type-model <Model> { 1 }
  1615. egg-object-type-dcs <DCS> { 1 }
  1616. # The following define various kinds of collision geometry. These
  1617. # mark the geometry at this level and below as invisible collision
  1618. # polygons, which can be used by Panda's collision system to detect
  1619. # collisions more optimally than regular visible polygons.
  1620. egg-object-type-barrier <Collide> { Polyset descend }
  1621. egg-object-type-sphere <Collide> { Sphere descend }
  1622. egg-object-type-invsphere <Collide> { InvSphere descend }
  1623. egg-object-type-tube <Collide> { Tube descend }
  1624. # As above, but these are flagged to be "intangible", so that they
  1625. # will trigger an event but not stop an object from passing through.
  1626. egg-object-type-trigger <Collide> { Polyset descend intangible }
  1627. egg-object-type-trigger-sphere <Collide> { Sphere descend intangible }
  1628. # "bubble" puts an invisible bubble around an object, but does not
  1629. # otherwise remove the geometry.
  1630. egg-object-type-bubble <Collide> { Sphere keep descend }
  1631. # "ghost" turns off the normal collide bit that is set on visible
  1632. # geometry by default, so that if you are using visible geometry for
  1633. # collisions, this particular geometry will not be part of those
  1634. # collisions--it is ghostlike.
  1635. egg-object-type-ghost <Scalar> collide-mask { 0 }
  1636. # This module allows direct loading of formats like .flt, .mb, or .dxf
  1637. load-file-type ptloader
  1638. # Define a new egg object type. See the comments in _panda.prc about this.
  1639. egg-object-type-direct-widget <Scalar> collide-mask { 0x80000000 } <Collide> { Polyset descend }
  1640. # Define a new cull bin that will render on top of everything else.
  1641. cull-bin gui-popup 60 unsorted
  1642. """
  1643. CONFIGPRC="""
  1644. ###########################################################
  1645. ### ###
  1646. ### Panda3D Configuration File - User-Editable Portion ###
  1647. ### ###
  1648. ###########################################################
  1649. # Uncomment one of the following lines to choose whether you should
  1650. # run using OpenGL or DirectX rendering.
  1651. load-display pandagl
  1652. # These control the placement and size of the default rendering window.
  1653. win-origin 100 0
  1654. win-size 800 600
  1655. # Uncomment this line if you want to run Panda fullscreen instead of
  1656. # in a window.
  1657. fullscreen #f
  1658. # If you don't object to running OpenGL in software leave the keyword
  1659. # "software" in the following line, otherwise remove it to force
  1660. # hardware only.
  1661. framebuffer-mode rgba double-buffer depth multisample hardware software
  1662. # These control the amount of output Panda gives for some various
  1663. # categories. The severity levels, in order, are "spam", "debug",
  1664. # "info", "warning", and "fatal"; the default is "info". Uncomment
  1665. # one (or define a new one for the particular category you wish to
  1666. # change) to control this output.
  1667. notify-level warning
  1668. default-directnotify-level warning
  1669. # These specify where model files may be loaded from. You probably
  1670. # want to set this to a sensible path for yourself. $THIS_PRC_DIR is
  1671. # a special variable that indicates the same directory as this
  1672. # particular Config.prc file.
  1673. model-path .
  1674. model-path $THIS_PRC_DIR/..
  1675. model-path $THIS_PRC_DIR/../models
  1676. sound-path .
  1677. sound-path $THIS_PRC_DIR/..
  1678. sound-path $THIS_PRC_DIR/../models
  1679. texture-path .
  1680. texture-path $THIS_PRC_DIR/..
  1681. texture-path $THIS_PRC_DIR/../models
  1682. # This enable the automatic creation of a TK window when running
  1683. # Direct.
  1684. want-directtools #f
  1685. want-tk #f
  1686. # This enables simple networked programs to easily provide a DC file
  1687. dc-file sample.dc
  1688. # Enable audio using the FMod audio library by default:
  1689. audio-library-name fmod_audio
  1690. """
  1691. if (sys.platform != "win32"):
  1692. CONFAUTOPRC = CONFAUTOPRC.replace("aux-display pandadx9","")
  1693. CONFAUTOPRC = CONFAUTOPRC.replace("aux-display pandadx8","")
  1694. CONFAUTOPRC = CONFAUTOPRC.replace("aux-display pandadx7","")
  1695. ConditionalWriteFile(PREFIX + "/etc/Confauto.prc", CONFAUTOPRC)
  1696. ConditionalWriteFile(PREFIX + "/etc/Config.prc", CONFIGPRC)
  1697. ##########################################################################################
  1698. #
  1699. # Copy the precompiled binaries and DLLs into the build.
  1700. #
  1701. ##########################################################################################
  1702. for pkg in (PACKAGES + ["extras"]):
  1703. if (OMIT.count(pkg)==0):
  1704. if (COMPILER == "MSVC7"):
  1705. if (os.path.exists(THIRDPARTY+"/win-libs-vc7/"+pkg.lower()+"/bin")):
  1706. CopyAllFiles(PREFIX+"/bin/",THIRDPARTY+"/win-libs-vc7/"+pkg.lower()+"/bin/")
  1707. if (COMPILER == "LINUXA"):
  1708. if (os.path.exists(THIRDPARTY+"/linux-libs-a/"+pkg.lower()+"/lib")):
  1709. CopyAllFiles(PREFIX+"/lib/",THIRDPARTY+"/linux-libs-a/"+pkg.lower()+"/lib/")
  1710. if sys.platform == "win32":
  1711. CopyTree(PREFIX+'/python', PythonSDK)
  1712. if os.path.isfile(PythonSDK+'/python22.dll'):
  1713. CopyFile(PREFIX+'/bin/', PythonSDK+'/python22.dll')
  1714. ########################################################################
  1715. ##
  1716. ## Compile the 'ppython' executable and 'genpycode' executables
  1717. ##
  1718. ########################################################################
  1719. IPATH=['direct/src/directbase']
  1720. CompileC(ipath=IPATH, opts=['BUILDING_PPYTHON'], src='ppython.cxx', obj='ppython.obj')
  1721. CompileLink(opts=['WINUSER'], dll='ppython.exe', obj=['ppython.obj'])
  1722. IPATH=['direct/src/directbase']
  1723. CompileC(ipath=IPATH, opts=['BUILDING_GENPYCODE'], src='ppython.cxx', obj='genpycode.obj')
  1724. CompileLink(opts=['WINUSER'], dll='genpycode.exe', obj=['genpycode.obj'])
  1725. ########################################################################
  1726. #
  1727. # Copy header files to the PREFIX/include directory.
  1728. #
  1729. # Are we just copying *ALL* headers into the include directory?
  1730. # If so, let's automate this.
  1731. #
  1732. # We're definitely not copying all headers. We're only copying those
  1733. # same headers that are copied by ppremake. But the bigger question
  1734. # is, did he *intend* to copy all headers? Another good question is,
  1735. # could we just put a little tag into the header file itself, indicating
  1736. # that it is meant to be copied?
  1737. #
  1738. ########################################################################
  1739. ConditionalWriteFile(PREFIX+'/include/ctl3d.h', '/* dummy file to make MAX happy */')
  1740. class FileList:
  1741. allFiles=['*']
  1742. includes=['/*_src.cxx', '/*.h', '/*.I', '/*.T']
  1743. def __init__(self):
  1744. self.files={}
  1745. def add(self, srcPattern="*"):
  1746. global VERBOSE
  1747. if VERBOSE:
  1748. print "FileList.add(\"%s\")"%(srcPattern,)
  1749. for i in glob(srcPattern):
  1750. self.files[i.replace("\\", "/")]=None
  1751. def addIncludes(self, srcPattern="."):
  1752. for i in self.includes:
  1753. self.add(srcPattern+i)
  1754. def omit(self, srcPattern="*"):
  1755. global VERBOSE
  1756. if VERBOSE:
  1757. print "FileList.omit(\"%s\")"%(srcPattern,)
  1758. for i in glob(srcPattern):
  1759. try: del self.files[i.replace("\\", "/")]
  1760. except: pass
  1761. def omitIncludes(self, srcPattern="."):
  1762. for i in self.includes:
  1763. self.omit(srcPattern+i)
  1764. def copyTo(self, dstDir="."):
  1765. global VERBOSE
  1766. if VERBOSE:
  1767. print "FileList.copyTo(\"%s\")"%(dstDir,)
  1768. for i in self.files.keys():
  1769. if os.path.isfile(i):
  1770. CopyFile(dstDir+'/'+os.path.split(i)[1], i)
  1771. fileList=FileList()
  1772. fileList.addIncludes('dtool/src/*')
  1773. fileList.addIncludes('panda/src/*')
  1774. fileList.addIncludes('pandatool/src/*')
  1775. fileList.addIncludes('pandaapp/src/*')
  1776. fileList.addIncludes('direct/src/*')
  1777. fileList.omitIncludes('dtool/src/parser-inc')
  1778. fileList.omitIncludes('dtool/src/parser-inc')
  1779. fileList.copyTo(PREFIX+'/include')
  1780. del fileList
  1781. fileList=FileList()
  1782. fileList.add('dtool/src/parser-inc/*')
  1783. fileList.copyTo(PREFIX+'/include/parser-inc')
  1784. fileList.copyTo(PREFIX+'/include/parser-inc/openssl')
  1785. del fileList
  1786. fileList=FileList()
  1787. fileList.add('dtool/src/parser-inc/cg.h')
  1788. fileList.add('dtool/src/parser-inc/cgGL.h')
  1789. fileList.copyTo(PREFIX+'/include/parser-inc/Cg')
  1790. del fileList
  1791. ########################################################################
  1792. #
  1793. # This file contains a list of all the files that need to be compiled.
  1794. #
  1795. ########################################################################
  1796. #
  1797. # DIRECTORY: dtool/src/dtoolbase/
  1798. #
  1799. IPATH=['dtool/src/dtoolbase']
  1800. OPTS=['BUILDING_DTOOL', 'NSPR']
  1801. CompileC(ipath=IPATH, opts=OPTS, src='dtoolbase.cxx', obj='dtoolbase_dtoolbase.obj')
  1802. #
  1803. # DIRECTORY: dtool/src/dtoolutil/
  1804. #
  1805. IPATH=['dtool/src/dtoolutil']
  1806. OPTS=['BUILDING_DTOOL', 'NSPR']
  1807. CompileC(ipath=IPATH, opts=OPTS, src='gnu_getopt.c', obj='dtoolutil_gnu_getopt.obj')
  1808. CompileC(ipath=IPATH, opts=OPTS, src='gnu_getopt1.c', obj='dtoolutil_gnu_getopt1.obj')
  1809. CompileC(ipath=IPATH, opts=OPTS, src='dtoolutil_composite1.cxx', obj='dtoolutil_composite1.obj')
  1810. CompileC(ipath=IPATH, opts=OPTS, src='dtoolutil_composite2.cxx', obj='dtoolutil_composite2.obj')
  1811. #
  1812. # DIRECTORY: dtool/metalibs/dtool/
  1813. #
  1814. IPATH=['dtool/metalibs/dtool']
  1815. OPTS=['BUILDING_DTOOL', 'NSPR']
  1816. CompileC(ipath=IPATH, opts=OPTS, src='dtool.cxx', obj='dtool_dtool.obj')
  1817. CompileLink(opts=['ADVAPI', 'NSPR'], dll='libdtool.dll', obj=[
  1818. 'dtool_dtool.obj',
  1819. 'dtoolutil_gnu_getopt.obj',
  1820. 'dtoolutil_gnu_getopt1.obj',
  1821. 'dtoolutil_composite1.obj',
  1822. 'dtoolutil_composite2.obj',
  1823. 'dtoolbase_dtoolbase.obj',
  1824. ])
  1825. #
  1826. # DIRECTORY: dtool/src/cppparser/
  1827. #
  1828. IPATH=['dtool/src/cppparser']
  1829. CompileBison(pre='cppyy', dstc='cppBison.cxx', dsth='cppBison.h', src='dtool/src/cppparser/cppBison.yxx')
  1830. OPTS=['NSPR']
  1831. CompileC(ipath=IPATH, opts=OPTS, src='cppParser_composite1.cxx', obj='cppParser_composite1.obj')
  1832. CompileC(ipath=IPATH, opts=OPTS, src='cppParser_composite2.cxx', obj='cppParser_composite2.obj')
  1833. CompileC(ipath=IPATH, opts=OPTS, src='cppBison.cxx', obj='cppParser_cppBison.obj')
  1834. CompileLIB(lib='libcppParser.ilb', obj=[
  1835. 'cppParser_composite1.obj',
  1836. 'cppParser_composite2.obj',
  1837. 'cppParser_cppBison.obj',
  1838. ])
  1839. #
  1840. # DIRECTORY: dtool/src/prc/
  1841. #
  1842. IPATH=['dtool/src/prc']
  1843. OPTS=['BUILDING_DTOOLCONFIG', 'SSL', 'NSPR']
  1844. CompileC(ipath=IPATH, opts=OPTS, src='prc_composite1.cxx', obj='prc_composite1.obj')
  1845. CompileC(ipath=IPATH, opts=OPTS, src='prc_composite2.cxx', obj='prc_composite2.obj')
  1846. #
  1847. # DIRECTORY: dtool/src/dconfig/
  1848. #
  1849. IPATH=['dtool/src/dconfig']
  1850. OPTS=['BUILDING_DTOOLCONFIG', 'NSPR']
  1851. CompileC(ipath=IPATH, opts=OPTS, src='dconfig_composite1.cxx', obj='dconfig_composite1.obj')
  1852. #
  1853. # DIRECTORY: dtool/src/interrogatedb/
  1854. #
  1855. IPATH=['dtool/src/interrogatedb']
  1856. OPTS=['BUILDING_DTOOLCONFIG', 'NSPR']
  1857. CompileC(ipath=IPATH, opts=OPTS, src='interrogatedb_composite1.cxx', obj='interrogatedb_composite1.obj')
  1858. CompileC(ipath=IPATH, opts=OPTS, src='interrogatedb_composite2.cxx', obj='interrogatedb_composite2.obj')
  1859. #
  1860. # DIRECTORY: dtool/metalibs/dtoolconfig/
  1861. #
  1862. IPATH=['dtool/metalibs/dtoolconfig']
  1863. OPTS=['BUILDING_DTOOLCONFIG', 'NSPR']
  1864. CompileC(ipath=IPATH, opts=OPTS, src='dtoolconfig.cxx', obj='dtoolconfig_dtoolconfig.obj')
  1865. CompileC(ipath=IPATH, opts=OPTS, src='pydtool.cxx', obj='dtoolconfig_pydtool.obj')
  1866. CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='libdtoolconfig.dll', obj=[
  1867. 'dtoolconfig_dtoolconfig.obj',
  1868. 'dtoolconfig_pydtool.obj',
  1869. 'interrogatedb_composite1.obj',
  1870. 'interrogatedb_composite2.obj',
  1871. 'dconfig_composite1.obj',
  1872. 'prc_composite1.obj',
  1873. 'prc_composite2.obj',
  1874. 'libdtool.dll',
  1875. ])
  1876. #
  1877. # DIRECTORY: dtool/src/pystub/
  1878. #
  1879. IPATH=['dtool/src/pystub']
  1880. OPTS=['BUILDING_DTOOLCONFIG', 'NSPR']
  1881. CompileC(ipath=IPATH, opts=OPTS, src='pystub.cxx', obj='pystub_pystub.obj')
  1882. CompileLink(opts=['ADVAPI', 'NSPR'], dll='libpystub.dll', obj=[
  1883. 'pystub_pystub.obj',
  1884. 'libdtool.dll',
  1885. ])
  1886. #
  1887. # DIRECTORY: dtool/src/interrogate/
  1888. #
  1889. IPATH=['dtool/src/interrogate', 'dtool/src/cppparser', 'dtool/src/interrogatedb']
  1890. OPTS=['NSPR']
  1891. CompileC(ipath=IPATH, opts=OPTS, src='interrogate_composite1.cxx', obj='interrogate_composite1.obj')
  1892. CompileC(ipath=IPATH, opts=OPTS, src='interrogate_composite2.cxx', obj='interrogate_composite2.obj')
  1893. CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='interrogate.exe', obj=[
  1894. 'interrogate_composite1.obj',
  1895. 'interrogate_composite2.obj',
  1896. 'libcppParser.ilb',
  1897. 'libpystub.dll',
  1898. 'libdtoolconfig.dll',
  1899. 'libdtool.dll',
  1900. ])
  1901. CompileC(ipath=IPATH, opts=OPTS, src='interrogate_module.cxx', obj='interrogate_module_interrogate_module.obj')
  1902. CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='interrogate_module.exe', obj=[
  1903. 'interrogate_module_interrogate_module.obj',
  1904. 'libcppParser.ilb',
  1905. 'libpystub.dll',
  1906. 'libdtoolconfig.dll',
  1907. 'libdtool.dll',
  1908. ])
  1909. CompileC(ipath=IPATH, opts=OPTS, src='parse_file.cxx', obj='parse_file_parse_file.obj')
  1910. CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='parse_file.exe', obj=[
  1911. 'parse_file_parse_file.obj',
  1912. 'libcppParser.ilb',
  1913. 'libpystub.dll',
  1914. 'libdtoolconfig.dll',
  1915. 'libdtool.dll',
  1916. ])
  1917. #
  1918. # DIRECTORY: dtool/src/prckeys/
  1919. #
  1920. if (OMIT.count("SSL")==0):
  1921. IPATH=['dtool/src/prckeys']
  1922. OPTS=['SSL', 'NSPR']
  1923. CompileC(ipath=IPATH, opts=OPTS, src='makePrcKey.cxx', obj='make-prc-key_makePrcKey.obj')
  1924. CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='make-prc-key.exe', obj=[
  1925. 'make-prc-key_makePrcKey.obj',
  1926. 'libpystub.dll',
  1927. 'libdtool.dll',
  1928. 'libdtoolconfig.dll',
  1929. ])
  1930. #
  1931. # DIRECTORY: dtool/src/test_interrogate/
  1932. #
  1933. IPATH=['dtool/src/test_interrogate']
  1934. OPTS=['NSPR']
  1935. CompileC(ipath=IPATH, opts=OPTS, src='test_interrogate.cxx', obj='test_interrogate_test_interrogate.obj')
  1936. CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='test_interrogate.exe', obj=[
  1937. 'test_interrogate_test_interrogate.obj',
  1938. 'libpystub.dll',
  1939. 'libdtoolconfig.dll',
  1940. 'libdtool.dll',
  1941. ])
  1942. #
  1943. # DIRECTORY: panda/src/pandabase/
  1944. #
  1945. IPATH=['panda/src/pandabase']
  1946. OPTS=['BUILDING_PANDAEXPRESS', 'NSPR']
  1947. CompileC(ipath=IPATH, opts=OPTS, src='pandabase.cxx', obj='pandabase_pandabase.obj')
  1948. #
  1949. # DIRECTORY: panda/src/express/
  1950. #
  1951. IPATH=['panda/src/express']
  1952. OPTS=['BUILDING_PANDAEXPRESS', 'SSL', 'ZLIB', 'NSPR']
  1953. CompileC(ipath=IPATH, opts=OPTS, src='express_composite1.cxx', obj='express_composite1.obj')
  1954. CompileC(ipath=IPATH, opts=OPTS, src='express_composite2.cxx', obj='express_composite2.obj')
  1955. Interrogate(ipath=IPATH, opts=OPTS, outd='libexpress.in', outc='libexpress_igate.cxx',
  1956. src='panda/src/express', module='pandaexpress', library='libexpress',
  1957. files=['atomicAdjustDummyImpl.h', 'atomicAdjust.h', 'atomicAdjustImpl.h', 'atomicAdjustNsprImpl.h', 'bigEndian.h', 'buffer.h', 'checksumHashGenerator.h', 'circBuffer.h', 'clockObject.h', 'conditionVarDummyImpl.h', 'conditionVar.h', 'conditionVarImpl.h', 'conditionVarNsprImpl.h', 'config_express.h', 'datagram.h', 'datagramGenerator.h', 'datagramIterator.h', 'datagramSink.h', 'dcast.h', 'encryptStreamBuf.h', 'encryptStream.h', 'error_utils.h', 'hashGeneratorBase.h', 'hashVal.h', 'indent.h', 'indirectLess.h', 'littleEndian.h', 'memoryInfo.h', 'memoryUsage.h', 'memoryUsagePointerCounts.h', 'memoryUsagePointers.h', 'multifile.h', 'mutexDummyImpl.h', 'pmutex.h', 'mutexHolder.h', 'mutexImpl.h', 'mutexNsprImpl.h', 'namable.h', 'nativeNumericData.h', 'numeric_types.h', 'ordered_vector.h', 'password_hash.h', 'patchfile.h', 'pointerTo.h', 'pointerToArray.h', 'pointerToBase.h', 'pointerToVoid.h', 'profileTimer.h', 'pta_uchar.h', 'ramfile.h', 'referenceCount.h', 'register_type.h', 'reversedNumericData.h', 'selectThreadImpl.h', 'streamReader.h', 'streamWriter.h', 'stringDecoder.h', 'subStream.h', 'subStreamBuf.h', 'textEncoder.h', 'threadDummyImpl.h', 'thread.h', 'threadImpl.h', 'threadNsprImpl.h', 'threadPriority.h', 'tokenBoard.h', 'trueClock.h', 'typeHandle.h', 'typedObject.h', 'typedReferenceCount.h', 'typedef.h', 'typeRegistry.h', 'typeRegistryNode.h', 'unicodeLatinMap.h', 'vector_uchar.h', 'virtualFileComposite.h', 'virtualFile.h', 'virtualFileList.h', 'virtualFileMount.h', 'virtualFileMountMultifile.h', 'virtualFileMountSystem.h', 'virtualFileSimple.h', 'virtualFileSystem.h', 'weakPointerTo.h', 'weakPointerToBase.h', 'weakPointerToVoid.h', 'weakReferenceList.h', 'windowsRegistry.h', 'zStream.h', 'zStreamBuf.h', 'express_composite1.cxx', 'express_composite2.cxx'])
  1958. CompileC(ipath=IPATH, opts=OPTS, src='libexpress_igate.cxx', obj='libexpress_igate.obj')
  1959. #
  1960. # DIRECTORY: panda/src/downloader/
  1961. #
  1962. IPATH=['panda/src/downloader']
  1963. OPTS=['BUILDING_PANDAEXPRESS', 'SSL', 'ZLIB', 'NSPR']
  1964. CompileC(ipath=IPATH, opts=OPTS, src='downloader_composite1.cxx', obj='downloader_composite1.obj')
  1965. CompileC(ipath=IPATH, opts=OPTS, src='downloader_composite2.cxx', obj='downloader_composite2.obj')
  1966. Interrogate(ipath=IPATH, opts=OPTS, outd='libdownloader.in', outc='libdownloader_igate.cxx',
  1967. src='panda/src/downloader', module='pandaexpress', library='libdownloader', files=[
  1968. 'config_downloader.h', 'asyncUtility.h', 'bioPtr.h', 'bioStreamPtr.h', 'bioStream.h', 'bioStreamBuf.h',
  1969. 'chunkedStream.h', 'chunkedStreamBuf.h', 'decompressor.h', 'documentSpec.h', 'downloadDb.h',
  1970. 'download_utils.h', 'extractor.h', 'httpAuthorization.h', 'httpBasicAuthorization.h', 'httpChannel.h',
  1971. 'httpClient.h', 'httpCookie.h', 'httpDate.h', 'httpDigestAuthorization.h', 'httpEntityTag.h',
  1972. 'httpEnum.h', 'identityStream.h', 'identityStreamBuf.h', 'multiplexStream.h', 'multiplexStreamBuf.h',
  1973. 'patcher.h', 'socketStream.h', 'ssl_utils.h', 'urlSpec.h',
  1974. 'downloader_composite1.cxx', 'downloader_composite2.cxx'])
  1975. CompileC(ipath=IPATH, opts=OPTS, src='libdownloader_igate.cxx', obj='libdownloader_igate.obj')
  1976. #
  1977. # DIRECTORY: panda/metalibs/pandaexpress/
  1978. #
  1979. IPATH=['panda/metalibs/pandaexpress']
  1980. OPTS=['BUILDING_PANDAEXPRESS', 'ZLIB', 'NSPR']
  1981. CompileC(ipath=IPATH, opts=OPTS, src='pandaexpress.cxx', obj='pandaexpress_pandaexpress.obj')
  1982. InterrogateModule(outc='libpandaexpress_module.cxx', module='pandaexpress', library='libpandaexpress',
  1983. files=['libdownloader.in', 'libexpress.in'])
  1984. CompileC(ipath=IPATH, opts=OPTS, src='libpandaexpress_module.cxx', obj='libpandaexpress_module.obj')
  1985. CompileLink(opts=['ADVAPI', 'WINSOCK2', 'NSPR', 'SSL', 'ZLIB'], dll='libpandaexpress.dll', obj=[
  1986. 'pandaexpress_pandaexpress.obj',
  1987. 'libpandaexpress_module.obj',
  1988. 'downloader_composite1.obj',
  1989. 'downloader_composite2.obj',
  1990. 'libdownloader_igate.obj',
  1991. 'express_composite1.obj',
  1992. 'express_composite2.obj',
  1993. 'libexpress_igate.obj',
  1994. 'pandabase_pandabase.obj',
  1995. 'libdtoolconfig.dll',
  1996. 'libdtool.dll',
  1997. ])
  1998. #
  1999. # DIRECTORY: panda/src/putil/
  2000. #
  2001. IPATH=['panda/src/putil']
  2002. OPTS=['BUILDING_PANDA', 'NSPR']
  2003. CompileC(ipath=IPATH, opts=OPTS, src='putil_composite1.cxx', obj='putil_composite1.obj')
  2004. CompileC(ipath=IPATH, opts=OPTS, src='putil_composite2.cxx', obj='putil_composite2.obj')
  2005. Interrogate(ipath=IPATH, opts=OPTS, outd='libputil.in', outc='libputil_igate.cxx',
  2006. src='panda/src/putil', module='panda', library='libputil', files=[
  2007. 'bam.h', 'bamReader.h', 'bamReaderParam.h', 'bamWriter.h', 'bitMask.h', 'buttonHandle.h',
  2008. 'buttonRegistry.h', 'cachedTypedWritableReferenceCount.h', 'collideMask.h', 'portalMask.h',
  2009. 'compareTo.h', 'config_util.h', 'configurable.h', 'cycleData.h', 'cycleDataReader.h',
  2010. 'cycleDataWriter.h', 'datagramInputFile.h', 'datagramOutputFile.h', 'drawMask.h', 'factoryBase.h',
  2011. 'factoryParam.h', 'factoryParams.h', 'firstOfPairCompare.h', 'firstOfPairLess.h',
  2012. 'globalPointerRegistry.h', 'indirectCompareNames.h', 'indirectCompareTo.h', 'ioPtaDatagramFloat.h',
  2013. 'ioPtaDatagramInt.h', 'ioPtaDatagramShort.h', 'keyboardButton.h', 'lineStream.h', 'lineStreamBuf.h',
  2014. 'load_prc_file.h', 'modifierButtons.h', 'mouseButton.h', 'mouseData.h', 'nameUniquifier.h',
  2015. 'pipeline.h', 'pipelineCycler.h', 'pipelineCyclerBase.h', 'pta_double.h', 'pta_float.h',
  2016. 'pta_int.h', 'string_utils.h', 'timedCycle.h', 'typedWritable.h', 'typedWritableReferenceCount.h',
  2017. 'updateSeq.h', 'uniqueIdAllocator.h', 'vector_double.h', 'vector_float.h', 'vector_typedWritable.h',
  2018. 'vector_ushort.h', 'vector_writable.h', 'writableConfigurable.h', 'writableParam.h',
  2019. 'putil_composite1.cxx', 'putil_composite2.cxx'])
  2020. CompileC(ipath=IPATH, opts=OPTS, src='libputil_igate.cxx', obj='libputil_igate.obj')
  2021. #
  2022. # DIRECTORY: panda/src/audio/
  2023. #
  2024. IPATH=['panda/src/audio']
  2025. OPTS=['BUILDING_PANDA', 'NSPR']
  2026. CompileC(ipath=IPATH, opts=OPTS, src='audio_composite1.cxx', obj='audio_composite1.obj')
  2027. Interrogate(ipath=IPATH, opts=OPTS, outd='libaudio.in', outc='libaudio_igate.cxx',
  2028. src='panda/src/audio', module='panda', library='libaudio',
  2029. files=['audio.h'])
  2030. CompileC(ipath=IPATH, opts=OPTS, src='libaudio_igate.cxx', obj='libaudio_igate.obj')
  2031. #
  2032. # DIRECTORY: panda/src/event/
  2033. #
  2034. IPATH=['panda/src/event']
  2035. OPTS=['BUILDING_PANDA', 'NSPR']
  2036. CompileC(ipath=IPATH, opts=OPTS, src='event_composite1.cxx', obj='event_composite1.obj')
  2037. Interrogate(ipath=IPATH, opts=OPTS, outd='libevent.in', outc='libevent_igate.cxx',
  2038. src='panda/src/event', module='panda', library='libevent', files=[
  2039. 'config_event.h', 'buttonEvent.h', 'buttonEventList.h', 'event.h', 'eventHandler.h',
  2040. 'eventParameter.h', 'eventQueue.h', 'eventReceiver.h', 'pt_Event.h', 'throw_event.h', 'event_composite1.cxx'])
  2041. CompileC(ipath=IPATH, opts=OPTS, src='libevent_igate.cxx', obj='libevent_igate.obj')
  2042. #
  2043. # DIRECTORY: panda/src/linmath/
  2044. #
  2045. IPATH=['panda/src/linmath']
  2046. OPTS=['BUILDING_PANDA', 'NSPR']
  2047. CompileC(ipath=IPATH, opts=OPTS, src='linmath_composite1.cxx', obj='linmath_composite1.obj')
  2048. CompileC(ipath=IPATH, opts=OPTS, src='linmath_composite2.cxx', obj='linmath_composite2.obj')
  2049. Interrogate(ipath=IPATH, opts=OPTS, outd='liblinmath.in', outc='liblinmath_igate.cxx',
  2050. src='panda/src/linmath', module='panda', library='liblinmath', files=[
  2051. 'compose_matrix.h', 'compose_matrix_src.h', 'config_linmath.h', 'coordinateSystem.h', 'dbl2fltnames.h', 'dblnames.h', 'deg_2_rad.h', 'flt2dblnames.h', 'fltnames.h', 'ioPtaDatagramLinMath.h', 'lcast_to.h', 'lcast_to_src.h', 'lmatrix.h', 'lmatrix3.h', 'lmatrix3_src.h', 'lmatrix4.h', 'lmatrix4_src.h', 'lorientation.h', 'lorientation_src.h', 'lpoint2.h', 'lpoint2_src.h', 'lpoint3.h', 'lpoint3_src.h', 'lpoint4.h', 'lpoint4_src.h', 'lquaternion.h', 'lquaternion_src.h', 'lrotation.h', 'lrotation_src.h', 'luse.h', 'lvec2_ops.h', 'lvec2_ops_src.h', 'lvec3_ops.h', 'lvec3_ops_src.h', 'lvec4_ops.h', 'lvec4_ops_src.h', 'lvecBase2.h', 'lvecBase2_src.h', 'lvecBase3.h', 'lvecBase3_src.h', 'lvecBase4.h', 'lvecBase4_src.h', 'lvector2.h', 'lvector2_src.h', 'lvector3.h', 'lvector3_src.h', 'lvector4.h', 'lvector4_src.h', 'mathNumbers.h', 'pta_Colorf.h', 'pta_Normalf.h', 'pta_TexCoordf.h', 'pta_Vertexf.h', 'vector_Colorf.h', 'vector_LPoint2f.h', 'vector_LVecBase3f.h', 'vector_Normalf.h', 'vector_TexCoordf.h', 'vector_Vertexf.h', 'linmath_composite1.cxx', 'linmath_composite2.cxx'])
  2052. CompileC(ipath=IPATH, opts=OPTS, src='liblinmath_igate.cxx', obj='liblinmath_igate.obj')
  2053. #
  2054. # DIRECTORY: panda/src/mathutil/
  2055. #
  2056. IPATH=['panda/src/mathutil']
  2057. OPTS=['BUILDING_PANDA', 'FFTW', 'NSPR']
  2058. CompileC(ipath=IPATH, opts=OPTS, src='mathutil_composite1.cxx', obj='mathutil_composite1.obj')
  2059. CompileC(ipath=IPATH, opts=OPTS, src='mathutil_composite2.cxx', obj='mathutil_composite2.obj')
  2060. Interrogate(ipath=IPATH, opts=OPTS, outd='libmathutil.in', outc='libmathutil_igate.cxx',
  2061. src='panda/src/mathutil', module='panda', library='libmathutil', files=[
  2062. 'boundingHexahedron.h', 'boundingLine.h', 'boundingSphere.h', 'boundingVolume.h', 'config_mathutil.h', 'fftCompressor.h', 'finiteBoundingVolume.h', 'frustum.h', 'frustum_src.h', 'geometricBoundingVolume.h', 'linmath_events.h', 'look_at.h', 'look_at_src.h', 'omniBoundingVolume.h', 'plane.h', 'plane_src.h', 'rotate_to.h', 'mathutil_composite1.cxx', 'mathutil_composite2.cxx'])
  2063. CompileC(ipath=IPATH, opts=OPTS, src='libmathutil_igate.cxx', obj='libmathutil_igate.obj')
  2064. #
  2065. # DIRECTORY: panda/src/gsgbase/
  2066. #
  2067. IPATH=['panda/src/gsgbase']
  2068. OPTS=['BUILDING_PANDA', 'NSPR']
  2069. CompileC(ipath=IPATH, opts=OPTS, src='gsgbase_composite1.cxx', obj='gsgbase_composite1.obj')
  2070. Interrogate(ipath=IPATH, opts=OPTS, outd='libgsgbase.in', outc='libgsgbase_igate.cxx',
  2071. src='panda/src/gsgbase', module='panda', library='libgsgbase', files=[
  2072. 'config_gsgbase.h', 'graphicsStateGuardianBase.h', 'gsgbase_composite1.cxx'])
  2073. CompileC(ipath=IPATH, opts=OPTS, src='libgsgbase_igate.cxx', obj='libgsgbase_igate.obj')
  2074. #
  2075. # DIRECTORY: panda/src/pnmimage/
  2076. #
  2077. IPATH=['panda/src/pnmimage']
  2078. OPTS=['BUILDING_PANDA', 'NSPR']
  2079. CompileC(ipath=IPATH, opts=OPTS, src='pnmimage_composite1.cxx', obj='pnmimage_composite1.obj')
  2080. CompileC(ipath=IPATH, opts=OPTS, src='pnmimage_composite2.cxx', obj='pnmimage_composite2.obj')
  2081. Interrogate(ipath=IPATH, opts=OPTS, outd='libpnmimage.in', outc='libpnmimage_igate.cxx',
  2082. src='panda/src/pnmimage', module='panda', library='libpnmimage', files=[
  2083. 'config_pnmimage.h', 'pnmbitio.h', 'pnmFileType.h', 'pnmFileTypeRegistry.h', 'pnmImage.h', 'pnmImageHeader.h', 'pnmReader.h', 'pnmWriter.h', 'pnmimage_base.h', 'ppmcmap.h', 'pnmimage_composite1.cxx', 'pnmimage_composite2.cxx'])
  2084. CompileC(ipath=IPATH, opts=OPTS, src='libpnmimage_igate.cxx', obj='libpnmimage_igate.obj')
  2085. #
  2086. # DIRECTORY: panda/src/net/
  2087. #
  2088. if (OMIT.count("NSPR")==0):
  2089. IPATH=['panda/src/net']
  2090. OPTS=['BUILDING_PANDA', 'NSPR']
  2091. CompileC(ipath=IPATH, opts=OPTS, src='net_composite1.cxx', obj='net_composite1.obj')
  2092. CompileC(ipath=IPATH, opts=OPTS, src='net_composite2.cxx', obj='net_composite2.obj')
  2093. Interrogate(ipath=IPATH, opts=OPTS, outd='libnet.in', outc='libnet_igate.cxx',
  2094. src='panda/src/net', module='panda', library='libnet', files=[
  2095. 'config_net.h', 'connection.h', 'connectionListener.h', 'connectionManager.h',
  2096. 'connectionReader.h', 'connectionWriter.h', 'datagramQueue.h', 'datagramTCPHeader.h',
  2097. 'datagramUDPHeader.h', 'netAddress.h', 'netDatagram.h', 'pprerror.h', 'queuedConnectionListener.h',
  2098. 'queuedConnectionManager.h', 'queuedConnectionReader.h', 'recentConnectionReader.h',
  2099. 'queuedReturn.h', 'net_composite1.cxx', 'net_composite2.cxx'])
  2100. CompileC(ipath=IPATH, opts=OPTS, src='libnet_igate.cxx', obj='libnet_igate.obj')
  2101. #
  2102. # DIRECTORY: panda/src/pstatclient/
  2103. #
  2104. IPATH=['panda/src/pstatclient']
  2105. OPTS=['BUILDING_PANDA', 'NSPR']
  2106. CompileC(ipath=IPATH, opts=OPTS, src='pstatclient_composite1.cxx', obj='pstatclient_composite1.obj')
  2107. CompileC(ipath=IPATH, opts=OPTS, src='pstatclient_composite2.cxx', obj='pstatclient_composite2.obj')
  2108. Interrogate(ipath=IPATH, opts=OPTS, outd='libpstatclient.in', outc='libpstatclient_igate.cxx',
  2109. src='panda/src/pstatclient', module='panda', library='libpstatclient', files=[
  2110. 'config_pstats.h', 'pStatClient.h', 'pStatClientImpl.h', 'pStatClientVersion.h', 'pStatClientControlMessage.h', 'pStatCollector.h', 'pStatCollectorDef.h', 'pStatFrameData.h', 'pStatProperties.h', 'pStatServerControlMessage.h', 'pStatThread.h', 'pStatTimer.h', 'pstatclient_composite1.cxx', 'pstatclient_composite2.cxx'])
  2111. CompileC(ipath=IPATH, opts=OPTS, src='libpstatclient_igate.cxx', obj='libpstatclient_igate.obj')
  2112. #
  2113. # DIRECTORY: panda/src/gobj/
  2114. #
  2115. IPATH=['panda/src/gobj']
  2116. OPTS=['BUILDING_PANDA', 'NSPR']
  2117. CompileC(ipath=IPATH, opts=OPTS, src='gobj_composite1.cxx', obj='gobj_composite1.obj')
  2118. CompileC(ipath=IPATH, opts=OPTS, src='gobj_composite2.cxx', obj='gobj_composite2.obj')
  2119. Interrogate(ipath=IPATH, opts=OPTS, outd='libgobj.in', outc='libgobj_igate.cxx',
  2120. src='panda/src/gobj', module='panda', library='libgobj', files=[
  2121. 'boundedObject.h', 'config_gobj.h', 'drawable.h', 'geom.h',
  2122. 'geomContext.h', 'geomLine.h', 'geomLinestrip.h', 'geomPoint.h',
  2123. 'geomPolygon.h', 'geomQuad.h', 'geomSphere.h', 'geomSprite.h',
  2124. 'geomTri.h', 'geomTrifan.h', 'geomTristrip.h', 'imageBuffer.h',
  2125. 'material.h', 'materialPool.h', 'matrixLens.h', 'orthographicLens.h',
  2126. 'perspectiveLens.h', 'pixelBuffer.h', 'preparedGraphicsObjects.h',
  2127. 'lens.h', 'savedContext.h', 'texture.h', 'textureContext.h',
  2128. 'texturePool.h', 'texCoordName.h', 'textureStage.h',
  2129. 'gobj_composite1.cxx', 'gobj_composite2.cxx'])
  2130. CompileC(ipath=IPATH, opts=OPTS, src='libgobj_igate.cxx', obj='libgobj_igate.obj')
  2131. #
  2132. # DIRECTORY: panda/src/lerp/
  2133. #
  2134. IPATH=['panda/src/lerp']
  2135. OPTS=['BUILDING_PANDA', 'NSPR']
  2136. CompileC(ipath=IPATH, opts=OPTS, src='lerp_composite1.cxx', obj='lerp_composite1.obj')
  2137. Interrogate(ipath=IPATH, opts=OPTS, outd='liblerp.in', outc='liblerp_igate.cxx',
  2138. src='panda/src/lerp', module='panda', library='liblerp', files=[
  2139. 'config_lerp.h', 'lerp.h', 'lerpblend.h', 'lerpfunctor.h', 'lerp_composite1.cxx'])
  2140. CompileC(ipath=IPATH, opts=OPTS, src='liblerp_igate.cxx', obj='liblerp_igate.obj')
  2141. #
  2142. # DIRECTORY: panda/src/pgraph/
  2143. #
  2144. IPATH=['panda/src/pgraph']
  2145. OPTS=['BUILDING_PANDA', 'NSPR']
  2146. CompileC(ipath=IPATH, opts=OPTS, src='nodePath.cxx', obj='pgraph_nodePath.obj')
  2147. CompileC(ipath=IPATH, opts=OPTS, src='pgraph_composite1.cxx', obj='pgraph_composite1.obj')
  2148. CompileC(ipath=IPATH, opts=OPTS, src='pgraph_composite2.cxx', obj='pgraph_composite2.obj')
  2149. Interrogate(ipath=IPATH, opts=OPTS, outd='libpgraph.in', outc='libpgraph_igate.cxx',
  2150. src='panda/src/pgraph', module='panda', library='libpgraph', files=[
  2151. 'accumulatedAttribs.h', 'alphaTestAttrib.h', 'ambientLight.h', 'auxSceneData.h', 'bamFile.h', 'billboardEffect.h', 'binCullHandler.h', 'camera.h', 'clipPlaneAttrib.h', 'colorAttrib.h', 'colorBlendAttrib.h', 'colorScaleAttrib.h', 'colorWriteAttrib.h', 'compassEffect.h', 'config_pgraph.h', 'cullBin.h', 'cullBinAttrib.h', 'cullBinBackToFront.h', 'cullBinFixed.h', 'cullBinFrontToBack.h', 'cullBinManager.h', 'cullBinUnsorted.h', 'cullFaceAttrib.h', 'cullHandler.h', 'cullResult.h', 'cullTraverser.h', 'cullTraverserData.h', 'cullableObject.h', 'decalEffect.h', 'depthOffsetAttrib.h', 'depthTestAttrib.h', 'depthWriteAttrib.h', 'directionalLight.h', 'drawCullHandler.h', 'fadeLodNode.h', 'fadeLodNodeData.h', 'findApproxLevelEntry.h', 'findApproxPath.h', 'fog.h', 'fogAttrib.h', 'geomNode.h', 'geomTransformer.h', 'lensNode.h', 'light.h', 'lightAttrib.h', 'lightLensNode.h', 'lightNode.h', 'loader.h', 'loaderFileType.h', 'loaderFileTypeBam.h', 'loaderFileTypeRegistry.h', 'lodNode.h', 'materialAttrib.h', 'modelNode.h', 'modelPool.h', 'modelRoot.h', 'nodePath.h', 'nodePath.cxx', 'nodePathCollection.h', 'nodePathComponent.h', 'nodePathLerps.h', 'pandaNode.h', 'planeNode.h', 'pointLight.h', 'polylightNode.h', 'polylightEffect.h', 'portalNode.h', 'portalClipper.h', 'renderAttrib.h', 'renderEffect.h', 'renderEffects.h', 'renderModeAttrib.h', 'renderState.h', 'rescaleNormalAttrib.h', 'sceneGraphAnalyzer.h', 'sceneGraphReducer.h', 'sceneSetup.h', 'selectiveChildNode.h', 'sequenceNode.h', 'showBoundsEffect.h', 'spotlight.h', 'switchNode.h', 'texMatrixAttrib.h', 'texProjectorEffect.h', 'textureApplyAttrib.h', 'textureAttrib.h', 'texGenAttrib.h', 'textureCollection.h', 'textureStageCollection.h', 'transformState.h', 'transparencyAttrib.h', 'weakNodePath.h', 'workingNodePath.h', 'pgraph_composite1.cxx', 'pgraph_composite2.cxx'])
  2152. CompileC(ipath=IPATH, opts=OPTS, src='libpgraph_igate.cxx', obj='libpgraph_igate.obj')
  2153. #
  2154. # DIRECTORY: panda/src/chan/
  2155. #
  2156. IPATH=['panda/src/chan']
  2157. OPTS=['BUILDING_PANDA', 'NSPR']
  2158. CompileC(ipath=IPATH, opts=OPTS, src='chan_composite1.cxx', obj='chan_composite1.obj')
  2159. CompileC(ipath=IPATH, opts=OPTS, src='chan_composite2.cxx', obj='chan_composite2.obj')
  2160. Interrogate(ipath=IPATH, opts=OPTS, outd='libchan.in', outc='libchan_igate.cxx',
  2161. src='panda/src/chan', module='panda', library='libchan', files=[
  2162. 'animBundle.h', 'animBundleNode.h', 'animChannel.h', 'animChannelBase.h', 'animChannelMatrixDynamic.h', 'animChannelMatrixXfmTable.h', 'animChannelScalarDynamic.h', 'animChannelScalarTable.h', 'animControl.h', 'animControlCollection.h', 'animGroup.h', 'auto_bind.h', 'config_chan.h', 'movingPartBase.h', 'movingPartMatrix.h', 'movingPartScalar.h', 'partBundle.h', 'partBundleNode.h', 'partGroup.h', 'vector_PartGroupStar.h', 'chan_composite1.cxx', 'chan_composite2.cxx'])
  2163. CompileC(ipath=IPATH, opts=OPTS, src='libchan_igate.cxx', obj='libchan_igate.obj')
  2164. #
  2165. # DIRECTORY: panda/src/char/
  2166. #
  2167. IPATH=['panda/src/char']
  2168. OPTS=['BUILDING_PANDA', 'NSPR']
  2169. CompileC(ipath=IPATH, opts=OPTS, src='char_composite1.cxx', obj='char_composite1.obj')
  2170. CompileC(ipath=IPATH, opts=OPTS, src='char_composite2.cxx', obj='char_composite2.obj')
  2171. Interrogate(ipath=IPATH, opts=OPTS, outd='libchar.in', outc='libchar_igate.cxx',
  2172. src='panda/src/char', module='panda', library='libchar', files=[
  2173. 'character.h', 'characterJoint.h', 'characterJointBundle.h', 'characterSlider.h', 'computedVertices.h', 'computedVerticesMorph.h', 'config_char.h', 'dynamicVertices.h', 'char_composite1.cxx', 'char_composite2.cxx'])
  2174. CompileC(ipath=IPATH, opts=OPTS, src='libchar_igate.cxx', obj='libchar_igate.obj')
  2175. #
  2176. # DIRECTORY: panda/src/dgraph/
  2177. #
  2178. IPATH=['panda/src/dgraph']
  2179. OPTS=['BUILDING_PANDA', 'NSPR']
  2180. CompileC(ipath=IPATH, opts=OPTS, src='dgraph_composite1.cxx', obj='dgraph_composite1.obj')
  2181. CompileC(ipath=IPATH, opts=OPTS, src='dgraph_composite2.cxx', obj='dgraph_composite2.obj')
  2182. Interrogate(ipath=IPATH, opts=OPTS, outd='libdgraph.in', outc='libdgraph_igate.cxx',
  2183. src='panda/src/dgraph', module='panda', library='libdgraph', files=[
  2184. 'config_dgraph.h', 'dataGraphTraverser.h', 'dataNode.h', 'dataNodeTransmit.h', 'dgraph_composite1.cxx', 'dgraph_composite2.cxx'])
  2185. CompileC(ipath=IPATH, opts=OPTS, src='libdgraph_igate.cxx', obj='libdgraph_igate.obj')
  2186. #
  2187. # DIRECTORY: panda/src/display/
  2188. #
  2189. IPATH=['panda/src/display']
  2190. OPTS=['BUILDING_PANDA', 'NSPR']
  2191. CompileC(ipath=IPATH, opts=OPTS, src='display_composite1.cxx', obj='display_composite1.obj')
  2192. CompileC(ipath=IPATH, opts=OPTS, src='display_composite2.cxx', obj='display_composite2.obj')
  2193. Interrogate(ipath=IPATH, opts=OPTS, outd='libdisplay.in', outc='libdisplay_igate.cxx',
  2194. src='panda/src/display', module='panda', library='libdisplay', files=[
  2195. 'config_display.h', 'drawableRegion.h', 'displayRegion.h', 'displayRegionStack.h', 'frameBufferProperties.h', 'frameBufferStack.h', 'graphicsEngine.h', 'graphicsOutput.h', 'graphicsBuffer.h', 'graphicsPipe.h', 'graphicsPipeSelection.h', 'graphicsStateGuardian.h', 'graphicsThreadingModel.h', 'graphicsWindow.h', 'graphicsWindowInputDevice.h', 'graphicsDevice.h', 'parasiteBuffer.h', 'windowProperties.h', 'lensStack.h', 'savedFrameBuffer.h', 'display_composite1.cxx', 'display_composite2.cxx'])
  2196. CompileC(ipath=IPATH, opts=OPTS, src='libdisplay_igate.cxx', obj='libdisplay_igate.obj')
  2197. #
  2198. # DIRECTORY: panda/src/device/
  2199. #
  2200. IPATH=['panda/src/device']
  2201. OPTS=['BUILDING_PANDA', 'NSPR']
  2202. CompileC(ipath=IPATH, opts=OPTS, src='device_composite1.cxx', obj='device_composite1.obj')
  2203. CompileC(ipath=IPATH, opts=OPTS, src='device_composite2.cxx', obj='device_composite2.obj')
  2204. Interrogate(ipath=IPATH, opts=OPTS, outd='libdevice.in', outc='libdevice_igate.cxx',
  2205. src='panda/src/device', module='panda', library='libdevice', files=[
  2206. 'analogNode.h', 'buttonNode.h', 'clientAnalogDevice.h', 'clientBase.h', 'clientButtonDevice.h', 'clientDevice.h', 'clientDialDevice.h', 'clientTrackerDevice.h', 'config_device.h', 'dialNode.h', 'mouseAndKeyboard.h', 'trackerData.h', 'trackerNode.h', 'virtualMouse.h', 'device_composite1.cxx', 'device_composite2.cxx'])
  2207. CompileC(ipath=IPATH, opts=OPTS, src='libdevice_igate.cxx', obj='libdevice_igate.obj')
  2208. #
  2209. # DIRECTORY: panda/src/tform/
  2210. #
  2211. IPATH=['panda/src/tform']
  2212. OPTS=['BUILDING_PANDA', 'NSPR']
  2213. CompileC(ipath=IPATH, opts=OPTS, src='tform_composite1.cxx', obj='tform_composite1.obj')
  2214. CompileC(ipath=IPATH, opts=OPTS, src='tform_composite2.cxx', obj='tform_composite2.obj')
  2215. Interrogate(ipath=IPATH, opts=OPTS, outd='libtform.in', outc='libtform_igate.cxx',
  2216. src='panda/src/tform', module='panda', library='libtform', files=[
  2217. 'buttonThrower.h', 'config_tform.h', 'driveInterface.h', 'mouseInterfaceNode.h', 'mouseWatcher.h', 'mouseWatcherGroup.h', 'mouseWatcherParameter.h', 'mouseWatcherRegion.h', 'trackball.h', 'transform2sg.h', 'tform_composite1.cxx', 'tform_composite2.cxx'])
  2218. CompileC(ipath=IPATH, opts=OPTS, src='libtform_igate.cxx', obj='libtform_igate.obj')
  2219. #
  2220. # DIRECTORY: panda/src/collide/
  2221. #
  2222. IPATH=['panda/src/collide']
  2223. OPTS=['BUILDING_PANDA', 'NSPR']
  2224. CompileC(ipath=IPATH, opts=OPTS, src='collide_composite1.cxx', obj='collide_composite1.obj')
  2225. CompileC(ipath=IPATH, opts=OPTS, src='collide_composite2.cxx', obj='collide_composite2.obj')
  2226. Interrogate(ipath=IPATH, opts=OPTS, outd='libcollide.in', outc='libcollide_igate.cxx',
  2227. src='panda/src/collide', module='panda', library='libcollide', files=[
  2228. 'collisionEntry.h', 'collisionHandler.h', 'collisionHandlerEvent.h', 'collisionHandlerFloor.h', 'collisionHandlerGravity.h', 'collisionHandlerPhysical.h', 'collisionHandlerPusher.h', 'collisionHandlerQueue.h', 'collisionInvSphere.h', 'collisionLine.h', 'collisionLevelState.h', 'collisionNode.h', 'collisionPlane.h', 'collisionPolygon.h', 'collisionRay.h', 'collisionRecorder.h', 'collisionSegment.h', 'collisionSolid.h', 'collisionSphere.h', 'collisionTraverser.h', 'collisionTube.h', 'collisionVisualizer.h', 'config_collide.h', 'collide_composite1.cxx', 'collide_composite2.cxx'])
  2229. CompileC(ipath=IPATH, opts=OPTS, src='libcollide_igate.cxx', obj='libcollide_igate.obj')
  2230. #
  2231. # DIRECTORY: panda/src/pnmtext/
  2232. #
  2233. if (OMIT.count("FREETYPE")==0):
  2234. IPATH=['panda/src/pnmtext']
  2235. OPTS=['BUILDING_PANDA', 'NSPR', 'FREETYPE']
  2236. CompileC(ipath=IPATH, opts=OPTS, src='config_pnmtext.cxx', obj='pnmtext_config_pnmtext.obj')
  2237. CompileC(ipath=IPATH, opts=OPTS, src='freetypeFont.cxx', obj='pnmtext_freetypeFont.obj')
  2238. CompileC(ipath=IPATH, opts=OPTS, src='pnmTextGlyph.cxx', obj='pnmtext_pnmTextGlyph.obj')
  2239. CompileC(ipath=IPATH, opts=OPTS, src='pnmTextMaker.cxx', obj='pnmtext_pnmTextMaker.obj')
  2240. #
  2241. # DIRECTORY: panda/src/text/
  2242. #
  2243. IPATH=['panda/src/text']
  2244. OPTS=['BUILDING_PANDA', 'ZLIB', 'NSPR', 'FREETYPE']
  2245. CompileC(ipath=IPATH, opts=OPTS, src='text_composite1.cxx', obj='text_composite1.obj')
  2246. CompileC(ipath=IPATH, opts=OPTS, src='text_composite2.cxx', obj='text_composite2.obj')
  2247. Interrogate(ipath=IPATH, opts=OPTS, outd='libtext.in', outc='libtext_igate.cxx',
  2248. src='panda/src/text', module='panda', library='libtext', files=[
  2249. 'config_text.h', 'default_font.h', 'dynamicTextFont.h', 'dynamicTextGlyph.h', 'dynamicTextPage.h', 'fontPool.h', 'geomTextGlyph.h', 'staticTextFont.h', 'textAssembler.h', 'textFont.h', 'textGlyph.h', 'textNode.h', 'textProperties.h', 'textPropertiesManager.h', 'text_composite1.cxx', 'text_composite2.cxx'])
  2250. CompileC(ipath=IPATH, opts=OPTS, src='libtext_igate.cxx', obj='libtext_igate.obj')
  2251. #
  2252. # DIRECTORY: panda/src/grutil/
  2253. #
  2254. IPATH=['panda/src/grutil']
  2255. OPTS=['BUILDING_PANDA', 'NSPR']
  2256. CompileC(ipath=IPATH, opts=OPTS, src='multitexReducer.cxx', obj='grutil_multitexReducer.obj')
  2257. CompileC(ipath=IPATH, opts=OPTS, src='grutil_composite1.cxx', obj='grutil_composite1.obj')
  2258. Interrogate(ipath=IPATH, opts=OPTS, outd='libgrutil.in', outc='libgrutil_igate.cxx',
  2259. src='panda/src/grutil', module='panda', library='libgrutil', files=[
  2260. 'cardMaker.h', 'config_grutil.h', 'frameRateMeter.h', 'lineSegs.h', 'multitexReducer.h', 'multitexReducer.cxx', 'grutil_composite1.cxx'])
  2261. CompileC(ipath=IPATH, opts=OPTS, src='libgrutil_igate.cxx', obj='libgrutil_igate.obj')
  2262. #
  2263. # DIRECTORY: panda/src/gsgmisc/
  2264. #
  2265. IPATH=['panda/src/gsgmisc']
  2266. OPTS=['BUILDING_PANDA', 'NSPR']
  2267. CompileC(ipath=IPATH, opts=OPTS, src='geomIssuer.cxx', obj='gsgmisc_geomIssuer.obj')
  2268. #
  2269. # DIRECTORY: panda/src/helix/
  2270. #
  2271. if (OMIT.count("HELIX")==0):
  2272. IPATH=['panda/src/helix']
  2273. OPTS=['BUILDING_PANDA', 'NSPR', 'HELIX']
  2274. CompileC(ipath=IPATH, opts=OPTS, src='config_helix.cxx', obj='helix_config_helix.obj')
  2275. CompileC(ipath=IPATH, opts=OPTS, src='fivemmap.cxx', obj='helix_fivemmap.obj')
  2276. CompileC(ipath=IPATH, opts=OPTS, src='HelixClient.cxx', obj='helix_HelixClient.obj')
  2277. CompileC(ipath=IPATH, opts=OPTS, src='HxAdviseSink.cxx', obj='helix_HxAdviseSink.obj')
  2278. CompileC(ipath=IPATH, opts=OPTS, src='HxAuthenticationManager.cxx', obj='helix_HxAuthenticationManager.obj')
  2279. CompileC(ipath=IPATH, opts=OPTS, src='HxClientContext.cxx', obj='helix_HxClientContext.obj')
  2280. CompileC(ipath=IPATH, opts=OPTS, src='HxErrorSink.cxx', obj='helix_HxErrorSink.obj')
  2281. CompileC(ipath=IPATH, opts=OPTS, src='HxSiteSupplier.cxx', obj='helix_HxSiteSupplier.obj')
  2282. CompileC(ipath=IPATH, opts=OPTS, src='iids.cxx', obj='helix_iids.obj')
  2283. CompileC(ipath=IPATH, opts=OPTS, src='print.cxx', obj='helix_print.obj')
  2284. Interrogate(ipath=IPATH, opts=OPTS, outd='libhelix.in', outc='libhelix_igate.cxx',
  2285. src='panda/src/helix', module='panda', library='libhelix', files=['HelixClient.cxx'])
  2286. CompileC(ipath=IPATH, opts=OPTS, src='libhelix_igate.cxx', obj='libhelix_igate.obj')
  2287. CompileLIB(lib='libhelix.ilb', obj=[
  2288. 'helix_config_helix.obj',
  2289. 'helix_fivemmap.obj',
  2290. 'helix_HelixClient.obj',
  2291. 'helix_HxAdviseSink.obj',
  2292. 'helix_HxAuthenticationManager.obj',
  2293. 'helix_HxClientContext.obj',
  2294. 'helix_HxErrorSink.obj',
  2295. 'helix_HxSiteSupplier.obj',
  2296. 'helix_iids.obj',
  2297. 'helix_print.obj',
  2298. 'libhelix_igate.obj'])
  2299. #
  2300. # DIRECTORY: panda/src/parametrics/
  2301. #
  2302. IPATH=['panda/src/parametrics']
  2303. OPTS=['BUILDING_PANDA', 'NSPR']
  2304. CompileC(ipath=IPATH, opts=OPTS, src='parametrics_composite1.cxx', obj='parametrics_composite1.obj')
  2305. CompileC(ipath=IPATH, opts=OPTS, src='parametrics_composite2.cxx', obj='parametrics_composite2.obj')
  2306. Interrogate(ipath=IPATH, opts=OPTS, outd='libparametrics.in', outc='libparametrics_igate.cxx',
  2307. src='panda/src/parametrics', module='panda', library='libparametrics', files=[
  2308. 'classicNurbsCurve.h', 'config_parametrics.h', 'cubicCurveseg.h', 'parametricCurveDrawer.h',
  2309. 'curveFitter.h', 'hermiteCurve.h', 'nurbsCurve.h', 'nurbsCurveDrawer.h', 'nurbsCurveEvaluator.h',
  2310. 'nurbsCurveInterface.h', 'nurbsCurveResult.h', 'nurbsBasisVector.h', 'nurbsSurfaceEvaluator.h',
  2311. 'nurbsSurfaceResult.h', 'nurbsVertex.h', 'parametricCurve.h', 'parametricCurveCollection.h',
  2312. 'piecewiseCurve.h', 'ropeNode.h', 'sheetNode.h', 'parametrics_composite1.cxx', 'parametrics_composite2.cxx'])
  2313. CompileC(ipath=IPATH, opts=OPTS, src='libparametrics_igate.cxx', obj='libparametrics_igate.obj')
  2314. #
  2315. # DIRECTORY: panda/src/pgui/
  2316. #
  2317. IPATH=['panda/src/pgui']
  2318. OPTS=['BUILDING_PANDA', 'NSPR']
  2319. CompileC(ipath=IPATH, opts=OPTS, src='pgui_composite1.cxx', obj='pgui_composite1.obj')
  2320. CompileC(ipath=IPATH, opts=OPTS, src='pgui_composite2.cxx', obj='pgui_composite2.obj')
  2321. Interrogate(ipath=IPATH, opts=OPTS, outd='libpgui.in', outc='libpgui_igate.cxx',
  2322. src='panda/src/pgui', module='panda', library='libpgui', files=[
  2323. 'config_pgui.h', 'pgButton.h', 'pgSliderButton.h', 'pgCullTraverser.h', 'pgEntry.h',
  2324. 'pgMouseWatcherGroup.h', 'pgMouseWatcherParameter.h', 'pgFrameStyle.h', 'pgItem.h',
  2325. 'pgMouseWatcherBackground.h', 'pgMouseWatcherRegion.h', 'pgTop.h', 'pgWaitBar.h', 'pgSliderBar.h',
  2326. 'pgui_composite1.cxx', 'pgui_composite2.cxx'])
  2327. CompileC(ipath=IPATH, opts=OPTS, src='libpgui_igate.cxx', obj='libpgui_igate.obj')
  2328. #
  2329. # DIRECTORY: panda/src/pnmimagetypes/
  2330. #
  2331. IPATH=['panda/src/pnmimagetypes', 'panda/src/pnmimage']
  2332. OPTS=['BUILDING_PANDA', 'PNG', 'ZLIB', 'JPEG', 'ZLIB', 'NSPR', 'JPEG', 'TIFF']
  2333. CompileC(ipath=IPATH, opts=OPTS, src='pnmFileTypePNG.cxx', obj='pnmimagetypes_pnmFileTypePNG.obj')
  2334. CompileC(ipath=IPATH, opts=OPTS, src='pnmFileTypeTIFF.cxx', obj='pnmimagetypes_pnmFileTypeTIFF.obj')
  2335. CompileC(ipath=IPATH, opts=OPTS, src='pnmimagetypes_composite1.cxx', obj='pnmimagetypes_composite1.obj')
  2336. CompileC(ipath=IPATH, opts=OPTS, src='pnmimagetypes_composite2.cxx', obj='pnmimagetypes_composite2.obj')
  2337. #
  2338. # DIRECTORY: panda/src/recorder/
  2339. #
  2340. IPATH=['panda/src/recorder']
  2341. OPTS=['BUILDING_PANDA', 'NSPR']
  2342. CompileC(ipath=IPATH, opts=OPTS, src='recorder_composite1.cxx', obj='recorder_composite1.obj')
  2343. CompileC(ipath=IPATH, opts=OPTS, src='recorder_composite2.cxx', obj='recorder_composite2.obj')
  2344. Interrogate(ipath=IPATH, opts=OPTS, outd='librecorder.in', outc='librecorder_igate.cxx',
  2345. src='panda/src/recorder', module='panda', library='librecorder', files=[
  2346. 'config_recorder.h', 'mouseRecorder.h', 'recorderBase.h', 'recorderController.h', 'recorderFrame.h', 'recorderHeader.h', 'recorderTable.h', 'socketStreamRecorder.h', 'recorder_composite1.cxx', 'recorder_composite2.cxx'])
  2347. CompileC(ipath=IPATH, opts=OPTS, src='librecorder_igate.cxx', obj='librecorder_igate.obj')
  2348. #
  2349. # DIRECTORY: panda/src/vrpn/
  2350. #
  2351. if (OMIT.count("VRPN")==0):
  2352. IPATH=['panda/src/vrpn']
  2353. OPTS=['BUILDING_PANDA', 'NSPR', 'VRPN']
  2354. CompileC(ipath=IPATH, opts=OPTS, src='vrpn_composite1.cxx', obj='pvrpn_composite1.obj')
  2355. Interrogate(ipath=IPATH, opts=OPTS, outd='libpvrpn.in', outc='libpvrpn_igate.cxx',
  2356. src='panda/src/vrpn', module='panda', library='libpvrpn', files=[
  2357. 'config_vrpn.cxx', 'config_vrpn.h', 'vrpnClient.cxx', 'vrpnAnalog.cxx', 'vrpnAnalog.h',
  2358. 'vrpnAnalogDevice.cxx', 'vrpnAnalogDevice.h', 'vrpnButton.cxx', 'vrpnButton.h',
  2359. 'vrpnButtonDevice.cxx', 'vrpnButtonDevice.h', 'vrpnClient.h', 'vrpnDial.cxx', 'vrpnDial.h',
  2360. 'vrpnDialDevice.cxx', 'vrpnDialDevice.h', 'vrpnTracker.cxx', 'vrpnTracker.h', 'vrpnTrackerDevice.cxx',
  2361. 'vrpnTrackerDevice.h', 'vrpn_interface.h'])
  2362. CompileC(ipath=IPATH, opts=OPTS, src='libpvrpn_igate.cxx', obj='libpvrpn_igate.obj')
  2363. #
  2364. # DIRECTORY: panda/metalibs/panda/
  2365. #
  2366. IPATH=['panda/metalibs/panda']
  2367. OPTS=['BUILDING_PANDA', 'ZLIB', 'VRPN', 'JPEG', 'PNG', 'TIFF', 'NSPR', 'FREETYPE', 'HELIX', 'FFTW',
  2368. 'ADVAPI', 'WINSOCK2', 'WINUSER', 'WINMM']
  2369. INFILES=['librecorder.in', 'libpgraph.in', 'libgrutil.in', 'libchan.in', 'libpstatclient.in',
  2370. 'libchar.in', 'libcollide.in', 'libdevice.in', 'libdgraph.in', 'libdisplay.in', 'libevent.in',
  2371. 'libgobj.in', 'libgsgbase.in', 'liblinmath.in', 'libmathutil.in', 'libparametrics.in',
  2372. 'libpnmimage.in', 'libtext.in', 'libtform.in', 'liblerp.in', 'libputil.in', 'libaudio.in',
  2373. 'libpgui.in']
  2374. OBJFILES=['panda_panda.obj', 'libpanda_module.obj', 'recorder_composite1.obj',
  2375. 'recorder_composite2.obj', 'librecorder_igate.obj',
  2376. 'pgraph_nodePath.obj', 'pgraph_composite1.obj', 'pgraph_composite2.obj', 'libpgraph_igate.obj',
  2377. 'grutil_multitexReducer.obj', 'grutil_composite1.obj', 'libgrutil_igate.obj',
  2378. 'chan_composite1.obj', 'chan_composite2.obj', 'libchan_igate.obj', 'pstatclient_composite1.obj',
  2379. 'pstatclient_composite2.obj', 'libpstatclient_igate.obj', 'char_composite1.obj',
  2380. 'char_composite2.obj', 'libchar_igate.obj', 'collide_composite1.obj', 'collide_composite2.obj',
  2381. 'libcollide_igate.obj', 'device_composite1.obj', 'device_composite2.obj', 'libdevice_igate.obj',
  2382. 'dgraph_composite1.obj', 'dgraph_composite2.obj', 'libdgraph_igate.obj', 'display_composite1.obj',
  2383. 'display_composite2.obj', 'libdisplay_igate.obj', 'event_composite1.obj', 'libevent_igate.obj',
  2384. 'gobj_composite1.obj', 'gobj_composite2.obj', 'libgobj_igate.obj', 'gsgbase_composite1.obj',
  2385. 'libgsgbase_igate.obj', 'gsgmisc_geomIssuer.obj', 'linmath_composite1.obj',
  2386. 'linmath_composite2.obj', 'liblinmath_igate.obj',
  2387. 'mathutil_composite1.obj', 'mathutil_composite2.obj', 'libmathutil_igate.obj',
  2388. 'parametrics_composite1.obj', 'parametrics_composite2.obj', 'libparametrics_igate.obj',
  2389. 'pnmimagetypes_pnmFileTypePNG.obj', 'pnmimagetypes_pnmFileTypeTIFF.obj', 'pnmimagetypes_composite1.obj',
  2390. 'pnmimagetypes_composite2.obj', 'pnmimage_composite1.obj', 'pnmimage_composite2.obj', 'libpnmimage_igate.obj',
  2391. 'text_composite1.obj', 'text_composite2.obj', 'libtext_igate.obj',
  2392. 'tform_composite1.obj', 'tform_composite2.obj',
  2393. 'libtform_igate.obj', 'lerp_composite1.obj', 'liblerp_igate.obj',
  2394. 'putil_composite1.obj', 'putil_composite2.obj', 'libputil_igate.obj',
  2395. 'audio_composite1.obj', 'libaudio_igate.obj', 'pgui_composite1.obj', 'pgui_composite2.obj',
  2396. 'libpgui_igate.obj', 'pandabase_pandabase.obj', 'libpandaexpress.dll', 'libdtoolconfig.dll', 'libdtool.dll']
  2397. if OMIT.count("HELIX")==0:
  2398. OBJFILES.append("libhelix.ilb")
  2399. INFILES.append("libhelix.in")
  2400. if OMIT.count("VRPN")==0:
  2401. OBJFILES.append("pvrpn_composite1.obj")
  2402. OBJFILES.append("libpvrpn_igate.obj")
  2403. INFILES.append("libpvrpn.in")
  2404. if OMIT.count("NSPR")==0:
  2405. OBJFILES.append("net_composite1.obj")
  2406. OBJFILES.append("net_composite2.obj")
  2407. OBJFILES.append("libnet_igate.obj")
  2408. INFILES.append("libnet.in")
  2409. if OMIT.count("FREETYPE")==0:
  2410. OBJFILES.append("pnmtext_config_pnmtext.obj")
  2411. OBJFILES.append("pnmtext_freetypeFont.obj")
  2412. OBJFILES.append("pnmtext_pnmTextGlyph.obj")
  2413. OBJFILES.append("pnmtext_pnmTextMaker.obj")
  2414. InterrogateModule(outc='libpanda_module.cxx', module='panda', library='libpanda', files=INFILES)
  2415. CompileC(ipath=IPATH, opts=OPTS, src='panda.cxx', obj='panda_panda.obj')
  2416. CompileC(ipath=IPATH, opts=OPTS, src='libpanda_module.cxx', obj='libpanda_module.obj')
  2417. CompileLink(opts=OPTS, dll='libpanda.dll', obj=OBJFILES, xdep=[
  2418. PREFIX+'/tmp/dtool_have_helix.dat',
  2419. PREFIX+'/tmp/dtool_have_vrpn.dat',
  2420. PREFIX+'/tmp/dtool_have_nspr.dat',
  2421. PREFIX+'/tmp/dtool_have_freetype.dat',
  2422. ])
  2423. #
  2424. # DIRECTORY: panda/src/audiotraits/
  2425. #
  2426. if OMIT.count("FMOD") == 0:
  2427. IPATH=['panda/src/audiotraits']
  2428. OPTS=['BUILDING_FMOD_AUDIO', 'NSPR', 'FMOD']
  2429. CompileC(ipath=IPATH, opts=OPTS, src='fmod_audio_composite1.cxx', obj='fmod_audio_fmod_audio_composite1.obj')
  2430. CompileLink(opts=['ADVAPI', 'WINUSER', 'WINMM', 'FMOD', 'NSPR'], dll='libfmod_audio.dll', obj=[
  2431. 'fmod_audio_fmod_audio_composite1.obj',
  2432. 'libpanda.dll',
  2433. 'libpandaexpress.dll',
  2434. 'libdtoolconfig.dll',
  2435. 'libdtool.dll',
  2436. ])
  2437. if OMIT.count("MILES") == 0:
  2438. IPATH=['panda/src/audiotraits']
  2439. OPTS=['BUILDING_MILES_AUDIO', 'NSPR', 'MILES']
  2440. CompileC(ipath=IPATH, opts=OPTS, src='miles_audio_composite1.cxx', obj='miles_audio_miles_audio_composite1.obj')
  2441. CompileLink(opts=['ADVAPI', 'WINUSER', 'WINMM', 'MILES', 'NSPR'], dll='libmiles_audio.dll', obj=[
  2442. 'miles_audio_miles_audio_composite1.obj',
  2443. 'libpanda.dll',
  2444. 'libpandaexpress.dll',
  2445. 'libdtoolconfig.dll',
  2446. 'libdtool.dll',
  2447. ])
  2448. #
  2449. # DIRECTORY: panda/src/builder/
  2450. #
  2451. IPATH=['panda/src/builder']
  2452. OPTS=['BUILDING_PANDAEGG', 'NSPR']
  2453. CompileC(ipath=IPATH, opts=OPTS, src='builder_composite1.cxx', obj='builder_composite1.obj')
  2454. CompileC(ipath=IPATH, opts=OPTS, src='builder_composite2.cxx', obj='builder_composite2.obj')
  2455. #
  2456. # DIRECTORY: panda/src/distort/
  2457. #
  2458. IPATH=['panda/src/distort']
  2459. OPTS=['BUILDING_PANDAFX', 'NSPR']
  2460. CompileC(ipath=IPATH, opts=OPTS, src='distort_composite1.cxx', obj='distort_composite1.obj')
  2461. Interrogate(ipath=IPATH, opts=OPTS, outd='libdistort.in', outc='libdistort_igate.cxx',
  2462. src='panda/src/distort', module='pandafx', library='libdistort',
  2463. files=['config_distort.h', 'projectionScreen.h', 'cylindricalLens.h', 'fisheyeLens.h', 'nonlinearImager.h', 'pSphereLens.h', 'distort_composite1.cxx'])
  2464. CompileC(ipath=IPATH, opts=OPTS, src='libdistort_igate.cxx', obj='libdistort_igate.obj')
  2465. #
  2466. # DIRECTORY: panda/src/downloadertools/
  2467. #
  2468. if OMIT.count("SSL")==0:
  2469. IPATH=['panda/src/downloadertools']
  2470. OPTS=['SSL', 'ZLIB', 'NSPR']
  2471. CompileC(ipath=IPATH, opts=OPTS, src='apply_patch.cxx', obj='apply_patch_apply_patch.obj')
  2472. CompileLink(dll='apply_patch.exe', opts=['ADVAPI', 'NSPR'], obj=[
  2473. 'apply_patch_apply_patch.obj',
  2474. 'libpandaexpress.dll',
  2475. 'libpanda.dll',
  2476. 'libdtoolconfig.dll',
  2477. 'libdtool.dll',
  2478. 'libpystub.dll',
  2479. ])
  2480. CompileC(ipath=IPATH, opts=OPTS, src='build_patch.cxx', obj='build_patch_build_patch.obj')
  2481. CompileLink(dll='build_patch.exe', opts=['ADVAPI', 'NSPR'], obj=[
  2482. 'build_patch_build_patch.obj',
  2483. 'libpandaexpress.dll',
  2484. 'libpanda.dll',
  2485. 'libdtoolconfig.dll',
  2486. 'libdtool.dll',
  2487. 'libpystub.dll',
  2488. ])
  2489. IPATH=['panda/src/downloadertools']
  2490. OPTS=['SSL', 'ZLIB', 'ZLIB', 'NSPR']
  2491. CompileC(ipath=IPATH, opts=OPTS, src='check_adler.cxx', obj='check_adler_check_adler.obj')
  2492. CompileLink(dll='check_adler.exe', opts=['ADVAPI', 'NSPR', 'ZLIB'], obj=[
  2493. 'check_adler_check_adler.obj',
  2494. 'libpandaexpress.dll',
  2495. 'libpanda.dll',
  2496. 'libdtoolconfig.dll',
  2497. 'libdtool.dll',
  2498. 'libpystub.dll',
  2499. ])
  2500. CompileC(ipath=IPATH, opts=OPTS, src='check_crc.cxx', obj='check_crc_check_crc.obj')
  2501. CompileLink(dll='check_crc.exe', opts=['ADVAPI', 'NSPR', 'ZLIB'], obj=[
  2502. 'check_crc_check_crc.obj',
  2503. 'libpandaexpress.dll',
  2504. 'libpanda.dll',
  2505. 'libdtoolconfig.dll',
  2506. 'libdtool.dll',
  2507. 'libpystub.dll',
  2508. ])
  2509. IPATH=['panda/src/downloadertools']
  2510. OPTS=['SSL', 'ZLIB', 'NSPR']
  2511. CompileC(ipath=IPATH, opts=OPTS, src='check_md5.cxx', obj='check_md5_check_md5.obj')
  2512. CompileLink(dll='check_md5.exe', opts=['ADVAPI', 'NSPR', 'SSL'], obj=[
  2513. 'check_md5_check_md5.obj',
  2514. 'libpandaexpress.dll',
  2515. 'libpanda.dll',
  2516. 'libdtoolconfig.dll',
  2517. 'libdtool.dll',
  2518. 'libpystub.dll',
  2519. ])
  2520. CompileC(ipath=IPATH, opts=OPTS, src='multify.cxx', obj='multify_multify.obj')
  2521. CompileLink(dll='multify.exe', opts=['ADVAPI', 'NSPR'], obj=[
  2522. 'multify_multify.obj',
  2523. 'libpandaexpress.dll',
  2524. 'libpanda.dll',
  2525. 'libdtoolconfig.dll',
  2526. 'libdtool.dll',
  2527. 'libpystub.dll',
  2528. ])
  2529. IPATH=['panda/src/downloadertools']
  2530. OPTS=['SSL', 'ZLIB', 'ZLIB', 'NSPR']
  2531. CompileC(ipath=IPATH, opts=OPTS, src='pcompress.cxx', obj='pcompress_pcompress.obj')
  2532. CompileLink(dll='pcompress.exe', opts=['ADVAPI', 'NSPR', 'ZLIB'], obj=[
  2533. 'pcompress_pcompress.obj',
  2534. 'libpandaexpress.dll',
  2535. 'libpanda.dll',
  2536. 'libdtoolconfig.dll',
  2537. 'libdtool.dll',
  2538. 'libpystub.dll',
  2539. ])
  2540. CompileC(ipath=IPATH, opts=OPTS, src='pdecompress.cxx', obj='pdecompress_pdecompress.obj')
  2541. CompileLink(dll='pdecompress.exe', opts=['ADVAPI', 'NSPR', 'ZLIB'], obj=[
  2542. 'pdecompress_pdecompress.obj',
  2543. 'libpandaexpress.dll',
  2544. 'libpanda.dll',
  2545. 'libdtoolconfig.dll',
  2546. 'libdtool.dll',
  2547. 'libpystub.dll',
  2548. ])
  2549. IPATH=['panda/src/downloadertools']
  2550. OPTS=['SSL', 'ZLIB', 'NSPR']
  2551. CompileC(ipath=IPATH, opts=OPTS, src='pdecrypt.cxx', obj='pdecrypt_pdecrypt.obj')
  2552. CompileLink(dll='pdecrypt.exe', opts=['ADVAPI', 'NSPR', 'SSL'], obj=[
  2553. 'pdecrypt_pdecrypt.obj',
  2554. 'libpandaexpress.dll',
  2555. 'libpanda.dll',
  2556. 'libdtoolconfig.dll',
  2557. 'libdtool.dll',
  2558. 'libpystub.dll',
  2559. ])
  2560. CompileC(ipath=IPATH, opts=OPTS, src='pencrypt.cxx', obj='pencrypt_pencrypt.obj')
  2561. CompileLink(dll='pencrypt.exe', opts=['ADVAPI', 'NSPR', 'SSL'], obj=[
  2562. 'pencrypt_pencrypt.obj',
  2563. 'libpandaexpress.dll',
  2564. 'libpanda.dll',
  2565. 'libdtoolconfig.dll',
  2566. 'libdtool.dll',
  2567. 'libpystub.dll',
  2568. ])
  2569. CompileC(ipath=IPATH, opts=OPTS, src='show_ddb.cxx', obj='show_ddb_show_ddb.obj')
  2570. CompileLink(dll='show_ddb.exe', opts=['ADVAPI', 'NSPR'], obj=[
  2571. 'show_ddb_show_ddb.obj',
  2572. 'libpandaexpress.dll',
  2573. 'libpanda.dll',
  2574. 'libdtoolconfig.dll',
  2575. 'libdtool.dll',
  2576. 'libpystub.dll',
  2577. ])
  2578. #
  2579. # DIRECTORY: panda/src/glgsg/
  2580. #
  2581. IPATH=['panda/src/glgsg', 'panda/src/glstuff', 'panda/src/gobj']
  2582. OPTS=['BUILDING_PANDAGL', 'NSPR', 'NVIDIACG']
  2583. CompileC(ipath=IPATH, opts=OPTS, src='config_glgsg.cxx', obj='glgsg_config_glgsg.obj')
  2584. CompileC(ipath=IPATH, opts=OPTS, src='glgsg.cxx', obj='glgsg_glgsg.obj')
  2585. #
  2586. # DIRECTORY: panda/src/effects/
  2587. #
  2588. IPATH=['panda/src/effects']
  2589. OPTS=['BUILDING_PANDAFX', 'NSPR', 'NVIDIACG']
  2590. CompileC(ipath=IPATH, opts=OPTS, src='effects_composite1.cxx', obj='effects_composite1.obj')
  2591. Interrogate(ipath=IPATH, opts=OPTS, outd='libeffects.in', outc='libeffects_igate.cxx',
  2592. src='panda/src/effects', module='pandafx', library='libeffects',
  2593. files=['config_effects.h', 'cgShader.h', 'cgShaderAttrib.h', 'cgShaderContext.h', 'lensFlareNode.h', 'effects_composite1.cxx'])
  2594. CompileC(ipath=IPATH, opts=OPTS, src='libeffects_igate.cxx', obj='libeffects_igate.obj')
  2595. #
  2596. # DIRECTORY: panda/metalibs/pandafx/
  2597. #
  2598. IPATH=['panda/metalibs/pandafx', 'panda/src/distort']
  2599. OPTS=['BUILDING_PANDAFX', 'NSPR', 'NVIDIACG']
  2600. CompileC(ipath=IPATH, opts=OPTS, src='pandafx.cxx', obj='pandafx_pandafx.obj')
  2601. InterrogateModule(outc='libpandafx_module.cxx', module='pandafx', library='libpandafx',
  2602. files=['libdistort.in', 'libeffects.in'])
  2603. CompileC(ipath=IPATH, opts=OPTS, src='libpandafx_module.cxx', obj='libpandafx_module.obj')
  2604. CompileLink(dll='libpandafx.dll', opts=['ADVAPI', 'NSPR', 'NVIDIACG'], obj=[
  2605. 'pandafx_pandafx.obj',
  2606. 'libpandafx_module.obj',
  2607. 'distort_composite1.obj',
  2608. 'libdistort_igate.obj',
  2609. 'effects_composite1.obj',
  2610. 'libeffects_igate.obj',
  2611. 'libpanda.dll',
  2612. 'libpandaexpress.dll',
  2613. 'libdtoolconfig.dll',
  2614. 'libdtool.dll',
  2615. ])
  2616. #
  2617. # DIRECTORY: panda/src/glstuff/
  2618. #
  2619. IPATH=['panda/src/glstuff']
  2620. OPTS=['NSPR', 'NVIDIACG', 'CGGL']
  2621. CompileC(ipath=IPATH, opts=OPTS, src='glpure.cxx', obj='glstuff_glpure.obj')
  2622. CompileLink(dll='libglstuff.dll', opts=['ADVAPI', 'GLUT', 'NSPR', 'NVIDIACG', 'CGGL'], obj=[
  2623. 'glstuff_glpure.obj',
  2624. 'libpanda.dll',
  2625. 'libpandafx.dll',
  2626. 'libpandaexpress.dll',
  2627. 'libdtoolconfig.dll',
  2628. 'libdtool.dll',
  2629. ])
  2630. #
  2631. # DIRECTORY: panda/src/windisplay/
  2632. #
  2633. if (sys.platform == "win32"):
  2634. IPATH=['panda/src/windisplay']
  2635. OPTS=['BUILDING_PANDAWIN', 'NSPR']
  2636. CompileC(ipath=IPATH, opts=OPTS, src='winGraphicsWindow.cxx', obj='windisplay_winGraphicsWindow.obj')
  2637. CompileC(ipath=IPATH, opts=OPTS, src='config_windisplay.cxx', obj='windisplay_config_windisplay.obj')
  2638. CompileC(ipath=IPATH, opts=OPTS, src='winGraphicsPipe.cxx', obj='windisplay_winGraphicsPipe.obj')
  2639. CompileLink(opts=['WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NSPR'],
  2640. dll='libwindisplay.dll', obj=[
  2641. 'windisplay_winGraphicsWindow.obj',
  2642. 'windisplay_config_windisplay.obj',
  2643. 'windisplay_winGraphicsPipe.obj',
  2644. 'libpanda.dll',
  2645. 'libpandaexpress.dll',
  2646. 'libdtoolconfig.dll',
  2647. 'libdtool.dll',
  2648. ])
  2649. #
  2650. # DIRECTORY: panda/src/glxdisplay/
  2651. #
  2652. if (sys.platform != "win32"):
  2653. IPATH=['panda/src/glxdisplay', 'panda/src/gobj']
  2654. OPTS=['BUILDING_PANDAGLUT', 'NSPR', 'GLUT', 'NVIDIACG', 'CGGL']
  2655. CompileC(ipath=IPATH, opts=OPTS, src='glxdisplay_composite1.cxx', obj='glxdisplay_composite1.obj')
  2656. Interrogate(ipath=IPATH, opts=OPTS, outd='libglxdisplay.in', outc='libglxdisplay_igate.cxx',
  2657. src='panda/src/glxdisplay', module='pandagl', library='libglxdisplay', files=['glxGraphicsPipe.h'])
  2658. CompileC(ipath=IPATH, opts=OPTS, src='libglxdisplay_igate.cxx', obj='libglxdisplay_igate.obj')
  2659. IPATH=['panda/metalibs/pandagl']
  2660. OPTS=['BUILDING_PANDAGL', 'NSPR', 'NVIDIACG', 'CGGL']
  2661. CompileC(ipath=IPATH, opts=OPTS, src='pandagl.cxx', obj='pandagl_pandagl.obj')
  2662. CompileLink(opts=['GLUT', 'NVIDIACG', 'CGGL', 'NSPR'], dll='libpandagl.dll', obj=[
  2663. 'pandagl_pandagl.obj',
  2664. 'glgsg_config_glgsg.obj',
  2665. 'glgsg_glgsg.obj',
  2666. 'glxdisplay_composite1.obj',
  2667. 'libglxdisplay_igate.obj',
  2668. 'libpanda.dll',
  2669. 'libpandaexpress.dll',
  2670. 'libglstuff.dll',
  2671. 'libpandafx.dll',
  2672. 'libdtoolconfig.dll',
  2673. 'libdtool.dll',
  2674. ])
  2675. #
  2676. # DIRECTORY: panda/src/wgldisplay/
  2677. #
  2678. if (sys.platform == "win32"):
  2679. IPATH=['panda/src/wgldisplay', 'panda/src/glstuff', 'panda/src/gobj']
  2680. OPTS=['BUILDING_PANDAGL', 'NSPR', 'NVIDIACG', 'CGGL']
  2681. CompileC(ipath=IPATH, opts=OPTS, src='wgldisplay_composite1.cxx', obj='wgldisplay_composite1.obj')
  2682. IPATH=['panda/metalibs/pandagl']
  2683. OPTS=['BUILDING_PANDAGL', 'NSPR', 'NVIDIACG', 'CGGL']
  2684. CompileC(ipath=IPATH, opts=OPTS, src='pandagl.cxx', obj='pandagl_pandagl.obj')
  2685. CompileLink(opts=['WINGDI', 'GLUT', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NSPR', 'NVIDIACG', 'CGGL'],
  2686. dll='libpandagl.dll', obj=[
  2687. 'pandagl_pandagl.obj',
  2688. 'glgsg_config_glgsg.obj',
  2689. 'glgsg_glgsg.obj',
  2690. 'wgldisplay_composite1.obj',
  2691. 'libwindisplay.dll',
  2692. 'libpanda.dll',
  2693. 'libpandaexpress.dll',
  2694. 'libglstuff.dll',
  2695. 'libpandafx.dll',
  2696. 'libdtoolconfig.dll',
  2697. 'libdtool.dll',
  2698. ])
  2699. #
  2700. # DIRECTORY: panda/metalibs/pandadx7/
  2701. #
  2702. if (sys.platform == "win32"):
  2703. IPATH=['panda/src/dxgsg7']
  2704. OPTS=['BUILDING_PANDADX', 'DXSDK', 'NSPR']
  2705. CompileC(ipath=IPATH, opts=OPTS, src='dxGraphicsStateGuardian7.cxx', obj='dxgsg7_dxGraphicsStateGuardian7.obj')
  2706. CompileC(ipath=IPATH, opts=OPTS, src='dxgsg7_composite1.cxx', obj='dxgsg7_composite1.obj')
  2707. IPATH=['panda/metalibs/pandadx7']
  2708. OPTS=['BUILDING_PANDADX', 'DXSDK', 'NSPR']
  2709. CompileC(ipath=IPATH, opts=OPTS, src='pandadx7.cxx', obj='pandadx7_pandadx7.obj')
  2710. CompileLink(dll='libpandadx7.dll', opts=['ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DXDRAW', 'DXGUID', 'D3D8', 'NSPR'], obj=[
  2711. 'pandadx7_pandadx7.obj',
  2712. 'dxgsg7_dxGraphicsStateGuardian7.obj',
  2713. 'dxgsg7_composite1.obj',
  2714. 'libpanda.dll',
  2715. 'libpandaexpress.dll',
  2716. 'libwindisplay.dll',
  2717. 'libdtoolconfig.dll',
  2718. 'libdtool.dll',
  2719. ])
  2720. #
  2721. # DIRECTORY: panda/metalibs/pandadx8/
  2722. #
  2723. if (sys.platform == "win32"):
  2724. IPATH=['panda/src/dxgsg8']
  2725. OPTS=['BUILDING_PANDADX', 'DXSDK', 'NSPR']
  2726. CompileC(ipath=IPATH, opts=OPTS, src='dxGraphicsStateGuardian8.cxx', obj='dxgsg8_dxGraphicsStateGuardian8.obj')
  2727. CompileC(ipath=IPATH, opts=OPTS, src='dxgsg8_composite1.cxx', obj='dxgsg8_composite1.obj')
  2728. IPATH=['panda/metalibs/pandadx8']
  2729. OPTS=['BUILDING_PANDADX', 'DXSDK', 'NSPR']
  2730. CompileC(ipath=IPATH, opts=OPTS, src='pandadx8.cxx', obj='pandadx8_pandadx8.obj')
  2731. CompileLink(dll='libpandadx8.dll',
  2732. opts=['ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DXDRAW', 'DXGUID', 'D3D8', 'NSPR'], obj=[
  2733. 'pandadx8_pandadx8.obj',
  2734. 'dxgsg8_dxGraphicsStateGuardian8.obj',
  2735. 'dxgsg8_composite1.obj',
  2736. 'libpanda.dll',
  2737. 'libpandaexpress.dll',
  2738. 'libwindisplay.dll',
  2739. 'libdtoolconfig.dll',
  2740. 'libdtool.dll',
  2741. ])
  2742. #
  2743. # DIRECTORY: panda/metalibs/pandadx9/
  2744. #
  2745. if (sys.platform == "win32"):
  2746. IPATH=['panda/src/dxgsg9']
  2747. OPTS=['BUILDING_PANDADX', 'DXSDK', 'NSPR']
  2748. CompileC(ipath=IPATH, opts=OPTS, src='dxGraphicsStateGuardian9.cxx', obj='dxgsg9_dxGraphicsStateGuardian9.obj')
  2749. CompileC(ipath=IPATH, opts=OPTS, src='dxgsg9_composite1.cxx', obj='dxgsg9_composite1.obj')
  2750. IPATH=['panda/metalibs/pandadx9']
  2751. OPTS=['BUILDING_PANDADX', 'DXSDK', 'NSPR']
  2752. CompileC(ipath=IPATH, opts=OPTS, src='pandadx9.cxx', obj='pandadx9_pandadx9.obj')
  2753. CompileLink(dll='libpandadx9.dll',
  2754. opts=['ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DXDRAW', 'DXGUID', 'D3D9', 'NSPR'], obj=[
  2755. 'pandadx9_pandadx9.obj',
  2756. 'dxgsg9_dxGraphicsStateGuardian9.obj',
  2757. 'dxgsg9_composite1.obj',
  2758. 'libpanda.dll',
  2759. 'libpandaexpress.dll',
  2760. 'libwindisplay.dll',
  2761. 'libdtoolconfig.dll',
  2762. 'libdtool.dll',
  2763. ])
  2764. #
  2765. # DIRECTORY: panda/src/egg/
  2766. #
  2767. IPATH=['panda/src/egg']
  2768. CompileBison(pre='eggyy', dstc='parser.cxx', dsth='parser.h', src='panda/src/egg/parser.yxx')
  2769. CompileFlex(pre='eggyy', dst='lexer.cxx', src='panda/src/egg/lexer.lxx', dashi=1)
  2770. OPTS=['BUILDING_PANDAEGG', 'NSPR']
  2771. CompileC(ipath=IPATH, opts=OPTS, src='egg_composite1.cxx', obj='egg_composite1.obj')
  2772. CompileC(ipath=IPATH, opts=OPTS, src='egg_composite2.cxx', obj='egg_composite2.obj')
  2773. CompileC(ipath=IPATH, opts=OPTS, src='parser.cxx', obj='egg_parser.obj')
  2774. CompileC(ipath=IPATH, opts=OPTS, src='lexer.cxx', obj='egg_lexer.obj')
  2775. Interrogate(ipath=IPATH, opts=OPTS, outd='libegg.in', outc='libegg_igate.cxx',
  2776. src='panda/src/egg', module='pandaegg', library='libegg', files=[
  2777. 'config_egg.h', 'eggAnimData.h', 'eggAttributes.h', 'eggBin.h', 'eggBinMaker.h', 'eggComment.h',
  2778. 'eggCoordinateSystem.h', 'eggCurve.h', 'eggData.h', 'eggExternalReference.h', 'eggFilenameNode.h',
  2779. 'eggGroup.h', 'eggGroupNode.h', 'eggGroupUniquifier.h', 'eggLine.h', 'eggMaterial.h',
  2780. 'eggMaterialCollection.h', 'eggMiscFuncs.h', 'eggMorph.h', 'eggMorphList.h', 'eggNamedObject.h',
  2781. 'eggNameUniquifier.h', 'eggNode.h', 'eggNurbsCurve.h', 'eggNurbsSurface.h', 'eggObject.h',
  2782. 'eggParameters.h', 'eggPoint.h', 'eggPolygon.h', 'eggPolysetMaker.h', 'eggPoolUniquifier.h',
  2783. 'eggPrimitive.h', 'eggRenderMode.h', 'eggSAnimData.h', 'eggSurface.h', 'eggSwitchCondition.h',
  2784. 'eggTable.h', 'eggTexture.h', 'eggTextureCollection.h', 'eggTransform3d.h', 'eggUserData.h',
  2785. 'eggUtilities.h', 'eggVertex.h', 'eggVertexPool.h', 'eggVertexUV.h', 'eggXfmAnimData.h',
  2786. 'eggXfmSAnim.h', 'parserDefs.h', 'lexerDefs.h', 'pt_EggMaterial.h', 'vector_PT_EggMaterial.h',
  2787. 'pt_EggTexture.h', 'vector_PT_EggTexture.h', 'pt_EggVertex.h', 'vector_PT_EggVertex.h',
  2788. 'egg_composite1.cxx', 'egg_composite2.cxx'])
  2789. CompileC(ipath=IPATH, opts=OPTS, src='libegg_igate.cxx', obj='libegg_igate.obj')
  2790. #
  2791. # DIRECTORY: panda/src/egg2pg/
  2792. #
  2793. IPATH=['panda/src/egg2pg']
  2794. OPTS=['BUILDING_PANDAEGG', 'NSPR']
  2795. CompileC(ipath=IPATH, opts=OPTS, src='egg2pg_composite1.cxx', obj='egg2pg_composite1.obj')
  2796. CompileC(ipath=IPATH, opts=OPTS, src='egg2pg_composite2.cxx', obj='egg2pg_composite2.obj')
  2797. Interrogate(ipath=IPATH, opts=OPTS, outd='libegg2pg.in', outc='libegg2pg_igate.cxx',
  2798. src='panda/src/egg2pg', module='pandaegg', library='libegg2pg', files=['load_egg_file.h'])
  2799. CompileC(ipath=IPATH, opts=OPTS, src='libegg2pg_igate.cxx', obj='libegg2pg_igate.obj')
  2800. #
  2801. # DIRECTORY: panda/src/framework/
  2802. #
  2803. IPATH=['panda/src/framework']
  2804. OPTS=['BUILDING_FRAMEWORK', 'NSPR']
  2805. CompileC(ipath=IPATH, opts=OPTS, src='config_framework.cxx', obj='framework_config_framework.obj')
  2806. CompileC(ipath=IPATH, opts=OPTS, src='pandaFramework.cxx', obj='framework_pandaFramework.obj')
  2807. CompileC(ipath=IPATH, opts=OPTS, src='windowFramework.cxx', obj='framework_windowFramework.obj')
  2808. CompileLink(dll='libframework.dll', opts=['ADVAPI', 'NSPR'], obj=[
  2809. 'framework_config_framework.obj',
  2810. 'framework_pandaFramework.obj',
  2811. 'framework_windowFramework.obj',
  2812. 'libpanda.dll',
  2813. 'libpandaexpress.dll',
  2814. 'libdtoolconfig.dll',
  2815. 'libdtool.dll',
  2816. ])
  2817. #
  2818. # DIRECTORY: panda/metalibs/pandaegg/
  2819. #
  2820. IPATH=['panda/metalibs/pandaegg', 'panda/src/egg']
  2821. OPTS=['BUILDING_PANDAEGG', 'NSPR']
  2822. CompileC(ipath=IPATH, opts=OPTS, src='pandaegg.cxx', obj='pandaegg_pandaegg.obj')
  2823. InterrogateModule(outc='libpandaegg_module.cxx', module='pandaegg', library='libpandaegg',
  2824. files=['libegg2pg.in', 'libegg.in'])
  2825. CompileC(ipath=IPATH, opts=OPTS, src='libpandaegg_module.cxx', obj='libpandaegg_module.obj')
  2826. CompileLink(dll='libpandaegg.dll', opts=['ADVAPI', 'NSPR'], obj=[
  2827. 'pandaegg_pandaegg.obj',
  2828. 'libpandaegg_module.obj',
  2829. 'egg2pg_composite1.obj',
  2830. 'egg2pg_composite2.obj',
  2831. 'libegg2pg_igate.obj',
  2832. 'egg_composite1.obj',
  2833. 'egg_composite2.obj',
  2834. 'egg_parser.obj',
  2835. 'egg_lexer.obj',
  2836. 'libegg_igate.obj',
  2837. 'builder_composite1.obj',
  2838. 'builder_composite2.obj',
  2839. 'libpanda.dll',
  2840. 'libpandaexpress.dll',
  2841. 'libdtoolconfig.dll',
  2842. 'libdtool.dll',
  2843. ])
  2844. #
  2845. # DIRECTORY: panda/src/physics/
  2846. #
  2847. IPATH=['panda/src/physics']
  2848. OPTS=['BUILDING_PANDAPHYSICS', 'NSPR']
  2849. CompileC(ipath=IPATH, opts=OPTS, src='physics_composite1.cxx', obj='physics_composite1.obj')
  2850. CompileC(ipath=IPATH, opts=OPTS, src='physics_composite2.cxx', obj='physics_composite2.obj')
  2851. Interrogate(ipath=IPATH, opts=OPTS, outd='libphysics.in', outc='libphysics_igate.cxx',
  2852. src='panda/src/physics', module='pandaphysics', library='libphysics',
  2853. files=['actorNode.h', 'angularEulerIntegrator.h', 'angularForce.h', 'angularIntegrator.h', 'angularVectorForce.h', 'baseForce.h', 'baseIntegrator.h', 'config_physics.h', 'forceNode.h', 'linearCylinderVortexForce.h', 'linearDistanceForce.h', 'linearEulerIntegrator.h', 'linearForce.h', 'linearFrictionForce.h', 'linearIntegrator.h', 'linearJitterForce.h', 'linearNoiseForce.h', 'linearRandomForce.h', 'linearSinkForce.h', 'linearSourceForce.h', 'linearUserDefinedForce.h', 'linearVectorForce.h', 'physical.h', 'physicalNode.h', 'physicsCollisionHandler.h', 'physicsManager.h', 'physicsObject.h', 'physics_composite1.cxx', 'physics_composite2.cxx'])
  2854. CompileC(ipath=IPATH, opts=OPTS, src='libphysics_igate.cxx', obj='libphysics_igate.obj')
  2855. #
  2856. # DIRECTORY: panda/src/particlesystem/
  2857. #
  2858. IPATH=['panda/src/particlesystem']
  2859. OPTS=['BUILDING_PANDAPHYSICS', 'NSPR']
  2860. CompileC(ipath=IPATH, opts=OPTS, src='particlesystem_composite1.cxx', obj='particlesystem_composite1.obj')
  2861. CompileC(ipath=IPATH, opts=OPTS, src='particlesystem_composite2.cxx', obj='particlesystem_composite2.obj')
  2862. Interrogate(ipath=IPATH, opts=OPTS, outd='libparticlesystem.in', outc='libparticlesystem_igate.cxx',
  2863. src='panda/src/particlesystem', module='pandaphysics', library='libparticlesystem',
  2864. files=['baseParticle.h', 'baseParticleEmitter.h', 'baseParticleFactory.h', 'baseParticleRenderer.h', 'boxEmitter.h', 'config_particlesystem.h', 'discEmitter.h', 'geomParticleRenderer.h', 'lineEmitter.h', 'lineParticleRenderer.h', 'particleSystem.h', 'particleSystemManager.h', 'pointEmitter.h', 'pointParticle.h', 'pointParticleFactory.h', 'pointParticleRenderer.h', 'rectangleEmitter.h', 'ringEmitter.h', 'sparkleParticleRenderer.h', 'sphereSurfaceEmitter.h', 'sphereVolumeEmitter.h', 'spriteParticleRenderer.h', 'tangentRingEmitter.h', 'zSpinParticle.h', 'zSpinParticleFactory.h', 'particleCommonFuncs.h', 'particlesystem_composite1.cxx', 'particlesystem_composite2.cxx'])
  2865. CompileC(ipath=IPATH, opts=OPTS, src='libparticlesystem_igate.cxx', obj='libparticlesystem_igate.obj')
  2866. #
  2867. # DIRECTORY: panda/metalibs/pandaphysics/
  2868. #
  2869. IPATH=['panda/metalibs/pandaphysics']
  2870. OPTS=['BUILDING_PANDAPHYSICS', 'NSPR']
  2871. CompileC(ipath=IPATH, opts=OPTS, src='pandaphysics.cxx', obj='pandaphysics_pandaphysics.obj')
  2872. InterrogateModule(outc='libpandaphysics_module.cxx', module='pandaphysics', library='libpandaphysics',
  2873. files=['libphysics.in', 'libparticlesystem.in'])
  2874. CompileC(ipath=IPATH, opts=OPTS, src='libpandaphysics_module.cxx', obj='libpandaphysics_module.obj')
  2875. CompileLink(dll='libpandaphysics.dll', opts=['ADVAPI', 'NSPR'], obj=[
  2876. 'pandaphysics_pandaphysics.obj',
  2877. 'libpandaphysics_module.obj',
  2878. 'physics_composite1.obj',
  2879. 'physics_composite2.obj',
  2880. 'libphysics_igate.obj',
  2881. 'particlesystem_composite1.obj',
  2882. 'particlesystem_composite2.obj',
  2883. 'libparticlesystem_igate.obj',
  2884. 'libpanda.dll',
  2885. 'libpandaexpress.dll',
  2886. 'libdtoolconfig.dll',
  2887. 'libdtool.dll',
  2888. ])
  2889. #
  2890. # DIRECTORY: panda/src/testbed/
  2891. #
  2892. IPATH=['panda/src/testbed']
  2893. OPTS=['NSPR']
  2894. CompileC(ipath=IPATH, opts=OPTS, src='pview.cxx', obj='pview_pview.obj')
  2895. CompileLink(dll='pview.exe', opts=['ADVAPI', 'NSPR'], obj=[
  2896. 'pview_pview.obj',
  2897. 'libframework.dll',
  2898. 'libpanda.dll',
  2899. 'libpandafx.dll',
  2900. 'libpandaexpress.dll',
  2901. 'libdtoolconfig.dll',
  2902. 'libdtool.dll',
  2903. 'libpystub.dll',
  2904. ])
  2905. #
  2906. # DIRECTORY: direct/src/directbase/
  2907. #
  2908. IPATH=['direct/src/directbase']
  2909. OPTS=['BUILDING_DIRECT', 'NSPR']
  2910. CompileC(ipath=IPATH, opts=OPTS, src='directbase.cxx', obj='directbase_directbase.obj')
  2911. #
  2912. # DIRECTORY: direct/src/dcparser/
  2913. #
  2914. CompileBison(pre='dcyy', dstc='dcParser.cxx', dsth='dcParser.h', src='direct/src/dcparser/dcParser.yxx')
  2915. CompileFlex(pre='dcyy', dst='dcLexer.cxx', src='direct/src/dcparser/dcLexer.lxx', dashi=0)
  2916. IPATH=['direct/src/dcparser']
  2917. OPTS=['WITHINPANDA', 'BUILDING_DIRECT', 'NSPR']
  2918. CompileC(ipath=IPATH, opts=OPTS, src='dcparser_composite1.cxx', obj='dcparser_composite1.obj')
  2919. CompileC(ipath=IPATH, opts=OPTS, src='dcparser_composite2.cxx', obj='dcparser_composite2.obj')
  2920. CompileC(ipath=IPATH, opts=OPTS, src='dcParser.cxx', obj='dcparser_dcParser.obj')
  2921. CompileC(ipath=IPATH, opts=OPTS, src='dcLexer.cxx', obj='dcparser_dcLexer.obj')
  2922. Interrogate(ipath=IPATH, opts=OPTS, outd='libdcparser.in', outc='libdcparser_igate.cxx',
  2923. src='direct/src/dcparser', module='direct', library='libdcparser',
  2924. files=['dcAtomicField.h', 'dcClass.h', 'dcDeclaration.h', 'dcField.h', 'dcFile.h',
  2925. 'dcLexerDefs.h', 'dcMolecularField.h', 'dcParserDefs.h', 'dcSubatomicType.h',
  2926. 'dcPackData.h', 'dcPacker.h', 'dcPackerCatalog.h', 'dcPackerInterface.h',
  2927. 'dcParameter.h', 'dcClassParameter.h', 'dcArrayParameter.h', 'dcSimpleParameter.h',
  2928. 'dcSwitchParameter.h', 'dcNumericRange.h', 'dcSwitch.h', 'dcTypedef.h', 'dcPython.h',
  2929. 'dcbase.h', 'dcindent.h', 'hashGenerator.h', 'primeNumberGenerator.h',
  2930. 'dcparser_composite1.cxx', 'dcparser_composite2.cxx'])
  2931. CompileC(ipath=IPATH, opts=OPTS, src='libdcparser_igate.cxx', obj='libdcparser_igate.obj')
  2932. #
  2933. # DIRECTORY: direct/src/deadrec/
  2934. #
  2935. IPATH=['direct/src/deadrec']
  2936. OPTS=['BUILDING_DIRECT', 'NSPR']
  2937. CompileC(ipath=IPATH, opts=OPTS, src='deadrec_composite1.cxx', obj='deadrec_composite1.obj')
  2938. Interrogate(ipath=IPATH, opts=OPTS, outd='libdeadrec.in', outc='libdeadrec_igate.cxx',
  2939. src='direct/src/deadrec', module='direct', library='libdeadrec',
  2940. files=['smoothMover.h', 'deadrec_composite1.cxx'])
  2941. CompileC(ipath=IPATH, opts=OPTS, src='libdeadrec_igate.cxx', obj='libdeadrec_igate.obj')
  2942. #
  2943. # DIRECTORY: direct/src/distributed/
  2944. #
  2945. IPATH=['direct/src/distributed', 'direct/src/dcparser']
  2946. OPTS=['WITHINPANDA', 'BUILDING_DIRECT', 'SSL', 'NSPR']
  2947. CompileC(ipath=IPATH, opts=OPTS, src='config_distributed.cxx', obj='distributed_config_distributed.obj')
  2948. CompileC(ipath=IPATH, opts=OPTS, src='cConnectionRepository.cxx', obj='distributed_cConnectionRepository.obj')
  2949. CompileC(ipath=IPATH, opts=OPTS, src='cDistributedSmoothNodeBase.cxx', obj='distributed_cDistributedSmoothNodeBase.obj')
  2950. Interrogate(ipath=IPATH, opts=OPTS, outd='libdistributed.in', outc='libdistributed_igate.cxx',
  2951. src='direct/src/distributed', module='direct', library='libdistributed',
  2952. files=['config_distributed.cxx', 'config_distributed.h', 'cConnectionRepository.cxx',
  2953. 'cConnectionRepository.h', 'cDistributedSmoothNodeBase.cxx', 'cDistributedSmoothNodeBase.h'])
  2954. CompileC(ipath=IPATH, opts=OPTS, src='libdistributed_igate.cxx', obj='libdistributed_igate.obj')
  2955. #
  2956. # DIRECTORY: direct/src/interval/
  2957. #
  2958. IPATH=['direct/src/interval']
  2959. OPTS=['BUILDING_DIRECT', 'NSPR']
  2960. #CompileC(ipath=IPATH, opts=OPTS, src='config_interval.cxx', obj='interval_config_interval.obj')
  2961. #CompileC(ipath=IPATH, opts=OPTS, src='cInterval.cxx', obj='interval_cInterval.obj')
  2962. #CompileC(ipath=IPATH, opts=OPTS, src='cIntervalManager.cxx', obj='interval_cIntervalManager.obj')
  2963. #CompileC(ipath=IPATH, opts=OPTS, src='cLerpInterval.cxx', obj='interval_cLerpInterval.obj')
  2964. #CompileC(ipath=IPATH, opts=OPTS, src='cLerpNodePathInterval.cxx', obj='interval_cLerpNodePathInterval.obj')
  2965. #CompileC(ipath=IPATH, opts=OPTS, src='cLerpAnimEffectInterval.cxx', obj='interval_cLerpAnimEffectInterval.obj')
  2966. #CompileC(ipath=IPATH, opts=OPTS, src='cMetaInterval.cxx', obj='interval_cMetaInterval.obj')
  2967. #CompileC(ipath=IPATH, opts=OPTS, src='hideInterval.cxx', obj='interval_hideInterval.obj')
  2968. #CompileC(ipath=IPATH, opts=OPTS, src='showInterval.cxx', obj='interval_showInterval.obj')
  2969. #CompileC(ipath=IPATH, opts=OPTS, src='waitInterval.cxx', obj='interval_waitInterval.obj')
  2970. CompileC(ipath=IPATH, opts=OPTS, src='interval_composite1.cxx', obj='interval_composite1.obj')
  2971. Interrogate(ipath=IPATH, opts=OPTS, outd='libinterval.in', outc='libinterval_igate.cxx',
  2972. src='direct/src/interval', module='direct', library='libinterval',
  2973. files=['config_interval.cxx', 'config_interval.h', 'cInterval.cxx', 'cInterval.h',
  2974. 'cIntervalManager.cxx', 'cIntervalManager.h', 'cLerpInterval.cxx', 'cLerpInterval.h',
  2975. 'cLerpNodePathInterval.cxx', 'cLerpNodePathInterval.h', 'cLerpAnimEffectInterval.cxx',
  2976. 'cLerpAnimEffectInterval.h', 'cMetaInterval.cxx', 'cMetaInterval.h', 'hideInterval.cxx',
  2977. 'hideInterval.h', 'showInterval.cxx', 'showInterval.h', 'waitInterval.cxx', 'waitInterval.h',
  2978. 'lerp_helpers.h'])
  2979. CompileC(ipath=IPATH, opts=OPTS, src='libinterval_igate.cxx', obj='libinterval_igate.obj')
  2980. #
  2981. # DIRECTORY: direct/src/showbase/
  2982. #
  2983. IPATH=['direct/src/showbase']
  2984. OPTS=['BUILDING_DIRECT', 'NSPR']
  2985. CompileC(ipath=IPATH, opts=OPTS, src='showBase.cxx', obj='showbase_showBase.obj')
  2986. CompileC(ipath=IPATH, opts=OPTS, src='mersenne.cxx', obj='showbase_mersenne.obj')
  2987. Interrogate(ipath=IPATH, opts=OPTS, outd='libshowbase.in', outc='libshowbase_igate.cxx',
  2988. src='direct/src/showbase', module='direct', library='libshowbase',
  2989. files=['showBase.cxx', 'showBase.h', 'mersenne.cxx', 'mersenne.h'])
  2990. CompileC(ipath=IPATH, opts=OPTS, src='libshowbase_igate.cxx', obj='libshowbase_igate.obj')
  2991. #
  2992. # DIRECTORY: direct/metalibs/direct/
  2993. #
  2994. IPATH=['direct/metalibs/direct']
  2995. OPTS=['BUILDING_DIRECT', 'NSPR']
  2996. CompileC(ipath=IPATH, opts=OPTS, src='direct.cxx', obj='direct_direct.obj')
  2997. InterrogateModule(outc='libdirect_module.cxx', module='direct', library='libdirect',
  2998. files=['libdcparser.in', 'libshowbase.in', 'libdeadrec.in', 'libinterval.in', 'libdistributed.in'])
  2999. CompileC(ipath=IPATH, opts=OPTS, src='libdirect_module.cxx', obj='libdirect_module.obj')
  3000. CompileLink(dll='libdirect.dll', opts=['ADVAPI', 'NSPR', 'SSL'], obj=[
  3001. 'direct_direct.obj',
  3002. 'libdirect_module.obj',
  3003. 'directbase_directbase.obj',
  3004. 'dcparser_composite1.obj',
  3005. 'dcparser_composite2.obj',
  3006. 'dcparser_dcParser.obj',
  3007. 'dcparser_dcLexer.obj',
  3008. 'libdcparser_igate.obj',
  3009. 'showbase_showBase.obj',
  3010. 'showbase_mersenne.obj',
  3011. 'libshowbase_igate.obj',
  3012. 'deadrec_composite1.obj',
  3013. 'libdeadrec_igate.obj',
  3014. 'interval_composite1.obj',
  3015. 'libinterval_igate.obj',
  3016. 'distributed_config_distributed.obj',
  3017. 'distributed_cConnectionRepository.obj',
  3018. 'distributed_cDistributedSmoothNodeBase.obj',
  3019. 'libdistributed_igate.obj',
  3020. 'libpanda.dll',
  3021. 'libpandaexpress.dll',
  3022. 'libdtoolconfig.dll',
  3023. 'libdtool.dll',
  3024. ])
  3025. #
  3026. # DIRECTORY: direct/src/dcparse/
  3027. #
  3028. IPATH=['direct/src/dcparse', 'direct/src/dcparser']
  3029. OPTS=['WITHINPANDA', 'NSPR']
  3030. CompileC(ipath=IPATH, opts=OPTS, src='dcparse.cxx', obj='dcparse_dcparse.obj')
  3031. CompileLink(dll='dcparse.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3032. 'dcparse_dcparse.obj',
  3033. 'libdirect.dll',
  3034. 'libpandaexpress.dll',
  3035. 'libdtoolconfig.dll',
  3036. 'libdtool.dll',
  3037. 'libpystub.dll',
  3038. ])
  3039. #
  3040. # DIRECTORY: direct/src/heapq/
  3041. #
  3042. IPATH=['direct/src/heapq']
  3043. OPTS=['NSPR']
  3044. CompileC(ipath=IPATH, opts=OPTS, src='heapq.cxx', obj='heapq_heapq.obj')
  3045. CompileLink(dll='libheapq.dll', opts=['ADVAPI', 'NSPR'], obj=[
  3046. 'heapq_heapq.obj',
  3047. 'libpandaexpress.dll',
  3048. 'libdtoolconfig.dll',
  3049. 'libdtool.dll',
  3050. ])
  3051. #
  3052. # DIRECTORY: pandatool/src/pandatoolbase/
  3053. #
  3054. IPATH=['pandatool/src/pandatoolbase']
  3055. OPTS=['NSPR']
  3056. CompileC(ipath=IPATH, opts=OPTS, src='pandatoolbase_composite1.cxx', obj='pandatoolbase_composite1.obj')
  3057. CompileLIB(lib='libpandatoolbase.lib', obj=['pandatoolbase_composite1.obj'])
  3058. #
  3059. # DIRECTORY: pandatool/src/converter/
  3060. #
  3061. IPATH=['pandatool/src/converter']
  3062. OPTS=['NSPR']
  3063. CompileC(ipath=IPATH, opts=OPTS, src='somethingToEggConverter.cxx', obj='converter_somethingToEggConverter.obj')
  3064. CompileLIB(lib='libconverter.lib', obj=['converter_somethingToEggConverter.obj'])
  3065. #
  3066. # DIRECTORY: pandatool/src/progbase/
  3067. #
  3068. IPATH=['pandatool/src/progbase']
  3069. OPTS=['NSPR']
  3070. CompileC(ipath=IPATH, opts=OPTS, src='progbase_composite1.cxx', obj='progbase_composite1.obj')
  3071. CompileLIB(lib='libprogbase.lib', obj=['progbase_composite1.obj'])
  3072. #
  3073. # DIRECTORY: pandatool/src/eggbase/
  3074. #
  3075. IPATH=['pandatool/src/eggbase']
  3076. OPTS=['NSPR']
  3077. CompileC(ipath=IPATH, opts=OPTS, src='eggbase_composite1.cxx', obj='eggbase_composite1.obj')
  3078. CompileLIB(lib='libeggbase.lib', obj=['eggbase_composite1.obj'])
  3079. #
  3080. # DIRECTORY: pandatool/src/bam/
  3081. #
  3082. IPATH=['pandatool/src/bam']
  3083. OPTS=['NSPR']
  3084. CompileC(ipath=IPATH, opts=OPTS, src='bamInfo.cxx', obj='bam-info_bamInfo.obj')
  3085. CompileLink(dll='bam-info.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3086. 'bam-info_bamInfo.obj',
  3087. 'libprogbase.lib',
  3088. 'libpandatoolbase.lib',
  3089. 'libpandaegg.dll',
  3090. 'libpanda.dll',
  3091. 'libpandaexpress.dll',
  3092. 'libdtoolconfig.dll',
  3093. 'libdtool.dll',
  3094. 'libpystub.dll',
  3095. ])
  3096. CompileC(ipath=IPATH, opts=OPTS, src='bamToEgg.cxx', obj='bam2egg_bamToEgg.obj')
  3097. CompileLink(dll='bam2egg.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3098. 'bam2egg_bamToEgg.obj',
  3099. 'libconverter.lib',
  3100. 'libeggbase.lib',
  3101. 'libprogbase.lib',
  3102. 'libpandatoolbase.lib',
  3103. 'libpandaegg.dll',
  3104. 'libpanda.dll',
  3105. 'libpandaexpress.dll',
  3106. 'libdtoolconfig.dll',
  3107. 'libdtool.dll',
  3108. 'libpystub.dll',
  3109. ])
  3110. CompileC(ipath=IPATH, opts=OPTS, src='eggToBam.cxx', obj='egg2bam_eggToBam.obj')
  3111. CompileLink(dll='egg2bam.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3112. 'egg2bam_eggToBam.obj',
  3113. 'libeggbase.lib',
  3114. 'libprogbase.lib',
  3115. 'libconverter.lib',
  3116. 'libpandatoolbase.lib',
  3117. 'libpandaegg.dll',
  3118. 'libpanda.dll',
  3119. 'libpandaexpress.dll',
  3120. 'libdtoolconfig.dll',
  3121. 'libdtool.dll',
  3122. 'libpystub.dll',
  3123. ])
  3124. #
  3125. # DIRECTORY: pandatool/src/cvscopy/
  3126. #
  3127. IPATH=['pandatool/src/cvscopy']
  3128. OPTS=['NSPR']
  3129. CompileC(ipath=IPATH, opts=OPTS, src='cvscopy_composite1.cxx', obj='cvscopy_composite1.obj')
  3130. CompileLIB(lib='libcvscopy.lib', obj=['cvscopy_composite1.obj'])
  3131. #
  3132. # DIRECTORY: pandatool/src/dxf/
  3133. #
  3134. IPATH=['pandatool/src/dxf']
  3135. OPTS=['NSPR']
  3136. CompileC(ipath=IPATH, opts=OPTS, src='dxf_composite1.cxx', obj='dxf_composite1.obj')
  3137. CompileLIB(lib='libdxf.lib', obj=['dxf_composite1.obj'])
  3138. #
  3139. # DIRECTORY: pandatool/src/dxfegg/
  3140. #
  3141. IPATH=['pandatool/src/dxfegg']
  3142. OPTS=['NSPR']
  3143. CompileC(ipath=IPATH, opts=OPTS, src='dxfToEggConverter.cxx', obj='dxfegg_dxfToEggConverter.obj')
  3144. CompileC(ipath=IPATH, opts=OPTS, src='dxfToEggLayer.cxx', obj='dxfegg_dxfToEggLayer.obj')
  3145. CompileLIB(lib='libdxfegg.lib', obj=[
  3146. 'dxfegg_dxfToEggConverter.obj',
  3147. 'dxfegg_dxfToEggLayer.obj',
  3148. ])
  3149. #
  3150. # DIRECTORY: pandatool/src/dxfprogs/
  3151. #
  3152. IPATH=['pandatool/src/dxfprogs']
  3153. OPTS=['NSPR']
  3154. CompileC(ipath=IPATH, opts=OPTS, src='dxfPoints.cxx', obj='dxf-points_dxfPoints.obj')
  3155. CompileLink(dll='dxf-points.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3156. 'dxf-points_dxfPoints.obj',
  3157. 'libprogbase.lib',
  3158. 'libdxf.lib',
  3159. 'libpandatoolbase.lib',
  3160. 'libpanda.dll',
  3161. 'libpandaexpress.dll',
  3162. 'libdtoolconfig.dll',
  3163. 'libdtool.dll',
  3164. 'libpystub.dll',
  3165. ])
  3166. CompileC(ipath=IPATH, opts=OPTS, src='dxfToEgg.cxx', obj='dxf2egg_dxfToEgg.obj')
  3167. CompileLink(dll='dxf2egg.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3168. 'dxf2egg_dxfToEgg.obj',
  3169. 'libdxfegg.lib',
  3170. 'libdxf.lib',
  3171. 'libeggbase.lib',
  3172. 'libprogbase.lib',
  3173. 'libpandatoolbase.lib',
  3174. 'libconverter.lib',
  3175. 'libpandaegg.dll',
  3176. 'libpanda.dll',
  3177. 'libpandaexpress.dll',
  3178. 'libdtoolconfig.dll',
  3179. 'libdtool.dll',
  3180. 'libpystub.dll',
  3181. ])
  3182. CompileC(ipath=IPATH, opts=OPTS, src='eggToDXF.cxx', obj='egg2dxf_eggToDXF.obj')
  3183. CompileC(ipath=IPATH, opts=OPTS, src='eggToDXFLayer.cxx', obj='egg2dxf_eggToDXFLayer.obj')
  3184. CompileLink(dll='egg2dxf.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3185. 'egg2dxf_eggToDXF.obj',
  3186. 'egg2dxf_eggToDXFLayer.obj',
  3187. 'libdxf.lib',
  3188. 'libeggbase.lib',
  3189. 'libprogbase.lib',
  3190. 'libpandatoolbase.lib',
  3191. 'libconverter.lib',
  3192. 'libpandaegg.dll',
  3193. 'libpanda.dll',
  3194. 'libpandaexpress.dll',
  3195. 'libdtoolconfig.dll',
  3196. 'libdtool.dll',
  3197. 'libpystub.dll',
  3198. ])
  3199. #
  3200. # DIRECTORY: pandatool/src/palettizer/
  3201. #
  3202. IPATH=['pandatool/src/palettizer']
  3203. OPTS=['NSPR']
  3204. CompileC(ipath=IPATH, opts=OPTS, src='palettizer_composite1.cxx', obj='palettizer_composite1.obj')
  3205. CompileLIB(lib='libpalettizer.lib', obj=['palettizer_composite1.obj'])
  3206. #
  3207. # DIRECTORY: pandatool/src/egg-mkfont/
  3208. #
  3209. if OMIT.count("FREETYPE")==0:
  3210. IPATH=['pandatool/src/egg-mkfont', 'pandatool/src/palettizer']
  3211. OPTS=['NSPR', 'FREETYPE']
  3212. CompileC(ipath=IPATH, opts=OPTS, src='eggMakeFont.cxx', obj='egg-mkfont_eggMakeFont.obj')
  3213. CompileC(ipath=IPATH, opts=OPTS, src='rangeDescription.cxx', obj='egg-mkfont_rangeDescription.obj')
  3214. CompileC(ipath=IPATH, opts=OPTS, src='rangeIterator.cxx', obj='egg-mkfont_rangeIterator.obj')
  3215. CompileLink(dll='egg-mkfont.exe', opts=['ADVAPI', 'NSPR', 'FREETYPE'], obj=[
  3216. 'egg-mkfont_eggMakeFont.obj',
  3217. 'egg-mkfont_rangeDescription.obj',
  3218. 'egg-mkfont_rangeIterator.obj',
  3219. 'libpalettizer.lib',
  3220. 'libeggbase.lib',
  3221. 'libprogbase.lib',
  3222. 'libpandatoolbase.lib',
  3223. 'libconverter.lib',
  3224. 'libpandaegg.dll',
  3225. 'libpanda.dll',
  3226. 'libpandaexpress.dll',
  3227. 'libdtoolconfig.dll',
  3228. 'libdtool.dll',
  3229. 'libpystub.dll',
  3230. ])
  3231. #
  3232. # DIRECTORY: pandatool/src/eggcharbase/
  3233. #
  3234. IPATH=['pandatool/src/eggcharbase']
  3235. OPTS=['ZLIB', 'NSPR']
  3236. CompileC(ipath=IPATH, opts=OPTS, src='eggcharbase_composite1.cxx', obj='eggcharbase_composite1.obj')
  3237. CompileLIB(lib='libeggcharbase.lib', obj=['eggcharbase_composite1.obj'])
  3238. #
  3239. # DIRECTORY: pandatool/src/egg-optchar/
  3240. #
  3241. IPATH=['pandatool/src/egg-optchar']
  3242. OPTS=['NSPR']
  3243. CompileC(ipath=IPATH, opts=OPTS, src='config_egg_optchar.cxx', obj='egg-optchar_config_egg_optchar.obj')
  3244. CompileC(ipath=IPATH, opts=OPTS, src='eggOptchar.cxx', obj='egg-optchar_eggOptchar.obj')
  3245. CompileC(ipath=IPATH, opts=OPTS, src='eggOptcharUserData.cxx', obj='egg-optchar_eggOptcharUserData.obj')
  3246. CompileC(ipath=IPATH, opts=OPTS, src='vertexMembership.cxx', obj='egg-optchar_vertexMembership.obj')
  3247. CompileLink(dll='egg-optchar.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3248. 'egg-optchar_config_egg_optchar.obj',
  3249. 'egg-optchar_eggOptchar.obj',
  3250. 'egg-optchar_eggOptcharUserData.obj',
  3251. 'egg-optchar_vertexMembership.obj',
  3252. 'libeggcharbase.lib',
  3253. 'libconverter.lib',
  3254. 'libeggbase.lib',
  3255. 'libprogbase.lib',
  3256. 'libpandatoolbase.lib',
  3257. 'libpandaegg.dll',
  3258. 'libpanda.dll',
  3259. 'libpandaexpress.dll',
  3260. 'libdtoolconfig.dll',
  3261. 'libdtool.dll',
  3262. 'libpystub.dll',
  3263. ])
  3264. #
  3265. # DIRECTORY: pandatool/src/egg-palettize/
  3266. #
  3267. IPATH=['pandatool/src/egg-palettize', 'pandatool/src/palettizer']
  3268. OPTS=['NSPR']
  3269. CompileC(ipath=IPATH, opts=OPTS, src='eggPalettize.cxx', obj='egg-palettize_eggPalettize.obj')
  3270. CompileLink(dll='egg-palettize.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3271. 'egg-palettize_eggPalettize.obj',
  3272. 'libpalettizer.lib',
  3273. 'libeggbase.lib',
  3274. 'libprogbase.lib',
  3275. 'libpandatoolbase.lib',
  3276. 'libconverter.lib',
  3277. 'libpandaegg.dll',
  3278. 'libpanda.dll',
  3279. 'libpandaexpress.dll',
  3280. 'libdtoolconfig.dll',
  3281. 'libdtool.dll',
  3282. 'libpystub.dll',
  3283. ])
  3284. #
  3285. # DIRECTORY: pandatool/src/egg-qtess/
  3286. #
  3287. IPATH=['pandatool/src/egg-qtess']
  3288. OPTS=['NSPR']
  3289. CompileC(ipath=IPATH, opts=OPTS, src='egg-qtess_composite1.cxx', obj='egg-qtess_composite1.obj')
  3290. CompileLink(dll='egg-qtess.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3291. 'egg-qtess_composite1.obj',
  3292. 'libeggbase.lib',
  3293. 'libprogbase.lib',
  3294. 'libconverter.lib',
  3295. 'libpandatoolbase.lib',
  3296. 'libpandaegg.dll',
  3297. 'libpanda.dll',
  3298. 'libpandaexpress.dll',
  3299. 'libdtoolconfig.dll',
  3300. 'libdtool.dll',
  3301. 'libpystub.dll',
  3302. ])
  3303. #
  3304. # DIRECTORY: pandatool/src/eggprogs/
  3305. #
  3306. IPATH=['pandatool/src/eggprogs']
  3307. OPTS=['NSPR']
  3308. CompileC(ipath=IPATH, opts=OPTS, src='eggCrop.cxx', obj='egg-crop_eggCrop.obj')
  3309. CompileLink(dll='egg-crop.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3310. 'egg-crop_eggCrop.obj',
  3311. 'libconverter.lib',
  3312. 'libeggbase.lib',
  3313. 'libprogbase.lib',
  3314. 'libpandatoolbase.lib',
  3315. 'libpandaegg.dll',
  3316. 'libpanda.dll',
  3317. 'libpandaexpress.dll',
  3318. 'libdtoolconfig.dll',
  3319. 'libdtool.dll',
  3320. 'libpystub.dll',
  3321. ])
  3322. CompileC(ipath=IPATH, opts=OPTS, src='eggMakeTube.cxx', obj='egg-make-tube_eggMakeTube.obj')
  3323. CompileLink(dll='egg-make-tube.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3324. 'egg-make-tube_eggMakeTube.obj',
  3325. 'libconverter.lib',
  3326. 'libeggbase.lib',
  3327. 'libprogbase.lib',
  3328. 'libpandatoolbase.lib',
  3329. 'libpandaegg.dll',
  3330. 'libpanda.dll',
  3331. 'libpandaexpress.dll',
  3332. 'libdtoolconfig.dll',
  3333. 'libdtool.dll',
  3334. 'libpystub.dll',
  3335. ])
  3336. CompileC(ipath=IPATH, opts=OPTS, src='eggTextureCards.cxx', obj='egg-texture-cards_eggTextureCards.obj')
  3337. CompileLink(dll='egg-texture-cards.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3338. 'egg-texture-cards_eggTextureCards.obj',
  3339. 'libconverter.lib',
  3340. 'libeggbase.lib',
  3341. 'libprogbase.lib',
  3342. 'libpandatoolbase.lib',
  3343. 'libpandaegg.dll',
  3344. 'libpanda.dll',
  3345. 'libpandaexpress.dll',
  3346. 'libdtoolconfig.dll',
  3347. 'libdtool.dll',
  3348. 'libpystub.dll',
  3349. ])
  3350. CompileC(ipath=IPATH, opts=OPTS, src='eggTopstrip.cxx', obj='egg-topstrip_eggTopstrip.obj')
  3351. CompileLink(dll='egg-topstrip.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3352. 'egg-topstrip_eggTopstrip.obj',
  3353. 'libeggcharbase.lib',
  3354. 'libconverter.lib',
  3355. 'libeggbase.lib',
  3356. 'libprogbase.lib',
  3357. 'libpandatoolbase.lib',
  3358. 'libpandaegg.dll',
  3359. 'libpanda.dll',
  3360. 'libpandaexpress.dll',
  3361. 'libdtoolconfig.dll',
  3362. 'libdtool.dll',
  3363. 'libpystub.dll',
  3364. ])
  3365. CompileC(ipath=IPATH, opts=OPTS, src='eggTrans.cxx', obj='egg-trans_eggTrans.obj')
  3366. CompileLink(dll='egg-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3367. 'egg-trans_eggTrans.obj',
  3368. 'libconverter.lib',
  3369. 'libeggbase.lib',
  3370. 'libprogbase.lib',
  3371. 'libpandatoolbase.lib',
  3372. 'libpandaegg.dll',
  3373. 'libpanda.dll',
  3374. 'libpandaexpress.dll',
  3375. 'libdtoolconfig.dll',
  3376. 'libdtool.dll',
  3377. 'libpystub.dll',
  3378. ])
  3379. CompileC(ipath=IPATH, opts=OPTS, src='eggToC.cxx', obj='egg2c_eggToC.obj')
  3380. CompileLink(dll='egg2c.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3381. 'egg2c_eggToC.obj',
  3382. 'libconverter.lib',
  3383. 'libeggbase.lib',
  3384. 'libprogbase.lib',
  3385. 'libpandatoolbase.lib',
  3386. 'libpandaegg.dll',
  3387. 'libpanda.dll',
  3388. 'libpandaexpress.dll',
  3389. 'libdtoolconfig.dll',
  3390. 'libdtool.dll',
  3391. 'libpystub.dll',
  3392. ])
  3393. #
  3394. # DIRECTORY: pandatool/src/flt/
  3395. #
  3396. IPATH=['pandatool/src/flt']
  3397. OPTS=['NSPR']
  3398. CompileC(ipath=IPATH, opts=OPTS, src='fltVectorRecord.cxx', obj='flt_fltVectorRecord.obj')
  3399. CompileC(ipath=IPATH, opts=OPTS, src='flt_composite1.cxx', obj='flt_composite1.obj')
  3400. CompileLIB(lib='libflt.lib', obj=['flt_fltVectorRecord.obj', 'flt_composite1.obj'])
  3401. #
  3402. # DIRECTORY: pandatool/src/fltegg/
  3403. #
  3404. IPATH=['pandatool/src/fltegg']
  3405. OPTS=['NSPR']
  3406. CompileC(ipath=IPATH, opts=OPTS, src='fltToEggConverter.cxx', obj='fltegg_fltToEggConverter.obj')
  3407. CompileC(ipath=IPATH, opts=OPTS, src='fltToEggLevelState.cxx', obj='fltegg_fltToEggLevelState.obj')
  3408. CompileLIB(lib='libfltegg.lib', obj=['fltegg_fltToEggConverter.obj', 'fltegg_fltToEggLevelState.obj'])
  3409. #
  3410. # DIRECTORY: pandatool/src/fltprogs/
  3411. #
  3412. IPATH=['pandatool/src/fltprogs', 'pandatool/src/flt', 'pandatool/src/cvscopy']
  3413. OPTS=['NSPR']
  3414. CompileC(ipath=IPATH, opts=OPTS, src='eggToFlt.cxx', obj='egg2flt_eggToFlt.obj')
  3415. CompileLink(dll='egg2flt.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3416. 'egg2flt_eggToFlt.obj',
  3417. 'libflt.lib',
  3418. 'libeggbase.lib',
  3419. 'libprogbase.lib',
  3420. 'libconverter.lib',
  3421. 'libpandatoolbase.lib',
  3422. 'libpandaegg.dll',
  3423. 'libpanda.dll',
  3424. 'libpandaexpress.dll',
  3425. 'libdtoolconfig.dll',
  3426. 'libdtool.dll',
  3427. 'libpystub.dll',
  3428. ])
  3429. CompileC(ipath=IPATH, opts=OPTS, src='fltInfo.cxx', obj='flt-info_fltInfo.obj')
  3430. CompileLink(dll='flt-info.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3431. 'flt-info_fltInfo.obj',
  3432. 'libprogbase.lib',
  3433. 'libflt.lib',
  3434. 'libpandatoolbase.lib',
  3435. 'libconverter.lib',
  3436. 'libpandaegg.dll',
  3437. 'libpanda.dll',
  3438. 'libpandaexpress.dll',
  3439. 'libdtoolconfig.dll',
  3440. 'libdtool.dll',
  3441. 'libpystub.dll',
  3442. ])
  3443. CompileC(ipath=IPATH, opts=OPTS, src='fltTrans.cxx', obj='flt-trans_fltTrans.obj')
  3444. CompileLink(dll='flt-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3445. 'flt-trans_fltTrans.obj',
  3446. 'libprogbase.lib',
  3447. 'libflt.lib',
  3448. 'libpandatoolbase.lib',
  3449. 'libconverter.lib',
  3450. 'libpandaegg.dll',
  3451. 'libpanda.dll',
  3452. 'libpandaexpress.dll',
  3453. 'libdtoolconfig.dll',
  3454. 'libdtool.dll',
  3455. 'libpystub.dll',
  3456. ])
  3457. CompileC(ipath=IPATH, opts=OPTS, src='fltToEgg.cxx', obj='flt2egg_fltToEgg.obj')
  3458. CompileLink(dll='flt2egg.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3459. 'flt2egg_fltToEgg.obj',
  3460. 'libflt.lib',
  3461. 'libfltegg.lib',
  3462. 'libeggbase.lib',
  3463. 'libprogbase.lib',
  3464. 'libconverter.lib',
  3465. 'libpandatoolbase.lib',
  3466. 'libpandaegg.dll',
  3467. 'libpanda.dll',
  3468. 'libpandaexpress.dll',
  3469. 'libdtoolconfig.dll',
  3470. 'libdtool.dll',
  3471. 'libpystub.dll',
  3472. ])
  3473. CompileC(ipath=IPATH, opts=OPTS, src='fltCopy.cxx', obj='fltcopy_fltCopy.obj')
  3474. CompileLink(dll='fltcopy.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3475. 'fltcopy_fltCopy.obj',
  3476. 'libcvscopy.lib',
  3477. 'libflt.lib',
  3478. 'libprogbase.lib',
  3479. 'libpandatoolbase.lib',
  3480. 'libconverter.lib',
  3481. 'libpandaegg.dll',
  3482. 'libpanda.dll',
  3483. 'libpandaexpress.dll',
  3484. 'libdtoolconfig.dll',
  3485. 'libdtool.dll',
  3486. 'libpystub.dll',
  3487. ])
  3488. #
  3489. # DIRECTORY: pandatool/src/imagebase/
  3490. #
  3491. IPATH=['pandatool/src/imagebase']
  3492. OPTS=['NSPR']
  3493. CompileC(ipath=IPATH, opts=OPTS, src='imagebase_composite1.cxx', obj='imagebase_composite1.obj')
  3494. CompileLIB(lib='libimagebase.lib', obj=['imagebase_composite1.obj'])
  3495. #
  3496. # DIRECTORY: pandatool/src/imageprogs/
  3497. #
  3498. IPATH=['pandatool/src/imageprogs']
  3499. OPTS=['NSPR']
  3500. CompileC(ipath=IPATH, opts=OPTS, src='imageInfo.cxx', obj='image-info_imageInfo.obj')
  3501. CompileLink(dll='image-info.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3502. 'image-info_imageInfo.obj',
  3503. 'libimagebase.lib',
  3504. 'libprogbase.lib',
  3505. 'libpandatoolbase.lib',
  3506. 'libpandaegg.dll',
  3507. 'libpanda.dll',
  3508. 'libpandaexpress.dll',
  3509. 'libdtoolconfig.dll',
  3510. 'libdtool.dll',
  3511. 'libpystub.dll',
  3512. ])
  3513. CompileC(ipath=IPATH, opts=OPTS, src='imageResize.cxx', obj='image-resize_imageResize.obj')
  3514. CompileLink(dll='image-resize.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3515. 'image-resize_imageResize.obj',
  3516. 'libimagebase.lib',
  3517. 'libprogbase.lib',
  3518. 'libpandatoolbase.lib',
  3519. 'libpandaegg.dll',
  3520. 'libpanda.dll',
  3521. 'libpandaexpress.dll',
  3522. 'libdtoolconfig.dll',
  3523. 'libdtool.dll',
  3524. 'libpystub.dll',
  3525. ])
  3526. CompileC(ipath=IPATH, opts=OPTS, src='imageTrans.cxx', obj='image-trans_imageTrans.obj')
  3527. CompileLink(dll='image-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3528. 'image-trans_imageTrans.obj',
  3529. 'libimagebase.lib',
  3530. 'libprogbase.lib',
  3531. 'libpandatoolbase.lib',
  3532. 'libpandaegg.dll',
  3533. 'libpanda.dll',
  3534. 'libpandaexpress.dll',
  3535. 'libdtoolconfig.dll',
  3536. 'libdtool.dll',
  3537. 'libpystub.dll',
  3538. ])
  3539. #
  3540. # DIRECTORY: pandatool/src/lwo/
  3541. #
  3542. IPATH=['pandatool/src/lwo']
  3543. OPTS=['NSPR']
  3544. CompileC(ipath=IPATH, opts=OPTS, src='lwo_composite1.cxx', obj='lwo_composite1.obj')
  3545. CompileLIB(lib='liblwo.lib', obj=['lwo_composite1.obj'])
  3546. #
  3547. # DIRECTORY: pandatool/src/lwoegg/
  3548. #
  3549. IPATH=['pandatool/src/lwoegg']
  3550. OPTS=['NSPR']
  3551. CompileC(ipath=IPATH, opts=OPTS, src='lwoegg_composite1.cxx', obj='lwoegg_composite1.obj')
  3552. CompileLIB(lib='liblwoegg.lib', obj=['lwoegg_composite1.obj'])
  3553. #
  3554. # DIRECTORY: pandatool/src/lwoprogs/
  3555. #
  3556. IPATH=['pandatool/src/lwoprogs', 'pandatool/src/lwo']
  3557. OPTS=['NSPR']
  3558. CompileC(ipath=IPATH, opts=OPTS, src='lwoScan.cxx', obj='lwo-scan_lwoScan.obj')
  3559. CompileLink(dll='lwo-scan.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3560. 'lwo-scan_lwoScan.obj',
  3561. 'liblwo.lib',
  3562. 'libprogbase.lib',
  3563. 'libpandatoolbase.lib',
  3564. 'libpandaegg.dll',
  3565. 'libpanda.dll',
  3566. 'libpandaexpress.dll',
  3567. 'libdtoolconfig.dll',
  3568. 'libdtool.dll',
  3569. 'libpystub.dll',
  3570. ])
  3571. CompileC(ipath=IPATH, opts=OPTS, src='lwoToEgg.cxx', obj='lwo2egg_lwoToEgg.obj')
  3572. CompileLink(dll='lwo2egg.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3573. 'lwo2egg_lwoToEgg.obj',
  3574. 'liblwo.lib',
  3575. 'liblwoegg.lib',
  3576. 'libeggbase.lib',
  3577. 'libprogbase.lib',
  3578. 'libpandatoolbase.lib',
  3579. 'libconverter.lib',
  3580. 'libpandaegg.dll',
  3581. 'libpanda.dll',
  3582. 'libpandaexpress.dll',
  3583. 'libdtoolconfig.dll',
  3584. 'libdtool.dll',
  3585. 'libpystub.dll',
  3586. ])
  3587. #
  3588. # DIRECTORY: pandatool/src/maya/
  3589. #
  3590. for VER in ["5","6","65"]:
  3591. if (OMIT.count("MAYA"+VER)==0):
  3592. IPATH=['pandatool/src/maya']
  3593. OPTS=['MAYA'+VER, 'NSPR']
  3594. CompileC(ipath=IPATH, opts=OPTS, src='maya_composite1.cxx', obj='maya'+VER+'_composite1.obj')
  3595. CompileLIB(lib='libmaya'+VER+'.lib', obj=[ 'maya'+VER+'_composite1.obj' ])
  3596. #
  3597. # DIRECTORY: pandatool/src/mayaegg/
  3598. #
  3599. for VER in ["5","6","65"]:
  3600. if (OMIT.count("MAYA"+VER)==0):
  3601. IPATH=['pandatool/src/mayaegg', 'pandatool/src/maya']
  3602. OPTS=['MAYA'+VER, 'NSPR']
  3603. CompileC(ipath=IPATH, opts=OPTS, src='mayaegg_composite1.cxx', obj='mayaegg'+VER+'_composite1.obj')
  3604. CompileLIB(lib='libmayaegg'+VER+'.lib', obj=[ 'mayaegg'+VER+'_composite1.obj' ])
  3605. #
  3606. # DIRECTORY: pandatool/src/maxegg/
  3607. #
  3608. for VER in ["5", "6", "7"]:
  3609. if (OMIT.count("MAX"+VER)==0):
  3610. IPATH=['pandatool/src/maxegg']
  3611. OPTS=['MAX'+VER, 'NSPR', "WINCOMCTL", "WINCOMDLG", "WINUSER", "MAXEGGDEF"]
  3612. CompileRES(ipath=IPATH, opts=OPTS, src='MaxEgg.rc', obj='maxegg'+VER+'_MaxEgg.res')
  3613. CompileC(ipath=IPATH, opts=OPTS, src='maxegg_composite1.cxx',obj='maxegg'+VER+'_composite1.obj')
  3614. CompileLink(opts=OPTS, dll='maxegg'+VER+'.dlo', obj=[
  3615. 'maxegg'+VER+'_composite1.obj',
  3616. 'maxegg'+VER+'_MaxEgg.res',
  3617. 'libeggbase.lib',
  3618. 'libprogbase.lib',
  3619. 'libpandatoolbase.lib',
  3620. 'libconverter.lib',
  3621. 'libpandaegg.dll',
  3622. 'libpanda.dll',
  3623. 'libpandaexpress.dll',
  3624. 'libdtoolconfig.dll',
  3625. 'libdtool.dll',
  3626. 'libpystub.dll'
  3627. ])
  3628. #
  3629. # DIRECTORY: pandatool/src/vrml/
  3630. #
  3631. CompileBison(pre='vrmlyy', dstc='vrmlParser.cxx', dsth='vrmlParser.h', src='pandatool/src/vrml/vrmlParser.yxx')
  3632. CompileFlex(pre='vrmlyy', dst='vrmlLexer.cxx', src='pandatool/src/vrml/vrmlLexer.lxx', dashi=0)
  3633. IPATH=['pandatool/src/vrml']
  3634. OPTS=['ZLIB', 'NSPR']
  3635. CompileC(ipath=IPATH, opts=OPTS, src='parse_vrml.cxx', obj='pvrml_parse_vrml.obj')
  3636. CompileC(ipath=IPATH, opts=OPTS, src='standard_nodes.cxx', obj='pvrml_standard_nodes.obj')
  3637. CompileC(ipath=IPATH, opts=OPTS, src='vrmlNode.cxx', obj='pvrml_vrmlNode.obj')
  3638. CompileC(ipath=IPATH, opts=OPTS, src='vrmlNodeType.cxx', obj='pvrml_vrmlNodeType.obj')
  3639. CompileC(ipath=IPATH, opts=OPTS, src='vrmlParser.cxx', obj='pvrml_vrmlParser.obj')
  3640. CompileC(ipath=IPATH, opts=OPTS, src='vrmlLexer.cxx', obj='pvrml_vrmlLexer.obj')
  3641. CompileLIB(lib='libpvrml.lib', obj=[
  3642. 'pvrml_parse_vrml.obj',
  3643. 'pvrml_standard_nodes.obj',
  3644. 'pvrml_vrmlNode.obj',
  3645. 'pvrml_vrmlNodeType.obj',
  3646. 'pvrml_vrmlParser.obj',
  3647. 'pvrml_vrmlLexer.obj',
  3648. ])
  3649. #
  3650. # DIRECTORY: pandatool/src/vrmlegg/
  3651. #
  3652. IPATH=['pandatool/src/vrmlegg', 'pandatool/src/vrml']
  3653. OPTS=['NSPR']
  3654. CompileC(ipath=IPATH, opts=OPTS, src='indexedFaceSet.cxx', obj='vrmlegg_indexedFaceSet.obj')
  3655. CompileC(ipath=IPATH, opts=OPTS, src='vrmlAppearance.cxx', obj='vrmlegg_vrmlAppearance.obj')
  3656. CompileC(ipath=IPATH, opts=OPTS, src='vrmlToEggConverter.cxx', obj='vrmlegg_vrmlToEggConverter.obj')
  3657. CompileLIB(lib='libvrmlegg.lib', obj=[
  3658. 'vrmlegg_indexedFaceSet.obj',
  3659. 'vrmlegg_vrmlAppearance.obj',
  3660. 'vrmlegg_vrmlToEggConverter.obj',
  3661. ])
  3662. #
  3663. # DIRECTORY: pandatool/src/xfile/
  3664. #
  3665. CompileBison(pre='xyy', dstc='xParser.cxx', dsth='xParser.h', src='pandatool/src/xfile/xParser.yxx')
  3666. CompileFlex(pre='xyy', dst='xLexer.cxx', src='pandatool/src/xfile/xLexer.lxx', dashi=1)
  3667. IPATH=['pandatool/src/xfile']
  3668. OPTS=['ZLIB', 'NSPR']
  3669. CompileC(ipath=IPATH, opts=OPTS, src='xfile_composite1.cxx', obj='xfile_composite1.obj')
  3670. CompileC(ipath=IPATH, opts=OPTS, src='xParser.cxx', obj='xfile_xParser.obj')
  3671. CompileC(ipath=IPATH, opts=OPTS, src='xLexer.cxx', obj='xfile_xLexer.obj')
  3672. CompileLIB(lib='libxfile.lib', obj=[
  3673. 'xfile_composite1.obj',
  3674. 'xfile_xParser.obj',
  3675. 'xfile_xLexer.obj',
  3676. ])
  3677. #
  3678. # DIRECTORY: pandatool/src/xfileegg/
  3679. #
  3680. IPATH=['pandatool/src/xfileegg', 'pandatool/src/xfile']
  3681. OPTS=['NSPR']
  3682. CompileC(ipath=IPATH, opts=OPTS, src='xfileegg_composite1.cxx', obj='xfileegg_composite1.obj')
  3683. CompileLIB(lib='libxfileegg.lib', obj=[
  3684. 'xfileegg_composite1.obj',
  3685. ])
  3686. #
  3687. # DIRECTORY: pandatool/src/ptloader/
  3688. #
  3689. IPATH=['pandatool/src/ptloader', 'pandatool/src/flt', 'pandatool/src/lwo', 'pandatool/src/xfile', 'pandatool/src/xfileegg']
  3690. OPTS=['BUILDING_PTLOADER', 'NSPR']
  3691. CompileC(ipath=IPATH, opts=OPTS, src='config_ptloader.cxx', obj='ptloader_config_ptloader.obj')
  3692. CompileC(ipath=IPATH, opts=OPTS, src='loaderFileTypePandatool.cxx', obj='ptloader_loaderFileTypePandatool.obj')
  3693. CompileLink(dll='libptloader.dll', opts=['ADVAPI', 'NSPR'], obj=[
  3694. 'ptloader_config_ptloader.obj',
  3695. 'ptloader_loaderFileTypePandatool.obj',
  3696. 'libfltegg.lib',
  3697. 'libflt.lib',
  3698. 'liblwoegg.lib',
  3699. 'liblwo.lib',
  3700. 'libdxfegg.lib',
  3701. 'libdxf.lib',
  3702. 'libvrmlegg.lib',
  3703. 'libpvrml.lib',
  3704. 'libxfileegg.lib',
  3705. 'libxfile.lib',
  3706. 'libconverter.lib',
  3707. 'libpandatoolbase.lib',
  3708. 'libeggbase.lib',
  3709. 'libprogbase.lib',
  3710. 'libpandaegg.dll',
  3711. 'libpanda.dll',
  3712. 'libpandaexpress.dll',
  3713. 'libdtoolconfig.dll',
  3714. 'libdtool.dll',
  3715. ])
  3716. #
  3717. # DIRECTORY: pandatool/src/mayaprogs/
  3718. #
  3719. for VER in ["5","6","65"]:
  3720. if (OMIT.count('MAYA'+VER)==0):
  3721. IPATH=['pandatool/src/mayaprogs', 'pandatool/src/maya', 'pandatool/src/mayaegg',
  3722. 'pandatool/src/cvscopy']
  3723. OPTS=['BUILDING_MISC', 'MAYA'+VER, 'NSPR']
  3724. CompileC(ipath=IPATH, opts=OPTS, src='config_mayaloader.cxx', obj='mayaloader'+VER+'_config_mayaloader.obj')
  3725. CompileLink(dll='libmayaloader'+VER+'.dll', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3726. 'mayaloader'+VER+'_config_mayaloader.obj',
  3727. 'libmayaegg'+VER+'.lib',
  3728. 'libptloader.lib',
  3729. 'libconverter.lib',
  3730. 'libpandatoolbase.lib',
  3731. 'libmaya'+VER+'.lib',
  3732. 'libfltegg.lib',
  3733. 'libflt.lib',
  3734. 'liblwoegg.lib',
  3735. 'liblwo.lib',
  3736. 'libdxfegg.lib',
  3737. 'libdxf.lib',
  3738. 'libvrmlegg.lib',
  3739. 'libpvrml.lib',
  3740. 'libxfileegg.lib',
  3741. 'libxfile.lib',
  3742. 'libeggbase.lib',
  3743. 'libprogbase.lib',
  3744. 'libpandaegg.dll',
  3745. 'libpanda.dll',
  3746. 'libpandaexpress.dll',
  3747. 'libdtoolconfig.dll',
  3748. 'libdtool.dll',
  3749. ])
  3750. CompileC(ipath=IPATH, opts=OPTS, src='mayaPview.cxx', obj='mayapview'+VER+'_mayaPview.obj')
  3751. CompileLink(dll='libmayapview'+VER+'.mll', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3752. 'mayapview'+VER+'_mayaPview.obj',
  3753. 'libmayaegg'+VER+'.lib',
  3754. 'libmaya'+VER+'.lib',
  3755. 'libconverter.lib',
  3756. 'libpandatoolbase.lib',
  3757. 'libpandaegg.dll',
  3758. 'libframework.dll',
  3759. 'libpanda.dll',
  3760. 'libpandaexpress.dll',
  3761. 'libdtoolconfig.dll',
  3762. 'libdtool.dll',
  3763. 'libpystub.dll',
  3764. ])
  3765. IPATH=['pandatool/src/mayaprogs', 'pandatool/src/maya', 'pandatool/src/mayaegg',
  3766. 'pandatool/src/cvscopy']
  3767. OPTS=['MAYA'+VER, 'NSPR']
  3768. CompileC(ipath=IPATH, opts=OPTS, src='mayaSavePview.cxx', obj='mayasavepview'+VER+'_mayaSavePview.obj')
  3769. CompileLink(dll='libmayasavepview'+VER+'.mll', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3770. 'mayasavepview'+VER+'_mayaSavePview.obj',
  3771. ])
  3772. CompileC(ipath=IPATH, opts=OPTS, src='mayaToEgg.cxx', obj='maya2egg'+VER+'_mayaToEgg.obj')
  3773. CompileLink(dll='maya2egg'+VER+'.exe', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3774. 'maya2egg'+VER+'_mayaToEgg.obj',
  3775. 'libmayaegg'+VER+'.lib',
  3776. 'libmaya'+VER+'.lib',
  3777. 'libeggbase.lib',
  3778. 'libprogbase.lib',
  3779. 'libconverter.lib',
  3780. 'libpandatoolbase.lib',
  3781. 'libpandaegg.dll',
  3782. 'libpanda.dll',
  3783. 'libpandaexpress.dll',
  3784. 'libdtoolconfig.dll',
  3785. 'libdtool.dll',
  3786. 'libpystub.dll',
  3787. ])
  3788. CompileC(ipath=IPATH, opts=OPTS, src='mayaCopy.cxx', obj='mayacopy'+VER+'_mayaCopy.obj')
  3789. CompileLink(dll='mayacopy'+VER+'.exe', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3790. 'mayacopy'+VER+'_mayaCopy.obj',
  3791. 'libcvscopy.lib',
  3792. 'libmaya'+VER+'.lib',
  3793. 'libprogbase.lib',
  3794. 'libpandatoolbase.lib',
  3795. 'libconverter.lib',
  3796. 'libpandaegg.dll',
  3797. 'libpanda.dll',
  3798. 'libpandaexpress.dll',
  3799. 'libdtoolconfig.dll',
  3800. 'libdtool.dll',
  3801. 'libpystub.dll',
  3802. ])
  3803. #
  3804. # DIRECTORY: pandatool/src/miscprogs/
  3805. #
  3806. IPATH=['pandatool/src/miscprogs']
  3807. OPTS=['NSPR']
  3808. CompileC(ipath=IPATH, opts=OPTS, src='binToC.cxx', obj='bin2c_binToC.obj')
  3809. CompileLink(dll='bin2c.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3810. 'bin2c_binToC.obj',
  3811. 'libprogbase.lib',
  3812. 'libpandatoolbase.lib',
  3813. 'libpanda.dll',
  3814. 'libpandaexpress.dll',
  3815. 'libdtoolconfig.dll',
  3816. 'libdtool.dll',
  3817. 'libpystub.dll',
  3818. ])
  3819. #
  3820. # DIRECTORY: pandatool/src/pstatserver/
  3821. #
  3822. if OMIT.count("NSPR")==0:
  3823. IPATH=['pandatool/src/pstatserver']
  3824. OPTS=['NSPR']
  3825. CompileC(ipath=IPATH, opts=OPTS, src='pstatserver_composite1.cxx', obj='pstatserver_composite1.obj')
  3826. CompileLIB(lib='libpstatserver.lib', obj=[ 'pstatserver_composite1.obj' ])
  3827. #
  3828. # DIRECTORY: pandatool/src/softprogs/
  3829. #
  3830. IPATH=['pandatool/src/softprogs']
  3831. OPTS=['NSPR']
  3832. CompileC(ipath=IPATH, opts=OPTS, src='softCVS.cxx', obj='softcvs_softCVS.obj')
  3833. CompileC(ipath=IPATH, opts=OPTS, src='softFilename.cxx', obj='softcvs_softFilename.obj')
  3834. CompileLink(opts=['ADVAPI', 'NSPR'], dll='softcvs.exe', obj=[
  3835. 'softcvs_softCVS.obj',
  3836. 'softcvs_softFilename.obj',
  3837. 'libprogbase.lib',
  3838. 'libpandatoolbase.lib',
  3839. 'libpandaegg.dll',
  3840. 'libpanda.dll',
  3841. 'libpandaexpress.dll',
  3842. 'libdtoolconfig.dll',
  3843. 'libdtool.dll',
  3844. 'libpystub.dll',
  3845. ])
  3846. #
  3847. # DIRECTORY: pandatool/src/text-stats/
  3848. #
  3849. if OMIT.count("NSPR")==0:
  3850. IPATH=['pandatool/src/text-stats']
  3851. OPTS=['NSPR']
  3852. CompileC(ipath=IPATH, opts=OPTS, src='textMonitor.cxx', obj='text-stats_textMonitor.obj')
  3853. CompileC(ipath=IPATH, opts=OPTS, src='textStats.cxx', obj='text-stats_textStats.obj')
  3854. CompileLink(opts=['ADVAPI', 'NSPR'], dll='text-stats.exe', obj=[
  3855. 'text-stats_textMonitor.obj',
  3856. 'text-stats_textStats.obj',
  3857. 'libprogbase.lib',
  3858. 'libpstatserver.lib',
  3859. 'libpandatoolbase.lib',
  3860. 'libpandaegg.dll',
  3861. 'libpanda.dll',
  3862. 'libpandaexpress.dll',
  3863. 'libdtoolconfig.dll',
  3864. 'libdtool.dll',
  3865. 'libpystub.dll',
  3866. ])
  3867. #
  3868. # DIRECTORY: pandatool/src/vrmlprogs/
  3869. #
  3870. IPATH=['pandatool/src/vrmlprogs', 'pandatool/src/vrml', 'pandatool/src/vrmlegg']
  3871. OPTS=['NSPR']
  3872. CompileC(ipath=IPATH, opts=OPTS, src='vrmlTrans.cxx', obj='vrml-trans_vrmlTrans.obj')
  3873. CompileLink(opts=['ADVAPI', 'NSPR'], dll='vrml-trans.exe', obj=[
  3874. 'vrml-trans_vrmlTrans.obj',
  3875. 'libprogbase.lib',
  3876. 'libpvrml.lib',
  3877. 'libpandatoolbase.lib',
  3878. 'libpanda.dll',
  3879. 'libpandaexpress.dll',
  3880. 'libdtoolconfig.dll',
  3881. 'libdtool.dll',
  3882. 'libpystub.dll',
  3883. ])
  3884. CompileC(ipath=IPATH, opts=OPTS, src='vrmlToEgg.cxx', obj='vrml2egg_vrmlToEgg.obj')
  3885. CompileLink(opts=['ADVAPI', 'NSPR'], dll='vrml2egg.exe', obj=[
  3886. 'vrml2egg_vrmlToEgg.obj',
  3887. 'libvrmlegg.lib',
  3888. 'libpvrml.lib',
  3889. 'libeggbase.lib',
  3890. 'libprogbase.lib',
  3891. 'libpandatoolbase.lib',
  3892. 'libconverter.lib',
  3893. 'libpandaegg.dll',
  3894. 'libpanda.dll',
  3895. 'libpandaexpress.dll',
  3896. 'libdtoolconfig.dll',
  3897. 'libdtool.dll',
  3898. 'libpystub.dll',
  3899. ])
  3900. #
  3901. # DIRECTORY: pandatool/src/win-stats/
  3902. #
  3903. if (OMIT.count("NSPR")==0) and (sys.platform == "win32"):
  3904. IPATH=['pandatool/src/win-stats']
  3905. OPTS=['NSPR']
  3906. CompileC(ipath=IPATH, opts=OPTS, src='winstats_composite1.cxx', obj='pstats_composite1.obj')
  3907. CompileLink(opts=['WINSOCK', 'WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NSPR'],
  3908. dll='pstats.exe', obj=[
  3909. 'pstats_composite1.obj',
  3910. 'libprogbase.lib',
  3911. 'libpstatserver.lib',
  3912. 'libpandatoolbase.lib',
  3913. 'libpandaexpress.dll',
  3914. 'libpanda.dll',
  3915. 'libdtoolconfig.dll',
  3916. 'libdtool.dll',
  3917. 'libpystub.dll',
  3918. ])
  3919. #
  3920. # DIRECTORY: pandatool/src/xfileprogs/
  3921. #
  3922. IPATH=['pandatool/src/xfileprogs', 'pandatool/src/xfile', 'pandatool/src/xfileegg']
  3923. OPTS=['NSPR']
  3924. CompileC(ipath=IPATH, opts=OPTS, src='eggToX.cxx', obj='egg2x_eggToX.obj')
  3925. CompileLink(dll='egg2x.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3926. 'egg2x_eggToX.obj',
  3927. 'libxfileegg.lib',
  3928. 'libxfile.lib',
  3929. 'libeggbase.lib',
  3930. 'libprogbase.lib',
  3931. 'libpandatoolbase.lib',
  3932. 'libconverter.lib',
  3933. 'libpandaegg.dll',
  3934. 'libpanda.dll',
  3935. 'libpandaexpress.dll',
  3936. 'libdtoolconfig.dll',
  3937. 'libdtool.dll',
  3938. 'libpystub.dll',
  3939. ])
  3940. CompileC(ipath=IPATH, opts=OPTS, src='xFileTrans.cxx', obj='x-trans_xFileTrans.obj')
  3941. CompileLink(dll='x-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3942. 'x-trans_xFileTrans.obj',
  3943. 'libprogbase.lib',
  3944. 'libxfile.lib',
  3945. 'libpandatoolbase.lib',
  3946. 'libpanda.dll',
  3947. 'libpandaexpress.dll',
  3948. 'libdtoolconfig.dll',
  3949. 'libdtool.dll',
  3950. 'libpystub.dll',
  3951. ])
  3952. CompileC(ipath=IPATH, opts=OPTS, src='xFileToEgg.cxx', obj='x2egg_xFileToEgg.obj')
  3953. CompileLink(opts=['ADVAPI', 'NSPR'], dll='x2egg.exe', obj=[
  3954. 'x2egg_xFileToEgg.obj',
  3955. 'libxfileegg.lib',
  3956. 'libxfile.lib',
  3957. 'libconverter.lib',
  3958. 'libeggbase.lib',
  3959. 'libprogbase.lib',
  3960. 'libpandatoolbase.lib',
  3961. 'libpandaegg.dll',
  3962. 'libpanda.dll',
  3963. 'libpandaexpress.dll',
  3964. 'libdtoolconfig.dll',
  3965. 'libdtool.dll',
  3966. 'libpystub.dll',
  3967. ])
  3968. #
  3969. # DIRECTORY: pandaapp/src/pandaappbase/
  3970. #
  3971. IPATH=['pandaapp/src/pandaappbase']
  3972. OPTS=['NSPR']
  3973. CompileC(ipath=IPATH, opts=OPTS, src='pandaappbase.cxx', obj='pandaappbase_pandaappbase.obj')
  3974. CompileLIB(lib='libpandaappbase.lib', obj=['pandaappbase_pandaappbase.obj'])
  3975. #
  3976. # DIRECTORY: pandaapp/src/httpbackup/
  3977. #
  3978. if OMIT.count("SSL")==0:
  3979. IPATH=['pandaapp/src/httpbackup', 'pandaapp/src/pandaappbase']
  3980. OPTS=['SSL', 'NSPR']
  3981. CompileC(ipath=IPATH, opts=OPTS, src='backupCatalog.cxx', obj='httpbackup_backupCatalog.obj')
  3982. CompileC(ipath=IPATH, opts=OPTS, src='httpBackup.cxx', obj='httpbackup_httpBackup.obj')
  3983. CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='httpbackup.exe', obj=[
  3984. 'httpbackup_backupCatalog.obj',
  3985. 'httpbackup_httpBackup.obj',
  3986. 'libpandaappbase.lib',
  3987. 'libpandaexpress.dll',
  3988. 'libpanda.dll',
  3989. 'libdtool.dll',
  3990. 'libdtoolconfig.dll',
  3991. 'libprogbase.lib',
  3992. 'libpandatoolbase.lib',
  3993. 'libpystub.dll',
  3994. ])
  3995. #
  3996. # DIRECTORY: pandaapp/src/indexify/
  3997. #
  3998. if OMIT.count("FREETYPE")==0:
  3999. IPATH=['pandaapp/src/indexify']
  4000. OPTS=['NSPR', 'FREETYPE']
  4001. CompileC(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='font-samples_default_font.obj')
  4002. CompileC(ipath=IPATH, opts=OPTS, src='fontSamples.cxx', obj='font-samples_fontSamples.obj')
  4003. CompileLink(opts=['ADVAPI', 'NSPR', 'FREETYPE'], dll='font-samples.exe', obj=[
  4004. 'font-samples_default_font.obj',
  4005. 'font-samples_fontSamples.obj',
  4006. 'libpanda.dll',
  4007. 'libpandaexpress.dll',
  4008. 'libdtool.dll',
  4009. 'libdtoolconfig.dll',
  4010. 'libprogbase.lib',
  4011. 'libpandatoolbase.lib',
  4012. 'libpystub.dll',
  4013. ])
  4014. CompileC(ipath=IPATH, opts=OPTS, src='default_index_icons.cxx', obj='indexify_default_index_icons.obj')
  4015. CompileC(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='indexify_default_font.obj')
  4016. CompileC(ipath=IPATH, opts=OPTS, src='indexImage.cxx', obj='indexify_indexImage.obj')
  4017. CompileC(ipath=IPATH, opts=OPTS, src='indexParameters.cxx', obj='indexify_indexParameters.obj')
  4018. CompileC(ipath=IPATH, opts=OPTS, src='indexify.cxx', obj='indexify_indexify.obj')
  4019. CompileC(ipath=IPATH, opts=OPTS, src='photo.cxx', obj='indexify_photo.obj')
  4020. CompileC(ipath=IPATH, opts=OPTS, src='rollDirectory.cxx', obj='indexify_rollDirectory.obj')
  4021. CompileLink(opts=['ADVAPI', 'NSPR', 'FREETYPE'], dll='indexify.exe', obj=[
  4022. 'indexify_default_index_icons.obj',
  4023. 'indexify_default_font.obj',
  4024. 'indexify_indexImage.obj',
  4025. 'indexify_indexParameters.obj',
  4026. 'indexify_indexify.obj',
  4027. 'indexify_photo.obj',
  4028. 'indexify_rollDirectory.obj',
  4029. 'libpanda.dll',
  4030. 'libpandaexpress.dll',
  4031. 'libdtool.dll',
  4032. 'libdtoolconfig.dll',
  4033. 'libprogbase.lib',
  4034. 'libpandatoolbase.lib',
  4035. 'libpystub.dll',
  4036. ])
  4037. #
  4038. # DIRECTORY: pandaapp/src/stitchbase/
  4039. #
  4040. CompileBison(pre='stitchyy', dstc='stitchParser.cxx', dsth='stitchParser.h', src='pandaapp/src/stitchbase/stitchParser.yxx')
  4041. CompileFlex(pre='stitchyy', dst='stitchLexer.cxx', src='pandaapp/src/stitchbase/stitchLexer.lxx', dashi=1)
  4042. IPATH=['pandaapp/src/stitchbase', 'pandaapp/src/pandaappbase']
  4043. OPTS=['NSPR']
  4044. CompileC(ipath=IPATH, opts=OPTS, src='stitchbase_composite1.cxx', obj='stitchbase_composite1.obj')
  4045. CompileC(ipath=IPATH, opts=OPTS, src='stitchbase_composite2.cxx', obj='stitchbase_composite2.obj')
  4046. CompileC(ipath=IPATH, opts=OPTS, src='stitchParser.cxx', obj='stitchbase_stitchParser.obj')
  4047. CompileC(ipath=IPATH, opts=OPTS, src='stitchLexer.cxx', obj='stitchbase_stitchLexer.obj')
  4048. CompileLIB(lib='libstitchbase.lib', obj=[
  4049. 'stitchbase_composite1.obj',
  4050. 'stitchbase_composite2.obj',
  4051. 'stitchbase_stitchParser.obj',
  4052. 'stitchbase_stitchLexer.obj',
  4053. ])
  4054. #
  4055. # DIRECTORY: pandaapp/src/stitch/
  4056. #
  4057. IPATH=['pandaapp/src/stitch', 'pandaapp/src/stitchbase', 'pandaapp/src/pandaappbase']
  4058. OPTS=['NSPR']
  4059. CompileC(ipath=IPATH, opts=OPTS, src='stitchCommandProgram.cxx', obj='stitch-command_stitchCommandProgram.obj')
  4060. CompileLink(opts=['ADVAPI', 'NSPR', 'FFTW'], dll='stitch-command.exe', obj=[
  4061. 'stitch-command_stitchCommandProgram.obj',
  4062. 'libstitchbase.lib',
  4063. 'libpandaappbase.lib',
  4064. 'libpanda.dll',
  4065. 'libpandaexpress.dll',
  4066. 'libdtoolconfig.dll',
  4067. 'libdtool.dll',
  4068. 'libprogbase.lib',
  4069. 'libpandatoolbase.lib',
  4070. 'libconverter.lib',
  4071. 'libpystub.dll',
  4072. ])
  4073. CompileC(ipath=IPATH, opts=OPTS, src='stitchImageProgram.cxx', obj='stitch-image_stitchImageProgram.obj')
  4074. CompileLink(opts=['ADVAPI', 'NSPR', 'FFTW'], dll='stitch-image.exe', obj=[
  4075. 'stitch-image_stitchImageProgram.obj',
  4076. 'libstitchbase.lib',
  4077. 'libpandaappbase.lib',
  4078. 'libpanda.dll',
  4079. 'libpandaexpress.dll',
  4080. 'libdtoolconfig.dll',
  4081. 'libdtool.dll',
  4082. 'libprogbase.lib',
  4083. 'libpandatoolbase.lib',
  4084. 'libconverter.lib',
  4085. 'libpystub.dll',
  4086. ])
  4087. ##########################################################################################
  4088. #
  4089. # Copy Sounds, Icons, and Models into the build.
  4090. #
  4091. ##########################################################################################
  4092. MakeDirectory(PREFIX+"/models")
  4093. MakeDirectory(PREFIX+"/models/audio")
  4094. MakeDirectory(PREFIX+"/models/audio/sfx")
  4095. MakeDirectory(PREFIX+"/models/icons")
  4096. MakeDirectory(PREFIX+"/models/maps")
  4097. MakeDirectory(PREFIX+"/models/misc")
  4098. MakeDirectory(PREFIX+"/models/gui")
  4099. CopyAllFiles(PREFIX+"/models/audio/sfx/", "dmodels/src/audio/sfx/", ".wav")
  4100. CopyAllFiles(PREFIX+"/models/icons/", "dmodels/src/icons/", ".gif")
  4101. CopyAllFiles(PREFIX+"/models/", "models/", ".egg")
  4102. CopyAllFiles(PREFIX+"/models/", "models/", ".bam")
  4103. CopyAllFiles(PREFIX+"/models/maps/", "models/maps/", ".jpg")
  4104. CopyAllFiles(PREFIX+"/models/maps/", "models/maps/", ".png")
  4105. CopyAllFiles(PREFIX+"/models/maps/", "models/maps/", ".rgb")
  4106. CopyAllFiles(PREFIX+"/models/maps/", "models/maps/", ".rgba")
  4107. CopyAllFiles(PREFIX+"/models/maps/", "dmodels/src/maps/", ".jpg")
  4108. CopyAllFiles(PREFIX+"/models/maps/", "dmodels/src/maps/", ".png")
  4109. CopyAllFiles(PREFIX+"/models/maps/", "dmodels/src/maps/", ".rgb")
  4110. CopyAllFiles(PREFIX+"/models/maps/", "dmodels/src/maps/", ".rgba")
  4111. CompileBAM("../=", PREFIX+"/models/gui/dialog_box_gui.bam", "dmodels/src/gui/dialog_box_gui.flt")
  4112. CompileBAM("../=", PREFIX+"/models/misc/camera.bam", "dmodels/src/misc/camera.flt")
  4113. CompileBAM("../=", PREFIX+"/models/misc/fade.bam", "dmodels/src/misc/fade.flt")
  4114. CompileBAM("../=", PREFIX+"/models/misc/fade_sphere.bam", "dmodels/src/misc/fade_sphere.flt")
  4115. CompileBAM("../=", PREFIX+"/models/misc/gridBack.bam", "dmodels/src/misc/gridBack.flt")
  4116. CompileBAM("../=", PREFIX+"/models/misc/iris.bam", "dmodels/src/misc/iris.flt")
  4117. CompileBAM("../=", PREFIX+"/models/misc/lilsmiley.bam", "dmodels/src/misc/lilsmiley.egg")
  4118. CompileBAM("../=", PREFIX+"/models/misc/objectHandles.bam", "dmodels/src/misc/objectHandles.flt")
  4119. CompileBAM("../=", PREFIX+"/models/misc/rgbCube.bam", "dmodels/src/misc/rgbCube.flt")
  4120. CompileBAM("../=", PREFIX+"/models/misc/smiley.bam", "dmodels/src/misc/smiley.egg")
  4121. CompileBAM("../=", PREFIX+"/models/misc/sphere.bam", "dmodels/src/misc/sphere.flt")
  4122. CompileBAM("../=", PREFIX+"/models/misc/xyzAxis.bam", "dmodels/src/misc/xyzAxis.flt")
  4123. CompileBAM("../=", PREFIX+"/models/misc/Pointlight.bam", "dmodels/src/misc/Pointlight.egg")
  4124. CompileBAM("../=", PREFIX+"/models/misc/Dirlight.bam", "dmodels/src/misc/Dirlight.egg")
  4125. CompileBAM("../=", PREFIX+"/models/misc/Spotlight.bam", "dmodels/src/misc/Spotlight.egg")
  4126. ##########################################################################################
  4127. #
  4128. # Run genpycode
  4129. #
  4130. ##########################################################################################
  4131. if (older(PREFIX+'/pandac/PandaModules.pyz',xpaths(PREFIX+"/pandac/input/",ALLIN,""))):
  4132. ALLTARGETS.append(PREFIX+'/pandac/PandaModules.pyz')
  4133. if (sys.platform=="win32"):
  4134. if (GENMAN): oscmd(PREFIX+"/bin/genpycode.exe -m")
  4135. else : oscmd(PREFIX+"/bin/genpycode.exe")
  4136. else:
  4137. if (GENMAN): oscmd(PREFIX+"/bin/genpycode -m")
  4138. else : oscmd(PREFIX+"/bin/genpycode")
  4139. updatefiledate(PREFIX+'/pandac/PandaModules.pyz')
  4140. ########################################################################
  4141. ##
  4142. ## Save the CXX include-cache for next time.
  4143. ##
  4144. ########################################################################
  4145. try: icache = open(iCachePath,'wb')
  4146. except: icache = 0
  4147. if (icache!=0):
  4148. cPickle.dump(CxxIncludeCache, icache, 1)
  4149. icache.close()
  4150. ##########################################################################################
  4151. #
  4152. # 'Complete' mode.
  4153. #
  4154. # Copies the samples and direct into the build. Note that
  4155. # this isn't usually what you want. It is usually better to let the
  4156. # compiled panda load this stuff directly from the source tree.
  4157. # The only time you really want to do this is if you plan to move
  4158. # the build somewhere and leave the source tree behind.
  4159. #
  4160. ##########################################################################################
  4161. if (COMPLETE):
  4162. CopyFile(PREFIX+'/', 'InstallerNotes')
  4163. CopyFile(PREFIX+'/', 'LICENSE')
  4164. CopyFile(PREFIX+'/', 'README')
  4165. CopyTree(PREFIX+'/samples', 'samples')
  4166. CopyTree(PREFIX+'/direct/src', 'direct/src')
  4167. CopyTree(PREFIX+'/SceneEditor', 'SceneEditor')
  4168. ##########################################################################################
  4169. #
  4170. # The Installers
  4171. #
  4172. ##########################################################################################
  4173. if (sys.platform == "win32"):
  4174. def MakeInstaller(file,fullname,smdirectory,uninstallkey,installdir,ppgame):
  4175. if (older(file, ALLTARGETS)):
  4176. print "Building "+fullname+" installer. This can take up to an hour."
  4177. if (COMPRESSOR != "lzma"):
  4178. print("Note: you are using zlib, which is faster, but lzma gives better compression.")
  4179. if (os.path.exists(file)):
  4180. os.remove(file)
  4181. if (os.path.exists("nsis-output.exe")):
  4182. os.remove("nsis-output.exe")
  4183. def0 = '/DCOMPRESSOR="' + COMPRESSOR + '" '
  4184. def1 = '/DFULLNAME="' + fullname + '" '
  4185. def2 = '/DSMDIRECTORY="' + smdirectory + '" '
  4186. def3 = '/DUNINSTALLKEY="' + uninstallkey + '" '
  4187. def4 = '/DINSTALLDIR="' + installdir + '" '
  4188. def5 = ''
  4189. if (ppgame): def5 = '/DPPGAME="' + ppgame + '" '
  4190. oscmd("thirdparty/win-nsis/makensis.exe /V2 "+def0+def1+def2+def3+def4+def5+" makepanda/panda.nsi")
  4191. os.rename("nsis-output.exe", file)
  4192. if (INSTALLER!=0):
  4193. MakeInstaller("Panda3D-"+VERSION+".exe", "Panda3D", "Panda3D "+VERSION,
  4194. "Panda3D "+VERSION, "C:\\Panda3D-"+VERSION, 0)
  4195. if (PPGAME!=0):
  4196. if (os.path.isdir(PPGAME)==0):
  4197. sys.exit("No such directory "+PPGAME)
  4198. if (os.path.exists(os.path.join(PPGAME,PPGAME+".py"))==0):
  4199. sys.exit("No such file "+PPGAME+"/"+PPGAME+".py")
  4200. MakeInstaller(PPGAME+"-"+VERSION+".exe", PPGAME, PPGAME+" "+VERSION,
  4201. PPGAME+" "+VERSION, "C:\\"+PPGAME+"-"+VERSION, PPGAME)
  4202. ##########################################################################################
  4203. #
  4204. # Print final status report.
  4205. #
  4206. ##########################################################################################
  4207. WARNINGS.append("Elapsed Time: "+prettyTime(time.time() - STARTTIME))
  4208. printStatus("Makepanda Final Status Report", WARNINGS)