makepanda.py 184 KB

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