makepanda.py 187 KB

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