makepanda.py 185 KB

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