makepanda.py 204 KB

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