makepanda.py 188 KB

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