makepanda.py 191 KB

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