makepanda.py 191 KB

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