makepanda.py 188 KB

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