makepanda.py 189 KB

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