makepanda.py 186 KB

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