makepanda.py 185 KB

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