makepanda.py 188 KB

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