otherMakePanda.py 203 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798
  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
  15. from glob import glob
  16. ########################################################################
  17. ##
  18. ## Utility Routines
  19. ##
  20. ## filedate(f) - returns the last modified date of the specified file.
  21. ## youngest(f1,f2...) - returns date of most recently modified file.
  22. ## older(f,f1,f2...) - return true if f is older than all the others.
  23. ## xpaths(pre,pathlist,suf) - appends prefix and suffix to every path.
  24. ##
  25. ########################################################################
  26. global FileDateCache
  27. FileDateCache = {}
  28. def filedate(path):
  29. global FileDateCache
  30. if FileDateCache.has_key(path):
  31. return FileDateCache[path]
  32. try: date = os.path.getmtime(path)
  33. except: date = 0
  34. FileDateCache[path] = date
  35. return date
  36. def updatefiledate(path):
  37. global FileDateCache
  38. try: date = os.path.getmtime(path)
  39. except: date = 0
  40. FileDateCache[path] = date
  41. def youngest(files):
  42. if type(files) == str:
  43. source = filedate(files)
  44. if (source==0):
  45. sys.exit("Error: source file not readable: "+files)
  46. return source
  47. result = 0
  48. for sfile in files:
  49. source = youngest(sfile)
  50. if (source > result): result = source
  51. return result
  52. def older(file,others):
  53. return filedate(file)<youngest(others)
  54. def xpaths(prefix,base,suffix):
  55. if type(base) == str:
  56. return prefix + base + suffix
  57. result = []
  58. for x in base:
  59. result.append(xpaths(prefix,x,suffix))
  60. return result
  61. if sys.platform == "win32" or sys.platform == "cygwin":
  62. import _winreg
  63. def GetRegistryKey(path, subkey):
  64. k1=0
  65. key=0
  66. try:
  67. key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, path, 0, _winreg.KEY_READ)
  68. k1, k2 = _winreg.QueryValueEx(key, subkey)
  69. except: pass
  70. if (key!=0): _winreg.CloseKey(key)
  71. return k1
  72. def oslocalcmd(cd, cmd):
  73. if VERBOSE:
  74. if cd != ".":
  75. print "( cd "+cd+"; "+cmd+" )"
  76. else:
  77. print cmd
  78. if cd != ".":
  79. base=os.getcwd()
  80. os.chdir(cd)
  81. sys.stdout.flush()
  82. if sys.platform == "win32" or sys.platform == "cygwin":
  83. exe = cmd.split()[0]
  84. if os.path.isfile(exe)==0:
  85. for i in os.environ["PATH"].split(";"):
  86. if os.path.isfile(os.path.join(i, exe)):
  87. exe = os.path.join(i, exe)
  88. break
  89. if os.path.isfile(exe)==0:
  90. sys.exit("Cannot find "+exe+" on search path")
  91. res = os.spawnl(os.P_WAIT, exe, cmd)
  92. else:
  93. res = os.system(cmd)
  94. if res != 0:
  95. if not VERBOSE:
  96. print "\n------------- Command Failed ---------------"
  97. if cd != ".":
  98. print "( cd "+cd+"; "+cmd+" )"
  99. else:
  100. print cmd
  101. print "--------------------------------------------"
  102. sys.exit(res)
  103. if cd != ".":
  104. os.chdir(base)
  105. def oscmd(cmd):
  106. oslocalcmd(".",cmd)
  107. def osmove(src,dst):
  108. """
  109. Move src file or directory to dst. dst will be removed if it
  110. exists (i.e. overwritten).
  111. """
  112. global VERBOSE
  113. if VERBOSE >= 1:
  114. print "Moving \"%s\" to \"%s\""%(src, dst)
  115. try: os.remove(dst)
  116. except OSError: pass
  117. os.rename(src, dst)
  118. def replaceInFile(srcPath, dstPath, replaceA, withB):
  119. global VERBOSE
  120. if VERBOSE >= 1:
  121. print "Replacing '%s' in \"%s\" with '%s' and writing it to \"%s\""%(
  122. replaceA, srcPath, withB, dstPath)
  123. f=file(srcPath, "rb")
  124. data=f.read()
  125. f.close()
  126. data=data.replace(replaceA, withB)
  127. f=file(dstPath, "wb")
  128. f.write(data)
  129. f.close()
  130. def buildingwhat(opts):
  131. building = 0
  132. for x in opts:
  133. if (x[:9]=="BUILDING_"): building = x[9:]
  134. return building
  135. def ReadFile(wfile):
  136. try:
  137. srchandle = open(wfile, "rb")
  138. data = srchandle.read()
  139. srchandle.close()
  140. return data
  141. except: sys.exit("Cannot read "+wfile)
  142. def WriteFile(wfile,data):
  143. try:
  144. dsthandle = open(wfile, "wb")
  145. dsthandle.write(data)
  146. dsthandle.close()
  147. except: sys.exit("Cannot write "+wfile)
  148. def prettyTime(t):
  149. t = int(t)
  150. hours = t/3600
  151. t -= hours*3600
  152. minutes = t/60
  153. t -= minutes*60
  154. seconds = t
  155. if (hours): return str(hours)+" hours "+str(minutes)+" min"
  156. if (minutes): return str(minutes)+" min "+str(seconds)+" sec"
  157. return str(seconds)+" sec"
  158. def MakeDirectory(path):
  159. if os.path.isdir(path): return 0
  160. os.mkdir(path)
  161. ########################################################################
  162. ##
  163. ## Default options:
  164. ##
  165. ## You might be tempted to change the defaults by editing them
  166. ## here. Don't do it. Instead, create a script that compiles
  167. ## panda with your preferred options.
  168. ##
  169. ########################################################################
  170. if (sys.platform == "win32"): COMPILERS=["MSVC7", "MSVC71", "MINGW"]
  171. elif (sys.platform == "cygwin"): COMPILERS=["MSVC7", "MSVC71", "GCC33"]
  172. elif (sys.platform == "linux2"): COMPILERS=["LINUXA"]
  173. else:
  174. print "which compiler should be used for %s"%(sys.platform,)
  175. PREFIX="built"
  176. COMPILER=COMPILERS[0]
  177. OPTIMIZE="3"
  178. INSTALLER=0
  179. GENMAN=0
  180. PPGAME=0
  181. COMPLETE=0
  182. THIRDPARTY="thirdparty"
  183. VERSION="0.0.0"
  184. VERBOSE=1
  185. COMPRESSOR="zlib"
  186. PACKAGES=["ZLIB","PNG","JPEG","TIFF","VRPN","FMOD","NVIDIACG","HELIX","NSPR",
  187. "SSL","FREETYPE","FFTW","MILES","MAYA5","MAYA6","MAYA65","MAX5","MAX6","MAX7"]
  188. OMIT=PACKAGES[:]
  189. WARNINGS=[]
  190. SDK_LIB_PATH = {}
  191. DIRECTXSDK = None
  192. MAYASDK = {}
  193. MAXSDK = {}
  194. MAXSDKCS = {}
  195. NSPR_SDK = None
  196. PYTHONSDK = None
  197. try:
  198. # If there is a makepandaPreferences.py, import it:
  199. from makepandaPreferences import *
  200. except ImportError:
  201. # If it's not there, no problem:
  202. pass
  203. STARTTIME=time.time()
  204. ##########################################################################################
  205. #
  206. # Read the default version number out of dtool/PandaVersion.pp
  207. #
  208. ##########################################################################################
  209. try:
  210. f = file("dtool/PandaVersion.pp","r")
  211. pattern = re.compile('^[ \t]*[#][ \t]*define[ \t]+PANDA_VERSION[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)')
  212. for line in f:
  213. match = pattern.match(line,0)
  214. if (match):
  215. VERSION = match.group(1)+"."+match.group(2)+"."+match.group(3)
  216. break
  217. f.close()
  218. except: pass
  219. ##########################################################################################
  220. #
  221. # Initialize DTOOLCONFIG based on platform (Win/Unix)
  222. #
  223. # These are the defaults for the two broad classes of operating system.
  224. # Subsequent analysis will cause these values to be tweaked.
  225. #
  226. ##########################################################################################
  227. DTOOLDEFAULTS=[
  228. #_Variable_________________________Windows___________________Unix__________
  229. ("HAVE_PYTHON", '1', '1'),
  230. ("PYTHON_FRAMEWORK", 'UNDEF', 'UNDEF'),
  231. ("COMPILE_IN_DEFAULT_FONT", '1', '1'),
  232. ("HAVE_MAYA", '1', '1'),
  233. ("MAYA_PRE_5_0", 'UNDEF', 'UNDEF'),
  234. ("HAVE_SOFTIMAGE", 'UNDEF', 'UNDEF'),
  235. ("SSL_097", 'UNDEF', 'UNDEF'),
  236. ("REPORT_OPENSSL_ERRORS", '1', '1'),
  237. ("HAVE_GL", '1', '1'),
  238. ("HAVE_MESA", 'UNDEF', 'UNDEF'),
  239. ("MESA_MGL", 'UNDEF', 'UNDEF'),
  240. ("HAVE_SGIGL", 'UNDEF', 'UNDEF'),
  241. ("HAVE_GLX", 'UNDEF', '1'),
  242. ("HAVE_WGL", '1', 'UNDEF'),
  243. ("HAVE_DX", '1', 'UNDEF'),
  244. ("HAVE_CHROMIUM", 'UNDEF', 'UNDEF'),
  245. ("HAVE_THREADS", 'UNDEF', 'UNDEF'),
  246. ("HAVE_AUDIO", '1', '1'),
  247. ("NOTIFY_DEBUG", 'UNDEF', 'UNDEF'),
  248. ("DO_PSTATS", 'UNDEF', 'UNDEF'),
  249. ("DO_COLLISION_RECORDING", 'UNDEF', 'UNDEF'),
  250. ("TRACK_IN_INTERPRETER", 'UNDEF', 'UNDEF'),
  251. ("DO_MEMORY_USAGE", 'UNDEF', 'UNDEF'),
  252. ("DO_PIPELINING", 'UNDEF', 'UNDEF'),
  253. ("EXPORT_TEMPLATES", 'yes', 'yes'),
  254. ("LINK_IN_GL", 'UNDEF', 'UNDEF'),
  255. ("LINK_IN_PHYSICS", 'UNDEF', 'UNDEF'),
  256. ("DEFAULT_PATHSEP", '";"', '":"'),
  257. ("DEFAULT_PRC_DIR", '"<auto>etc"', '"<auto>etc"'),
  258. ("PRC_DIR_ENVVARS", '"PANDA_PRC_DIR"', '"PANDA_PRC_DIR"'),
  259. ("PRC_PATH_ENVVARS", '"PANDA_PRC_PATH"', '"PANDA_PRC_PATH"'),
  260. ("PRC_PATTERNS", '"*.prc"', '"*.prc"'),
  261. ("PRC_EXECUTABLE_PATTERNS", '""', '""'),
  262. ("PRC_EXECUTABLE_ARGS_ENVVAR", '"PANDA_PRC_XARGS"', '"PANDA_PRC_XARGS"'),
  263. ("PRC_PUBLIC_KEYS_FILENAME", '""', '""'),
  264. ("PRC_RESPECT_TRUST_LEVEL", 'UNDEF', 'UNDEF'),
  265. ("PRC_SAVE_DESCRIPTIONS", '1', '1'),
  266. ("WORDS_BIGENDIAN", 'UNDEF', 'UNDEF'),
  267. ("HAVE_NAMESPACE", '1', '1'),
  268. ("HAVE_OPEN_MASK", 'UNDEF', 'UNDEF'),
  269. ("HAVE_WCHAR_T", '1', '1'),
  270. ("HAVE_WSTRING", '1', '1'),
  271. ("HAVE_TYPENAME", '1', '1'),
  272. ("SIMPLE_STRUCT_POINTERS", '1', 'UNDEF'),
  273. ("HAVE_DINKUM", 'UNDEF', 'UNDEF'),
  274. ("HAVE_STL_HASH", 'UNDEF', 'UNDEF'),
  275. ("HAVE_GETTIMEOFDAY", 'UNDEF', '1'),
  276. ("GETTIMEOFDAY_ONE_PARAM", 'UNDEF', 'UNDEF'),
  277. ("HAVE_GETOPT", 'UNDEF', '1'),
  278. ("HAVE_GETOPT_LONG_ONLY", 'UNDEF', '1'),
  279. ("HAVE_GETOPT_H", 'UNDEF', '1'),
  280. ("IOCTL_TERMINAL_WIDTH", 'UNDEF', '1'),
  281. ("HAVE_STREAMSIZE", '1', '1'),
  282. ("HAVE_IOS_TYPEDEFS", '1', '1'),
  283. ("HAVE_IOS_BINARY", '1', '1'),
  284. ("STATIC_INIT_GETENV", '1', 'UNDEF'),
  285. ("HAVE_PROC_SELF_EXE", 'UNDEF', '1'),
  286. ("HAVE_PROC_SELF_MAPS", 'UNDEF', '1'),
  287. ("HAVE_PROC_SELF_ENVIRON", 'UNDEF', '1'),
  288. ("HAVE_PROC_SELF_CMDLINE", 'UNDEF', '1'),
  289. ("HAVE_GLOBAL_ARGV", '1', 'UNDEF'),
  290. ("PROTOTYPE_GLOBAL_ARGV", 'UNDEF', 'UNDEF'),
  291. ("GLOBAL_ARGV", '__argv', 'UNDEF'),
  292. ("GLOBAL_ARGC", '__argc', 'UNDEF'),
  293. ("HAVE_IO_H", '1', 'UNDEF'),
  294. ("HAVE_IOSTREAM", '1', '1'),
  295. ("HAVE_MALLOC_H", '1', '1'),
  296. ("HAVE_SYS_MALLOC_H", 'UNDEF', 'UNDEF'),
  297. ("HAVE_ALLOCA_H", 'UNDEF', '1'),
  298. ("HAVE_LOCALE_H", 'UNDEF', '1'),
  299. ("HAVE_MINMAX_H", '1', 'UNDEF'),
  300. ("HAVE_SSTREAM", '1', '1'),
  301. ("HAVE_NEW", '1', '1'),
  302. ("HAVE_SYS_TYPES_H", '1', '1'),
  303. ("HAVE_SYS_TIME_H", 'UNDEF', '1'),
  304. ("HAVE_UNISTD_H", 'UNDEF', '1'),
  305. ("HAVE_UTIME_H", 'UNDEF', '1'),
  306. ("HAVE_GLOB_H", 'UNDEF', '1'),
  307. ("HAVE_DIRENT_H", 'UNDEF', '1'),
  308. ("HAVE_SYS_SOUNDCARD_H", 'UNDEF', '1'),
  309. ("HAVE_RTTI", '1', '1'),
  310. ("GLOBAL_OPERATOR_NEW_EXCEPTIONS", 'UNDEF', '1'),
  311. ("OLD_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'),
  312. ("GNU_STYLE_ALLOCATOR", 'UNDEF', '1'),
  313. ("VC6_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'),
  314. ("MODERN_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'),
  315. ("NO_STYLE_ALLOCATOR", '1', 'UNDEF'),
  316. ("HAVE_ZLIB", 'UNDEF', 'UNDEF'),
  317. ("HAVE_PNG", 'UNDEF', 'UNDEF'),
  318. ("HAVE_JPEG", 'UNDEF', 'UNDEF'),
  319. ("HAVE_TIFF", 'UNDEF', 'UNDEF'),
  320. ("HAVE_VRPN", 'UNDEF', 'UNDEF'),
  321. ("HAVE_FMOD", 'UNDEF', 'UNDEF'),
  322. ("HAVE_NVIDIACG", 'UNDEF', 'UNDEF'),
  323. ("HAVE_NSPR", 'UNDEF', 'UNDEF'),
  324. ("HAVE_FREETYPE", 'UNDEF', 'UNDEF'),
  325. ("HAVE_FFTW", 'UNDEF', 'UNDEF'),
  326. ("HAVE_SSL", 'UNDEF', 'UNDEF'),
  327. ("HAVE_NET", 'UNDEF', 'UNDEF'),
  328. ("HAVE_CG", 'UNDEF', 'UNDEF'),
  329. ("HAVE_CGGL", 'UNDEF', 'UNDEF'),
  330. ]
  331. DTOOLCONFIG={}
  332. if (sys.platform == "win32" or sys.platform == "cygwin"):
  333. for key,win,unix in DTOOLDEFAULTS:
  334. DTOOLCONFIG[key] = win
  335. else:
  336. for key,win,unix in DTOOLDEFAULTS:
  337. DTOOLCONFIG[key] = unix
  338. ########################################################################
  339. ##
  340. ## Help with packages.
  341. ##
  342. ## Output some brief information to help someone understand what the
  343. ## package options are.
  344. ##
  345. ########################################################################
  346. def packageInfo():
  347. print """
  348. See panda3d/doc/INSTALL-PP for more detailed information.
  349. 3D modeling an painting packages:
  350. MAX5 3D Studio Max version 5
  351. MAX6 3D Studio Max version 6
  352. MAX7 3D Studio Max version 7
  353. "uri?"
  354. (for .??? files)
  355. MAYA5 Maya version 5
  356. MAYA6 Maya version 6
  357. "uri?"
  358. (for .??? files)
  359. Audio playback:
  360. FMOD f mod
  361. "http://www.fmod.org/"
  362. A music and sound effects library (including playback).
  363. (for .wav, .mp3 and other files)
  364. MILES Miles Sound System from RAD Game Tools
  365. "http://www.radgametools.com/default.htm"
  366. A proprietary (non-opensource) audio library.
  367. (for .wav, .mp3, and other files).
  368. Compression/decompression:
  369. ZLIB z lib
  370. "http://www.gzip.org/zlib"
  371. A commression/decomression library.
  372. (for .zip and similar files and data)
  373. Font manipulation:
  374. FREETYPE free type
  375. "http://www.freetype.org/"
  376. A font manipulation library.
  377. (for .ttf files).
  378. Image support libraries:
  379. JPEG Join Photographic Experts Group
  380. "http://www.ijg.org"
  381. An image library.
  382. (.jpg and .jpeg files)
  383. PNG Portable Network Graphics
  384. "http://www.libpng.org"
  385. An image library.
  386. (.png files)
  387. TIFF Tagged Image File Format
  388. "ftp://ftp.sgi.com/graphics/tiff"
  389. An image library.
  390. (.tiff files)
  391. Misc libraries:
  392. HELIX
  393. "uri?"
  394. (for .??? files)
  395. A ??? library.
  396. FFTW Fast Fourier Transform (in the West)
  397. "http://www.fftw.org/"
  398. A library for computing DFT in one or more dimensions.
  399. NVIDIACG nVidia cg
  400. "http://developer.nvidia.com/page/cg_main.html"
  401. (for .??? files)
  402. A library for gpu programming (shaders and such).
  403. Network communication:
  404. SSL Open Secure Socket Layer
  405. "http://www.openssl.org/"
  406. A network encryption library.
  407. NSPR Netscape Portable Runtime
  408. "http://www.mozilla.org/projects/nspr/"
  409. Used for network sockets and threading.
  410. User input:
  411. VRPN Virtual Reality Peripheral Network
  412. "http://www.cs.unc.edu/Research/vrpn/"
  413. A controller/peripheral input library.
  414. """
  415. ########################################################################
  416. ##
  417. ## Command-line parser.
  418. ##
  419. ## You can type "makepanda --help" to see all the options.
  420. ##
  421. ########################################################################
  422. def usage(problem):
  423. if (problem):
  424. print ""
  425. print '***', problem, '***'
  426. print ""
  427. print "Makepanda generates a 'built' subdirectory containing a"
  428. print "compiled copy of Panda3D. Command-line arguments are:"
  429. print ""
  430. print " --help (print the help message you're reading now)"
  431. print " --package-info (help info about the optional packages)"
  432. print " --prefix X (install into prefix dir, default \"built\")"
  433. print " --compiler X (currently, compiler can only be MSVC7,LINUXA)"
  434. print " --optimize X (optimization level can be 1,2,3,4)"
  435. print " --thirdparty X (directory containing third-party software)"
  436. print " --complete (copy samples and direct into the build)"
  437. print " --installer (build an executable installer)"
  438. print " --ppgame X (build a prepackaged game - see manual)"
  439. print " --v1 X (set the major version number)"
  440. print " --v2 X (set the minor version number)"
  441. print " --v3 X (set the sequence version number)"
  442. print " --lzma (use lzma compression when building installer)"
  443. print ""
  444. for pkg in PACKAGES:
  445. p = pkg.lower()
  446. print " --use-%-9s --no-%-9s (enable/disable use of %s)"%(p, p, pkg)
  447. print ""
  448. print " --nothing (disable every third-party lib)"
  449. print " --everything (enable every third-party lib)"
  450. print ""
  451. print " --quiet (print less output)"
  452. print " --verbose (print more output and debugging info)"
  453. print ""
  454. print "The simplest way to compile panda is to just type:"
  455. print ""
  456. print " makepanda --everything"
  457. print ""
  458. sys.exit(1)
  459. def parseopts(args):
  460. global PREFIX,COMPILER,OPTIMIZE,OMIT,THIRDPARTY,INSTALLER,GENMAN
  461. global PPGAME,COPYEXTRAS,VERSION,COMPRESSOR,DIRECTXSDK,VERBOSE
  462. longopts = [
  463. "help","package-info","prefix=","compiler=","directx-sdk=","thirdparty=",
  464. "optimize=","everything","nothing","installer","ppgame=","quiet","verbose",
  465. "complete","version=","lzma"]
  466. anything = 0
  467. for pkg in PACKAGES: longopts.append("no-"+pkg.lower())
  468. for pkg in PACKAGES: longopts.append("use-"+pkg.lower())
  469. try:
  470. opts, extras = getopt.getopt(args, "", longopts)
  471. for option,value in opts:
  472. if (option=="--help"): raise "usage"
  473. elif (option=="--package-info"): raise "package-info"
  474. elif (option=="--prefix"): PREFIX=value
  475. elif (option=="--compiler"): COMPILER=value
  476. elif (option=="--directx-sdk"): DIRECTXSDK=value
  477. elif (option=="--thirdparty"): THIRDPARTY=value
  478. elif (option=="--optimize"): OPTIMIZE=value
  479. elif (option=="--quiet"): VERBOSE-=1
  480. elif (option=="--verbose"): VERBOSE+=1
  481. elif (option=="--installer"): INSTALLER=1
  482. elif (option=="--genman"): GENMAN=1
  483. elif (option=="--ppgame"): PPGAME=value
  484. elif (option=="--complete"): COMPLETE=1
  485. elif (option=="--everything"): OMIT=[]
  486. elif (option=="--nothing"): OMIT=PACKAGES[:]
  487. elif (option=="--version"):
  488. VERSION=value
  489. if (len(VERSION.split(".")) != 3): raise "usage"
  490. elif (option=="--lzma"): COMPRESSOR="lzma"
  491. else:
  492. for pkg in PACKAGES:
  493. if (option=="--use-"+pkg.lower()):
  494. if (OMIT.count(pkg)): OMIT.remove(pkg)
  495. break
  496. for pkg in PACKAGES:
  497. if (option=="--no-"+pkg.lower()):
  498. if (OMIT.count(pkg)==0): OMIT.append(pkg)
  499. break
  500. anything = 1
  501. except "package-info": packageInfo()
  502. except "help": usage('')
  503. except Exception, e: usage(e)
  504. if (anything==0): usage(0)
  505. if (OPTIMIZE=="1"): OPTIMIZE=1
  506. elif (OPTIMIZE=="2"): OPTIMIZE=2
  507. elif (OPTIMIZE=="3"): OPTIMIZE=3
  508. elif (OPTIMIZE=="4"): OPTIMIZE=4
  509. else: usage("Invalid setting for OPTIMIZE")
  510. if (COMPILERS.count(COMPILER)==0): usage("Invalid setting for COMPILER: "+COMPILER)
  511. parseopts(sys.argv[1:])
  512. ########################################################################
  513. #
  514. # Avoid trouble by not allowing weird --prefix or --thirdparty
  515. #
  516. # One of my goals for makepanda was for it to be maintainable.
  517. # I found that trying to support arbitrary pathnames for "prefix"
  518. # and "thirdparty" required the use of lots of backslashes and
  519. # quotation marks, which were quite frankly hard to get right.
  520. # I think it's better to simply rule out weird pathnames.
  521. #
  522. ########################################################################
  523. PREFIX = PREFIX.replace("\\","/")
  524. THIRDPARTY = THIRDPARTY.replace("\\","/")
  525. if (PREFIX.count(" ") or THIRDPARTY.count(" ")):
  526. sys.exit("The --prefix and --thirdparty may not contain spaces")
  527. if (PREFIX.count('"') or THIRDPARTY.count('"')):
  528. sys.exit("The --prefix and --thirdparty may not contain quotation marks")
  529. ########################################################################
  530. #
  531. # Locate the root of the panda tree
  532. #
  533. ########################################################################
  534. PANDASOURCE=os.path.dirname(os.path.abspath(sys.path[0]))
  535. if ((os.path.exists(os.path.join(PANDASOURCE,"makepanda/makepanda.py"))==0) or
  536. (os.path.exists(os.path.join(PANDASOURCE,"dtool","src","dtoolbase","dtoolbase.h"))==0) or
  537. (os.path.exists(os.path.join(PANDASOURCE,"panda","src","pandabase","pandabase.h"))==0)):
  538. sys.exit("I am unable to locate the root of the panda source tree.")
  539. os.chdir(PANDASOURCE)
  540. ########################################################################
  541. ##
  542. ## If you have the "sdks" directory, supply all sdks
  543. ##
  544. ## This is a temporary hack, it may go away.
  545. ##
  546. ########################################################################
  547. if (os.path.isdir("sdks")):
  548. DIRECTXSDK="sdks/directx"
  549. MAXSDKCS["MAX5"] = "sdks/maxsdk5"
  550. MAXSDKCS["MAX6"] = "sdks/maxsdk6"
  551. MAXSDKCS["MAX7"] = "sdks/maxsdk7"
  552. MAXSDK["MAX5"] = "sdks/maxsdk5"
  553. MAXSDK["MAX6"] = "sdks/maxsdk6"
  554. MAXSDK["MAX7"] = "sdks/maxsdk7"
  555. MAYASDK["MAYA5"] = "sdks/maya5"
  556. MAYASDK["MAYA6"] = "sdks/maya6"
  557. MAYASDK["MAYA65"] = "sdks/maya65"
  558. ########################################################################
  559. ##
  560. ## Locate the DirectX SDK
  561. ##
  562. ########################################################################
  563. if (sys.platform == "win32" or sys.platform == "cygwin") and DIRECTXSDK is None:
  564. dxdir = GetRegistryKey("SOFTWARE\\Microsoft\\DirectX SDK", "DX9SDK Samples Path")
  565. if (dxdir != 0): DIRECTXSDK = os.path.dirname(dxdir)
  566. else:
  567. dxdir = GetRegistryKey("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment","DXSDK_DIR")
  568. if (dxdir != 0): DIRECTXSDK=dxdir
  569. else:
  570. dxdir = GetRegistryKey("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment","DXSDKROOT")
  571. if dxdir != 0:
  572. if dxdir[-2:]=="/.":
  573. DIRECTXSDK=dxdir[:-1]
  574. else:
  575. DIRECTXSDK=dxdir
  576. else:
  577. sys.exit("The registry does not appear to contain a pointer to the DirectX 9.0 SDK.")
  578. DIRECTXSDK=DIRECTXSDK.replace("\\", "/").rstrip("/")
  579. ########################################################################
  580. ##
  581. ## Locate the Maya 5.0 and Maya 6.0 SDK
  582. ##
  583. ########################################################################
  584. MAYAVERSIONS=[("MAYA5", "SOFTWARE\\Alias|Wavefront\\Maya\\5.0\\Setup\\InstallPath"),
  585. ("MAYA6", "SOFTWARE\\Alias|Wavefront\\Maya\\6.0\\Setup\\InstallPath"),
  586. ("MAYA65", "SOFTWARE\\Alias|Wavefront\\Maya\\6.5\\Setup\\InstallPath")
  587. ]
  588. for (ver,key) in MAYAVERSIONS:
  589. if (OMIT.count(ver)==0) and (MAYASDK.has_key(ver)==0):
  590. if (sys.platform == "win32" or sys.platform == "cygwin"):
  591. MAYASDK[ver]=GetRegistryKey(key, "MAYA_INSTALL_LOCATION")
  592. if (MAYASDK[ver] == 0):
  593. WARNINGS.append("The registry does not appear to contain a pointer to the "+ver+" SDK.")
  594. WARNINGS.append("I have automatically added this command-line option: --no-"+ver.lower())
  595. OMIT.append(ver)
  596. else:
  597. MAYASDK[ver] = MAYASDK[ver].replace("\\", "/").rstrip("/")
  598. else:
  599. WARNINGS.append(ver+" not yet supported under linux")
  600. WARNINGS.append("I have automatically added this command-line option: --no-"+ver.lower())
  601. OMIT.append(ver)
  602. ########################################################################
  603. ##
  604. ## Locate the 3D Studio Max and Character Studio SDKs
  605. ##
  606. ########################################################################
  607. MAXVERSIONS = [("MAX5", "SOFTWARE\\Autodesk\\3DSMAX\\5.0\\MAX-1:409", "uninstallpath", "Cstudio\\Sdk"),
  608. ("MAX6", "SOFTWARE\\Autodesk\\3DSMAX\\6.0", "installdir", "maxsdk\\cssdk\\include"),
  609. ("MAX7", "SOFTWARE\\Autodesk\\3DSMAX\\7.0", "Installdir", "maxsdk\\include\\CS")]
  610. for version,key1,key2,subdir in MAXVERSIONS:
  611. if (OMIT.count(version)==0) and (MAXSDK.has_key(version)==0):
  612. if (sys.platform == "win32" or sys.platform == "cygwin"):
  613. top = GetRegistryKey(key1,key2)
  614. if (top == 0):
  615. WARNINGS.append("The registry does not appear to contain a pointer to "+version)
  616. WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
  617. OMIT.append(version)
  618. else:
  619. if (os.path.isdir(top + "\\" + subdir)==0):
  620. WARNINGS.append("Your copy of "+version+" does not include the character studio SDK")
  621. WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
  622. OMIT.append(version)
  623. else:
  624. MAXSDK[version] = top + "maxsdk"
  625. MAXSDKCS[version] = top + subdir
  626. else:
  627. WARNINGS.append(version+" not yet supported under linux")
  628. WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
  629. OMIT.append(version)
  630. ########################################################################
  631. ##
  632. ## Locate the NSPR SDK
  633. ##
  634. ########################################################################
  635. if NSPR_SDK is None:
  636. if sys.platform == "win32" or sys.platform == "cygwin":
  637. nsprPaths = ["C:/Python22", 'thirdparty/nspr']
  638. else:
  639. nsprPaths = ["/usr/include/nspr", 'thirdparty/win-python']
  640. for p in nsprPaths:
  641. if os.path.isdir(p): NSPR_SDK = p
  642. if NSPR_SDK is None:
  643. sys.exit("Cannot find the NSPR SDK")
  644. ########################################################################
  645. ##
  646. ## Locate the Python SDK
  647. ##
  648. ########################################################################
  649. if PYTHONSDK is None:
  650. if sys.platform == "win32" or sys.platform == "cygwin":
  651. pythonPaths = [
  652. "C:/Python22",
  653. "C:/Python23",
  654. "C:/Python24",
  655. "C:/Python25",
  656. 'thirdparty/win-python']
  657. else:
  658. pythonPaths = [
  659. "/usr/include/python2.5",
  660. "/usr/include/python2.4",
  661. "/usr/include/python2.3",
  662. "/usr/include/python2.2"]
  663. for p in pythonPaths:
  664. if os.path.isdir(p): PYTHONSDK = p
  665. if PYTHONSDK is None:
  666. sys.exit("Cannot find the Python SDK")
  667. ########################################################################
  668. ##
  669. ## Locate the SSL SDK
  670. ##
  671. ########################################################################
  672. if sys.platform == "win32" or sys.platform == "cygwin":
  673. SDK_SEARCH_PATHS = {
  674. 'ssl': [
  675. "C:/openssl",
  676. 'thirdparty/ssl']
  677. else:
  678. SDK_SEARCH_PATHS = {
  679. 'ssl': [
  680. "/usr/include/ssl",
  681. 'thirdparty/win-python']
  682. for package in packages:
  683. if SDK_LIB_PATH.get(package) is None:
  684. for p in SDK_SEARCH_PATHS.get(package, '.'):
  685. if os.path.isdir(p):
  686. SDK_LIB_PATH[package] = p
  687. if SDK_LIB_PATH.get(package) is None or not os.path.isdir(SDK_LIB_PATH.get(package)):
  688. sys.exit("The SDK for %s was not found."%(package,))
  689. ########################################################################
  690. ##
  691. ## Locate Visual Studio 7.0 or 7.1
  692. ##
  693. ## The visual studio compiler doesn't work unless you set up a
  694. ## couple of environment variables to point at the compiler.
  695. ##
  696. ########################################################################
  697. if (COMPILER == "MSVC7" or COMPILER=="MSVC71"):
  698. vcdir = GetRegistryKey("SOFTWARE\\Microsoft\\VisualStudio\\7.1", "InstallDir")
  699. if ((vcdir == 0) or (vcdir[-13:] != "\\Common7\\IDE\\")):
  700. vcdir = GetRegistryKey("SOFTWARE\\Microsoft\\VisualStudio\\7.0", "InstallDir")
  701. if ((vcdir == 0) or (vcdir[-13:] != "\\Common7\\IDE\\")):
  702. sys.exit("The registry does not appear to contain a pointer to the Visual Studio 7 install directory")
  703. vcdir = vcdir[:-12]
  704. old_env_path = ""
  705. old_env_include = ""
  706. old_env_lib = ""
  707. if (os.environ.has_key("PATH")): old_env_path = os.environ["PATH"]
  708. if (os.environ.has_key("INCLUDE")): old_env_include = os.environ["INCLUDE"]
  709. if (os.environ.has_key("LIB")): old_env_lib = os.environ["LIB"]
  710. os.environ["PATH"] = vcdir + "vc7\\bin;" + vcdir + "Common7\\IDE;" + vcdir + "Common7\\Tools;" + vcdir + "Common7\\Tools\\bin\\prerelease;" + vcdir + "Common7\\Tools\\bin;" + old_env_path
  711. os.environ["INCLUDE"] = vcdir + "vc7\\ATLMFC\\INCLUDE;" + vcdir + "vc7\\include;" + vcdir + "vc7\\PlatformSDK\\include\\prerelease;" + vcdir + "vc7\\PlatformSDK\\include;" + old_env_include
  712. os.environ["LIB"] = vcdir + "vc7\\ATLMFC\\LIB;" + vcdir + "vc7\\LIB;" + vcdir + "vc7\\PlatformSDK\\lib\\prerelease;" + vcdir + "vc7\\PlatformSDK\\lib;" + old_env_lib
  713. sys.stdout.flush()
  714. ##########################################################################################
  715. #
  716. # Disable Helix unless running under Windows
  717. #
  718. ##########################################################################################
  719. if (sys.platform != "win32" or sys.platform == "cygwin"):
  720. if (OMIT.count("HELIX")==0):
  721. WARNINGS.append("HELIX not yet supported under linux")
  722. WARNINGS.append("I have automatically added this command-line option: --no-helix")
  723. OMIT.append("HELIX")
  724. ##########################################################################################
  725. #
  726. # See if there's a "MILES" subdirectory under 'thirdparty'
  727. #
  728. ##########################################################################################
  729. if (os.path.isdir(os.path.join(THIRDPARTY, "win-libs-vc7", "miles"))==0):
  730. if (OMIT.count("MILES")==0):
  731. WARNINGS.append("You do not have a copy of MILES sound system")
  732. WARNINGS.append("I have automatically added this command-line option: --no-miles")
  733. OMIT.append("MILES")
  734. ##########################################################################################
  735. #
  736. # Enable or Disable runtime debugging mechanisms based on optimize level.
  737. #
  738. ##########################################################################################
  739. for x in PACKAGES:
  740. if (OMIT.count(x)==0):
  741. if (DTOOLCONFIG.has_key("HAVE_"+x)):
  742. DTOOLCONFIG["HAVE_"+x] = '1'
  743. DTOOLCONFIG["HAVE_NET"] = DTOOLCONFIG["HAVE_NSPR"]
  744. if (OMIT.count("NVIDIACG")==0):
  745. DTOOLCONFIG["HAVE_CG"] = '1'
  746. DTOOLCONFIG["HAVE_CGGL"] = '1'
  747. if (OPTIMIZE <= 3):
  748. if (DTOOLCONFIG["HAVE_NET"] != 'UNDEF'):
  749. DTOOLCONFIG["DO_PSTATS"] = '1'
  750. if (OPTIMIZE <= 3):
  751. DTOOLCONFIG["DO_COLLISION_RECORDING"] = '1'
  752. #if (OPTIMIZE <= 2):
  753. # DTOOLCONFIG["TRACK_IN_INTERPRETER"] = '1'
  754. if (OPTIMIZE <= 3):
  755. DTOOLCONFIG["DO_MEMORY_USAGE"] = '1'
  756. #if (OPTIMIZE <= 1):
  757. # DTOOLCONFIG["DO_PIPELINING"] = '1'
  758. if (OPTIMIZE <= 3):
  759. DTOOLCONFIG["NOTIFY_DEBUG"] = '1'
  760. ##########################################################################################
  761. #
  762. # Verify that LD_LIBRARY_PATH contains the PREFIX/lib directory.
  763. #
  764. # If not, add it on a temporary basis, and issue a warning.
  765. #
  766. ##########################################################################################
  767. if (sys.platform != "win32" and sys.platform != "cygwin"):
  768. BUILTLIB = os.path.abspath(PREFIX+"/lib")
  769. try:
  770. LDPATH = []
  771. f = file("/etc/ld.so.conf","r")
  772. for line in f: LDPATH.append(line.rstrip())
  773. f.close()
  774. except: LDPATH = []
  775. if (os.environ.has_key("LD_LIBRARY_PATH")):
  776. LDPATH = LDPATH + os.environ["LD_LIBRARY_PATH"].split(":")
  777. if (LDPATH.count(BUILTLIB)==0):
  778. WARNINGS.append("Caution: the "+PREFIX+"/lib directory is not in LD_LIBRARY_PATH")
  779. WARNINGS.append("or /etc/ld.so.conf. You must add it before using panda.")
  780. if (os.environ.has_key("LD_LIBRARY_PATH")):
  781. os.environ["LD_LIBRARY_PATH"] = BUILTLIB + ":" + os.environ["LD_LIBRARY_PATH"]
  782. else:
  783. os.environ["LD_LIBRARY_PATH"] = BUILTLIB
  784. ########################################################################
  785. ##
  786. ## Give a Status Report on Command-Line Options
  787. ##
  788. ########################################################################
  789. def printStatus(header,warnings):
  790. global VERBOSE
  791. if VERBOSE >= -2:
  792. print ""
  793. print "-------------------------------------------------------------------"
  794. print header
  795. tkeep = ""
  796. tomit = ""
  797. for x in PACKAGES:
  798. if (OMIT.count(x)==0): tkeep = tkeep + x + " "
  799. else: tomit = tomit + x + " "
  800. print "Makepanda: Prefix Directory:",PREFIX
  801. print "Makepanda: Compiler:",COMPILER
  802. print "Makepanda: Optimize:",OPTIMIZE
  803. print "Makepanda: Keep Pkg:",tkeep
  804. print "Makepanda: Omit Pkg:",tomit
  805. print "Makepanda: Thirdparty dir:",THIRDPARTY
  806. print "Makepanda: DirectX SDK dir:",DIRECTXSDK
  807. print "Makepanda: Verbose vs. Quiet Level:",VERBOSE
  808. print "Makepanda: PYTHONSDK:", PYTHONSDK
  809. if (GENMAN): print "Makepanda: Generate API reference manual"
  810. else : print "Makepanda: Don't generate API reference manual"
  811. if (sys.platform == "win32" or sys.platform == "cygwin"):
  812. if INSTALLER: print "Makepanda: Build installer, using",COMPRESSOR
  813. else : print "Makepanda: Don't build installer"
  814. if PPGAME!=0: print "Makepanda: Build pprepackaged game ",PPGAME,"using",COMPRESSOR
  815. else : print "Makepanda: Don't build pprepackaged game"
  816. print "Makepanda: Version ID: "+VERSION
  817. for x in warnings: print "Makepanda: "+x
  818. print "-------------------------------------------------------------------"
  819. print ""
  820. sys.stdout.flush()
  821. printStatus("Makepanda Initial Status Report", WARNINGS)
  822. ##########################################################################################
  823. #
  824. # Create the directory tree
  825. #
  826. ##########################################################################################
  827. MakeDirectory(PREFIX)
  828. MakeDirectory(PREFIX+"/bin")
  829. MakeDirectory(PREFIX+"/lib")
  830. MakeDirectory(PREFIX+"/etc")
  831. MakeDirectory(PREFIX+"/plugins")
  832. MakeDirectory(PREFIX+"/pandac")
  833. MakeDirectory(PREFIX+"/pandac/input")
  834. MakeDirectory(PREFIX+"/include")
  835. MakeDirectory(PREFIX+"/include/parser-inc")
  836. MakeDirectory(PREFIX+"/include/parser-inc/openssl")
  837. MakeDirectory(PREFIX+"/include/parser-inc/Cg")
  838. MakeDirectory(PREFIX+"/include/openssl")
  839. MakeDirectory(PREFIX+"/direct")
  840. MakeDirectory(PREFIX+"/tmp")
  841. ########################################################################
  842. ##
  843. ## PkgSelected(package-list,package)
  844. ##
  845. ## This function returns true if the package-list contains the
  846. ## package, AND the OMIT list does not contain the package.
  847. ##
  848. ########################################################################
  849. def PkgSelected(pkglist, pkg):
  850. if (pkglist.count(pkg)==0): return 0
  851. if (OMIT.count(pkg)): return 0
  852. return 1
  853. ########################################################################
  854. ##
  855. ## These two globals accumulate a global list of everything compiled.
  856. ##
  857. ########################################################################
  858. ALLIN=[]
  859. ALLTARGETS=[]
  860. ########################################################################
  861. ##
  862. ## The CXX include-cache.
  863. ##
  864. ## Dictionary: for each CXX source file, a list of all the
  865. ## include-directives inside that file.
  866. ##
  867. ## Makepanda analyzes include-directives to determine the dependencies
  868. ## of C source files. This requires us to read the C source files,
  869. ## a time-consuming process. This means that doing a 'makepanda'
  870. ## takes quite a bit of time, even if there's nothing to compile.
  871. ##
  872. ## To accelerate this process, we store the list of include-directives
  873. ## in each source file in the "CXX include-cache". This cache is
  874. ## preserved (using the 'cPickle' module) from execution to execution
  875. ## of makepanda. The use of file dates in the cache makes it very
  876. ## unlikely for the cache to get out-of-sync with the source tree.
  877. ##
  878. ########################################################################
  879. global CxxIncludeCache
  880. CxxIncludeCache = {}
  881. iCachePath=PREFIX+"/tmp/makepanda-icache"
  882. try: icache = open(iCachePath,'rb')
  883. except: icache = 0
  884. if (icache!=0):
  885. CxxIncludeCache = cPickle.load(icache)
  886. icache.close()
  887. ########################################################################
  888. ##
  889. ## CxxGetIncludes
  890. ##
  891. ## return a list of the include-directives in a given source file
  892. ##
  893. ########################################################################
  894. global CxxIncludeRegex
  895. CxxIncludeRegex = re.compile('^[ \t]*[#][ \t]*include[ \t]+"([^"]+)"[ \t\r\n]*$')
  896. def CxxGetIncludes(path):
  897. date = filedate(path)
  898. if (CxxIncludeCache.has_key(path)):
  899. cached = CxxIncludeCache[path]
  900. if (cached[0]==date): return cached[1]
  901. try: sfile = open(path, 'rb')
  902. except: sys.exit("Cannot open source file \""+path+"\" for reading.")
  903. include = []
  904. for line in sfile:
  905. match = CxxIncludeRegex.match(line,0)
  906. if (match):
  907. incname = match.group(1)
  908. include.append(incname)
  909. sfile.close()
  910. CxxIncludeCache[path] = [date, include]
  911. return include
  912. ########################################################################
  913. ##
  914. ## CxxFindSource
  915. ##
  916. ## given a source file name and a directory list, searches the
  917. ## directory list for the given source file. Returns the full
  918. ## pathname of the located file.
  919. ##
  920. ########################################################################
  921. def CxxFindSource(name, ipath):
  922. for dir in ipath:
  923. if (dir == "."): full = name
  924. else: full = dir + "/" + name
  925. if filedate(full) > 0: return full
  926. return 0
  927. ########################################################################
  928. ##
  929. ## CxxFindHeader
  930. ##
  931. ## given a source file name and an include directive in that source
  932. ## file, locates the relevant header file.
  933. ##
  934. ########################################################################
  935. def CxxFindHeader(srcfile, incfile, ipath):
  936. if (incfile[:1]=="."):
  937. last = srcfile.rfind("/")
  938. if (last < 0): sys.exit("CxxFindHeader cannot handle this case #1")
  939. srcdir = srcfile[:last+1]
  940. while (incfile[:1]=="."):
  941. if (incfile[:2]=="./"):
  942. incfile = incfile[2:]
  943. elif (incfile[:3]=="../"):
  944. incfile = incfile[3:]
  945. last = srcdir[:-1].rfind("/")
  946. if (last < 0): sys.exit("CxxFindHeader cannot handle this case #2")
  947. srcdir = srcdir[:last+1]
  948. else: sys.exit("CxxFindHeader cannot handle this case #3")
  949. full = srcdir + incfile
  950. if filedate(full) > 0: return full
  951. return 0
  952. else: return CxxFindSource(incfile, ipath)
  953. ########################################################################
  954. ##
  955. ## CxxCalcDependencies(srcfile, ipath, ignore)
  956. ##
  957. ## Calculate the dependencies of a source file given a
  958. ## particular include-path. Any file in the list of files to
  959. ## ignore is not considered.
  960. ##
  961. ########################################################################
  962. global CxxIgnoreHeader
  963. global CxxDependencyCache
  964. CxxIgnoreHeader = {}
  965. CxxDependencyCache = {}
  966. def CxxCalcDependencies(srcfile, ipath, ignore):
  967. if (CxxDependencyCache.has_key(srcfile)):
  968. return CxxDependencyCache[srcfile]
  969. if (ignore.count(srcfile)): return []
  970. dep = {}
  971. dep[srcfile] = 1
  972. includes = CxxGetIncludes(srcfile)
  973. for include in includes:
  974. if (CxxIgnoreHeader.has_key(include)==0):
  975. header = CxxFindHeader(srcfile, include, ipath)
  976. if (header==0):
  977. print "CAUTION: header file "+include+" cannot be found."
  978. else:
  979. if (ignore.count(header)==0):
  980. hdeps = CxxCalcDependencies(header, ipath, [srcfile]+ignore)
  981. for x in hdeps: dep[x] = 1
  982. result = dep.keys()
  983. CxxDependencyCache[srcfile] = result
  984. return result
  985. def CxxCalcDependenciesAll(srcfiles, ipath):
  986. dep = {}
  987. for srcfile in srcfiles:
  988. for x in CxxCalcDependencies(srcfile, ipath, []):
  989. dep[x] = 1
  990. return dep.keys()
  991. ########################################################################
  992. ##
  993. ## ConditionalWriteFile
  994. ##
  995. ## Creates the given file, but only if it doesn't already
  996. ## contain the correct contents.
  997. ##
  998. ########################################################################
  999. def ConditionalWriteFile(dest,desiredcontents):
  1000. try:
  1001. rfile = open(dest, 'rb')
  1002. contents = rfile.read(-1)
  1003. rfile.close()
  1004. except:
  1005. contents=0
  1006. if contents != desiredcontents:
  1007. if VERBOSE:
  1008. print "Regenerating file: "+dest
  1009. sys.stdout.flush()
  1010. WriteFile(dest,desiredcontents)
  1011. ########################################################################
  1012. ##
  1013. ## CopyFile
  1014. ##
  1015. ## Copy a file into the build tree.
  1016. ##
  1017. ########################################################################
  1018. def CopyFile(dstfile,srcfile):
  1019. if (dstfile[-1]=='/'):
  1020. dstdir = dstfile
  1021. fnl = srcfile.rfind("/")
  1022. if (fnl < 0): fn = srcfile
  1023. else: fn = srcfile[fnl+1:]
  1024. dstfile = dstdir + fn
  1025. if (older(dstfile,srcfile)):
  1026. global VERBOSE
  1027. if VERBOSE >= 1:
  1028. print "Copying \"%s\" --> \"%s\""%(srcfile, dstfile)
  1029. WriteFile(dstfile,ReadFile(srcfile))
  1030. updatefiledate(dstfile)
  1031. ALLTARGETS.append(dstfile)
  1032. ########################################################################
  1033. ##
  1034. ## CopyAllFiles
  1035. ##
  1036. ## Copy the contents of an entire directory into the build tree.
  1037. ##
  1038. ########################################################################
  1039. def CopyAllFiles(dstdir, srcdir, suffix=""):
  1040. suflen = len(suffix)
  1041. files = os.listdir(srcdir)
  1042. for x in files:
  1043. if (os.path.isfile(srcdir+x)):
  1044. if (suflen==0) or (x[-suflen:]==suffix):
  1045. CopyFile(dstdir+x, srcdir+x)
  1046. ########################################################################
  1047. ##
  1048. ## CopyTree
  1049. ##
  1050. ## Copy a directory into the build tree.
  1051. ##
  1052. ########################################################################
  1053. def CopyTree(dstdir,srcdir):
  1054. if (os.path.isdir(dstdir)): return 0
  1055. if (COMPILER=="MSVC7" or COMPILER=="MSVC71"): cmd = 'xcopy.exe /I/Y/E/Q "' + srcdir + '" "' + dstdir + '"'
  1056. elif (COMPILER=="LINUXA"): cmd = 'cp --recursive --force ' + srcdir + ' ' + dstdir
  1057. oscmd(cmd)
  1058. updatefiledate(dstdir)
  1059. def CompileBison(pre, dstc, dsth, src):
  1060. """
  1061. Generate a CXX file from a source YXX file.
  1062. """
  1063. (base, fn) = os.path.split(src)
  1064. dstc=base+"/"+dstc
  1065. dsth=base+"/"+dsth
  1066. if (older(dstc,src) or older(dsth,src)):
  1067. CopyFile(PREFIX+"/tmp/", src)
  1068. if (COMPILER=="MSVC7"):
  1069. CopyFile(PREFIX+"/tmp/", "thirdparty/win-util/bison.simple")
  1070. bisonFullPath=os.path.abspath("thirdparty/win-util/bison.exe")
  1071. oslocalcmd(PREFIX+"/tmp", bisonFullPath+" -y -d -p " + pre + " " + fn)
  1072. osmove(PREFIX+"/tmp/y_tab.c", dstc)
  1073. osmove(PREFIX+"/tmp/y_tab.h", dsth)
  1074. elif (COMPILER=="LINUXA"):
  1075. oslocalcmd(PREFIX+"/tmp", "bison -y -d -p "+pre+" "+fn)
  1076. osmove(PREFIX+"/tmp/y.tab.c", dstc)
  1077. osmove(PREFIX+"/tmp/y.tab.h", dsth)
  1078. else:
  1079. oslocalcmd(PREFIX+"/tmp", "bison -y -d -p "+pre+" "+fn)
  1080. osmove(PREFIX+"/tmp/y.tab.c", dstc)
  1081. osmove(PREFIX+"/tmp/y.tab.h", dsth)
  1082. updatefiledate(dstc)
  1083. updatefiledate(dsth)
  1084. def CompileFlex(pre,dst,src,dashi):
  1085. """
  1086. Generate a CXX file from a source LXX file.
  1087. """
  1088. last = src.rfind("/")
  1089. fn = src[last+1:]
  1090. dst = PREFIX+"/tmp/"+dst
  1091. if (older(dst,src)):
  1092. CopyFile(PREFIX+"/tmp/", src)
  1093. if (COMPILER=="MSVC7" or COMPILER=="MSVC71"):
  1094. flexFullPath=os.path.abspath("thirdparty/win-util/flex.exe")
  1095. if (dashi): oslocalcmd(PREFIX+"/tmp", flexFullPath+" -i -P" + pre + " -olex.yy.c " + fn)
  1096. else: oslocalcmd(PREFIX+"/tmp", flexFullPath+" -P" + pre + " -olex.yy.c " + fn)
  1097. replaceInFile(PREFIX+'/tmp/lex.yy.c', dst, '#include <unistd.h>', '')
  1098. elif (COMPILER=="LINUXA"):
  1099. if (dashi): oslocalcmd(PREFIX+"/tmp", "flex -i -P" + pre + " -olex.yy.c " + fn)
  1100. else: oslocalcmd(PREFIX+"/tmp", "flex -P" + pre + " -olex.yy.c " + fn)
  1101. oscmd('cp '+PREFIX+'/tmp/lex.yy.c '+dst)
  1102. updatefiledate(dst)
  1103. ########################################################################
  1104. ##
  1105. ## CompileC
  1106. ##
  1107. ## Generate an OBJ file from a source CXX file.
  1108. ##
  1109. ########################################################################
  1110. priorIPath=None
  1111. def checkIfNewDir(path):
  1112. global priorIPath
  1113. if priorIPath != path:
  1114. print "\nStarting compile in \"%s\" (%s):\n"%(path,prettyTime(time.time()-STARTTIME),)
  1115. priorIPath=path
  1116. def CompileC(obj=0,src=0,ipath=[],opts=[]):
  1117. global VERBOSE
  1118. if ((obj==0)|(src==0)): sys.exit("syntax error in CompileC directive")
  1119. ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"]
  1120. fullsrc = CxxFindSource(src, ipath)
  1121. if (fullsrc == 0): sys.exit("Cannot find source file "+src)
  1122. dep = CxxCalcDependencies(fullsrc, ipath, [])
  1123. if (COMPILER=="MSVC7" or COMPILER=="MSVC71"):
  1124. wobj = PREFIX+"/tmp/"+obj
  1125. if (older(wobj, dep)):
  1126. if VERBOSE >= 0:
  1127. checkIfNewDir(ipath[1])
  1128. cmd = "cl.exe /Fo" + wobj + " /nologo /c"
  1129. cmd = cmd + " /I" + PREFIX + "/python/include"
  1130. if (opts.count("DXSDK")): cmd = cmd + ' /I"' + DIRECTXSDK + '/include"'
  1131. for ver in ["MAYA5","MAYA6","MAYA65"]:
  1132. if (opts.count(ver)): cmd = cmd + ' /I"' + MAYASDK[ver] + '/include"'
  1133. for max in ["MAX5","MAX6","MAX7"]:
  1134. if (PkgSelected(opts,max)):
  1135. cmd = cmd + ' /I"' + MAXSDK[max] + '/include" /I"' + MAXSDKCS[max] + '" /D' + max
  1136. for pkg in PACKAGES:
  1137. if (pkg[:4] != "MAYA") and PkgSelected(opts,pkg):
  1138. cmd = cmd + " /I" + SDK_LIB_PATH.get(pkg.lower(), '.') + "/include"
  1139. for x in ipath: cmd = cmd + " /I" + x
  1140. if (opts.count('NOFLOATWARN')): cmd = cmd + ' /wd4244 /wd4305'
  1141. if (opts.count("WITHINPANDA")): cmd = cmd + ' /DWITHIN_PANDA'
  1142. if (OPTIMIZE==1): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING /RTCs /GS"
  1143. if (OPTIMIZE==2): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING "
  1144. if (OPTIMIZE==3): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING "
  1145. if (OPTIMIZE==4): cmd = cmd + " /Zc:forScope /MD /Zi /O2 /Ob2 /DFORCE_INLINING /GL /DNDEBUG "
  1146. cmd = cmd + " /Fd" + wobj[:-4] + ".pdb"
  1147. building = buildingwhat(opts)
  1148. if (building): cmd = cmd + " /DBUILDING_" + building
  1149. cmd = cmd + " /EHsc /Zm300 /DWIN32_VC /DWIN32 /W3 " + fullsrc
  1150. oscmd(cmd)
  1151. updatefiledate(wobj)
  1152. elif (COMPILER=="LINUXA"):
  1153. wobj = PREFIX+"/tmp/" + obj[:-4] + ".o"
  1154. if (older(wobj, dep)):
  1155. if VERBOSE >= 0:
  1156. checkIfNewDir(ipath[1])
  1157. if (src[-2:]==".c"): cmd = 'gcc -c -o ' + wobj
  1158. else: cmd = 'g++ -ftemplate-depth-30 -c -o ' + wobj
  1159. cmd = cmd + ' -I"' + PYTHONSDK + '"'
  1160. if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/vrpn/include'
  1161. if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/fftw/include'
  1162. if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/fmod/include'
  1163. if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/nvidiacg/include'
  1164. if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -I' + NSPR_SDK + '/include'
  1165. if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' -I/usr/include/freetype2'
  1166. for x in ipath: cmd = cmd + ' -I' + x
  1167. if (opts.count("WITHINPANDA")): cmd = cmd + ' -DWITHIN_PANDA'
  1168. if (OPTIMIZE==1): cmd = cmd + " -g"
  1169. if (OPTIMIZE==2): cmd = cmd + " -O1"
  1170. if (OPTIMIZE==3): cmd = cmd + " -O2"
  1171. if (OPTIMIZE==4): cmd = cmd + " -O2"
  1172. building = buildingwhat(opts)
  1173. if (building): cmd = cmd + " -DBUILDING_" + building
  1174. cmd = cmd + ' ' + fullsrc
  1175. oscmd(cmd)
  1176. updatefiledate(wobj)
  1177. ########################################################################
  1178. ##
  1179. ## CompileRES
  1180. ##
  1181. ## Generate an RES file from a source RC file.
  1182. ##
  1183. ########################################################################
  1184. def CompileRES(obj=0,src=0,ipath=[],opts=[]):
  1185. if ((obj==0)|(src==0)): sys.exit("syntax error in CompileRES directive")
  1186. fullsrc = CxxFindSource(src, ipath)
  1187. if (fullsrc == 0): sys.exit("Cannot find source file "+src)
  1188. obj = PREFIX+"/tmp/"+obj
  1189. wdep = CxxCalcDependencies(fullsrc, ipath, [])
  1190. if (COMPILER=="MSVC7" or COMPILER=="MSVC71"):
  1191. if (older(obj, wdep)):
  1192. cmd = 'rc.exe /d "NDEBUG" /l 0x409'
  1193. for x in ipath: cmd = cmd + " /I" + x
  1194. cmd = cmd + ' /fo' + obj
  1195. cmd = cmd + ' ' + fullsrc
  1196. oscmd(cmd)
  1197. updatefiledate(obj)
  1198. elif (COMPILER=="LINUXA"):
  1199. sys.exit("Can only compile RES files on Windows.")
  1200. ########################################################################
  1201. ##
  1202. ## Interrogate
  1203. ##
  1204. ## Generate an IN file and a CXX-stub file from CXX source files
  1205. ##
  1206. ########################################################################
  1207. def Interrogate(ipath=0, opts=0, outd=0, outc=0, src=0, module=0, library=0, files=0):
  1208. if ((ipath==0)|(opts==0)|(outd==0)|(outc==0)|(src==0)|(module==0)|(library==0)|(files==0)):
  1209. sys.exit("syntax error in Interrogate directive")
  1210. ALLIN.append(outd)
  1211. ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"]
  1212. outd = PREFIX+"/pandac/input/"+outd
  1213. outc = PREFIX+"/tmp/"+outc
  1214. paths = xpaths(src+"/",files,"")
  1215. dep = CxxCalcDependenciesAll(paths, ipath)
  1216. dotdots = ""
  1217. for i in range(0,src.count("/")+1): dotdots = dotdots + "../"
  1218. building = 0
  1219. for x in opts:
  1220. if (x[:9]=="BUILDING_"): building = x[9:]
  1221. if (older(outc, dep) or older(outd, dep)):
  1222. if (COMPILER=="MSVC7"):
  1223. cmd = dotdots + PREFIX + "/bin/interrogate.exe"
  1224. cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32'
  1225. cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall'
  1226. if (OPTIMIZE==1): cmd = cmd + ' '
  1227. if (OPTIMIZE==2): cmd = cmd + ' '
  1228. if (OPTIMIZE==3): cmd = cmd + ' -DFORCE_INLINING'
  1229. if (OPTIMIZE==4): cmd = cmd + ' -DFORCE_INLINING'
  1230. cmd = cmd + ' -S' + dotdots + PREFIX + '/include/parser-inc'
  1231. cmd = cmd + ' -I' + dotdots + PREFIX + '/python/include'
  1232. for pkg in PACKAGES:
  1233. if (PkgSelected(opts,pkg)):
  1234. cmd = cmd + ' -I' + dotdots + THIRDPARTY + "/win-libs-vc7/" + pkg.lower() + "/include"
  1235. elif (COMPILER=="MSVC71"):
  1236. cmd = dotdots + PREFIX + "/bin/interrogate.exe"
  1237. cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32'
  1238. cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall'
  1239. if (OPTIMIZE==1): cmd = cmd + ' '
  1240. if (OPTIMIZE==2): cmd = cmd + ' '
  1241. if (OPTIMIZE==3): cmd = cmd + ' -DFORCE_INLINING'
  1242. if (OPTIMIZE==4): cmd = cmd + ' -DFORCE_INLINING'
  1243. cmd = cmd + ' -S' + dotdots + PREFIX + '/include/parser-inc'
  1244. cmd = cmd + ' -I' + dotdots + PREFIX + '/python/include'
  1245. for pkg in PACKAGES:
  1246. if (PkgSelected(opts,pkg)):
  1247. cmd = cmd + ' -I' + dotdots + THIRDPARTY + "/win-libs-vc7/" + pkg.lower() + "/include"
  1248. elif (COMPILER=="LINUXA"):
  1249. cmd = dotdots + PREFIX + '/bin/interrogate'
  1250. cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const'
  1251. if (OPTIMIZE==1): cmd = cmd + ' '
  1252. if (OPTIMIZE==2): cmd = cmd + ' '
  1253. if (OPTIMIZE==3): cmd = cmd + ' '
  1254. if (OPTIMIZE==4): cmd = cmd + ' '
  1255. cmd = cmd + ' -S' + dotdots + PREFIX + '/include/parser-inc -S/usr/include'
  1256. cmd = cmd + ' -I' + dotdots + PREFIX + '/python/include'
  1257. for pkg in PACKAGES:
  1258. if (PkgSelected(opts,pkg)):
  1259. cmd = cmd + ' -I' + dotdots + THIRDPARTY + "/linux-libs-a/" + pkg.lower() + "/include"
  1260. else:
  1261. cmd = dotdots + PREFIX + '/bin/interrogate'
  1262. cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const'
  1263. if (OPTIMIZE==1): cmd = cmd + ' '
  1264. if (OPTIMIZE==2): cmd = cmd + ' '
  1265. if (OPTIMIZE==3): cmd = cmd + ' '
  1266. if (OPTIMIZE==4): cmd = cmd + ' '
  1267. cmd = cmd + ' -S' + dotdots + PREFIX + '/include/parser-inc -S/usr/include'
  1268. cmd = cmd + ' -I' + dotdots + PREFIX + '/python/include'
  1269. for pkg in PACKAGES:
  1270. if (PkgSelected(opts,pkg)):
  1271. cmd = cmd + ' -I' + dotdots + THIRDPARTY + "/linux-libs-a/" + pkg.lower() + "/include"
  1272. cmd = cmd + ' -oc ' + dotdots + outc + ' -od ' + dotdots + outd
  1273. cmd = cmd + ' -fnames -string -refcount -assert -python'
  1274. for x in ipath: cmd = cmd + ' -I' + dotdots + x
  1275. if (building): cmd = cmd + " -DBUILDING_"+building
  1276. if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA"
  1277. cmd = cmd + ' -module ' + module + ' -library ' + library
  1278. if ((COMPILER=="MSVC7" or COMPILER=="MSVC71") and opts.count("DXSDK")):
  1279. cmd = cmd + ' -I"' + DIRECTXSDK + '/include"'
  1280. for ver in ["MAYA5","MAYA6","MAYA65"]:
  1281. if ((COMPILER=="MSVC7" or COMPILER=="MSVC71") and opts.count(ver)):
  1282. cmd = cmd + ' -I"' + MAYASDK[ver] + '/include"'
  1283. for x in files: cmd = cmd + ' ' + x
  1284. oslocalcmd(src, cmd)
  1285. updatefiledate(outd)
  1286. updatefiledate(outc)
  1287. ########################################################################
  1288. ##
  1289. ## InterrogateModule
  1290. ##
  1291. ## Generate a python-stub CXX file from a bunch of IN files.
  1292. ##
  1293. ########################################################################
  1294. def InterrogateModule(outc=0, module=0, library=0, files=0):
  1295. if ((outc==0)|(module==0)|(library==0)|(files==0)):
  1296. sys.exit("syntax error in InterrogateModule directive")
  1297. outc = PREFIX+"/tmp/"+outc
  1298. files = xpaths(PREFIX+"/pandac/input/",files,"")
  1299. if (older(outc, files)):
  1300. global VERBOSE
  1301. if VERBOSE >= 1:
  1302. print "Generating Python-stub cxx file for %s"%(library,)
  1303. if (COMPILER=="MSVC7" or COMPILER=="MSVC71"):
  1304. cmd = PREFIX + '/bin/interrogate_module.exe '
  1305. elif (COMPILER=="LINUXA"):
  1306. cmd = PREFIX + '/bin/interrogate_module '
  1307. cmd = cmd + ' -oc ' + outc + ' -module ' + module + ' -library ' + library + ' -python '
  1308. for x in files: cmd = cmd + ' ' + x
  1309. oscmd(cmd)
  1310. updatefiledate(outc)
  1311. ########################################################################
  1312. ##
  1313. ## CompileLIB
  1314. ##
  1315. ## Generate a LIB file from a bunch of OBJ files.
  1316. ##
  1317. ########################################################################
  1318. def CompileLIB(lib=0, obj=[], opts=[]):
  1319. if (lib==0): sys.exit("syntax error in CompileLIB directive")
  1320. if (COMPILER=="MSVC7" or COMPILER=="MSVC71"):
  1321. if (lib[-4:]==".ilb"): wlib = PREFIX+"/tmp/" + lib[:-4] + ".lib"
  1322. else: wlib = PREFIX+"/lib/" + lib[:-4] + ".lib"
  1323. wobj = xpaths(PREFIX+"/tmp/",obj,"")
  1324. ALLTARGETS.append(wlib)
  1325. if (older(wlib, wobj)):
  1326. cmd = 'lib.exe /nologo /OUT:' + wlib
  1327. if (OPTIMIZE==4): cmd = cmd + " /LTCG "
  1328. for x in wobj: cmd = cmd + ' ' + x
  1329. oscmd(cmd)
  1330. updatefiledate(wlib)
  1331. elif (COMPILER=="LINUXA"):
  1332. if (lib[-4:]==".ilb"): wlib = PREFIX+"/tmp/" + lib[:-4] + ".a"
  1333. else: wlib = PREFIX+"/lib/" + lib[:-4] + ".a"
  1334. wobj = []
  1335. for x in obj: wobj.append(PREFIX + "/tmp/" + x[:-4] + ".o")
  1336. if (older(wlib, wobj)):
  1337. cmd = 'ar cru ' + wlib
  1338. for x in wobj: cmd=cmd + ' ' + x
  1339. oscmd(cmd)
  1340. updatefiledate(wlib)
  1341. ########################################################################
  1342. ##
  1343. ## CompileLink
  1344. ##
  1345. ## Generate a DLL or EXE file from a bunch of OBJ and LIB files.
  1346. ##
  1347. ########################################################################
  1348. def CompileLink(dll=0, obj=[], opts=[], xdep=[]):
  1349. if (dll==0): sys.exit("Syntax error in CompileLink directive")
  1350. if (COMPILER=="MSVC7" or COMPILER=="MSVC71"):
  1351. lib = PREFIX+"/lib/"+dll[:-4]+".lib"
  1352. if ((dll[-4:] != ".exe") and (dll[-4:] != ".dll")):
  1353. dll = PREFIX+"/plugins/"+dll
  1354. else:
  1355. dll = PREFIX+"/bin/"+dll
  1356. ALLTARGETS.append(dll)
  1357. wobj = []
  1358. for x in obj:
  1359. suffix = x[-4:]
  1360. if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x)
  1361. elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".lib")
  1362. elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x)
  1363. elif (suffix==".ilb"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".lib")
  1364. elif (suffix==".res"): wobj.append(PREFIX+"/tmp/"+x)
  1365. else: sys.exit("unknown suffix in object list.")
  1366. if (older(dll, wobj+xdep)):
  1367. cmd = 'link.exe /nologo /NODEFAULTLIB:LIBCI.LIB'
  1368. if (dll[-4:]!=".exe"): cmd = cmd + " /DLL"
  1369. if (OPTIMIZE==1): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF "
  1370. if (OPTIMIZE==2): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF "
  1371. if (OPTIMIZE==3): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF "
  1372. if (OPTIMIZE==4): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF /LTCG "
  1373. cmd = cmd + " /MAP /MAPINFO:EXPORTS /MAPINFO:LINES /fixed:no /incremental:no /stack:4194304 "
  1374. if (opts.count("NOLIBCI")): cmd = cmd + " /NODEFAULTLIB:LIBCI.LIB "
  1375. if (opts.count("MAXEGGDEF")): cmd = cmd + ' /DEF:pandatool/src/maxegg/MaxEgg.def'
  1376. cmd = cmd + ' /OUT:' + dll + ' /IMPLIB:' + lib + ' /MAP:NUL'
  1377. cmd = cmd + ' /LIBPATH:' + PREFIX + '/python/libs '
  1378. for x in wobj: cmd = cmd + ' ' + x
  1379. if (dll[-4:]==".exe"): cmd = cmd + ' ' + PREFIX + '/tmp/pandaIcon.res'
  1380. if (opts.count("D3D8") or opts.count("D3D9") or opts.count("DXDRAW") or opts.count("DXSOUND") or opts.count("DXGUID")):
  1381. cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + '/lib/x86"'
  1382. cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + '/lib"'
  1383. if (opts.count("D3D8")): cmd = cmd + ' d3d8.lib d3dx8.lib dxerr8.lib'
  1384. if (opts.count("D3D9")): cmd = cmd + ' d3d9.lib d3dx9.lib dxerr9.lib'
  1385. if (opts.count("DXDRAW")): cmd = cmd + ' ddraw.lib'
  1386. if (opts.count("DXSOUND")): cmd = cmd + ' dsound.lib'
  1387. if (opts.count("DXGUID")): cmd = cmd + ' dxguid.lib'
  1388. if (opts.count("WINSOCK")): cmd = cmd + " wsock32.lib"
  1389. if (opts.count("WINSOCK2")): cmd = cmd + " wsock32.lib ws2_32.lib"
  1390. if (opts.count("WINCOMCTL")): cmd = cmd + ' comctl32.lib'
  1391. if (opts.count("WINCOMDLG")): cmd = cmd + ' comdlg32.lib'
  1392. if (opts.count("WINUSER")): cmd = cmd + " user32.lib"
  1393. if (opts.count("WINMM")): cmd = cmd + " winmm.lib"
  1394. if (opts.count("WINIMM")): cmd = cmd + " imm32.lib"
  1395. if (opts.count("WINKERNEL")): cmd = cmd + " kernel32.lib"
  1396. if (opts.count("WINOLDNAMES")): cmd = cmd + " oldnames.lib"
  1397. if (opts.count("WINGDI")): cmd = cmd + " gdi32.lib"
  1398. if (opts.count("ADVAPI")): cmd = cmd + " advapi32.lib"
  1399. if (opts.count("GLUT")): cmd = cmd + " opengl32.lib glu32.lib"
  1400. if (PkgSelected(opts,"ZLIB")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/zlib/lib/libz.lib'
  1401. if (PkgSelected(opts,"PNG")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/png/lib/libpng.lib'
  1402. if (PkgSelected(opts,"JPEG")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/jpeg/lib/libjpeg.lib'
  1403. if (PkgSelected(opts,"TIFF")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/tiff/lib/libtiff.lib'
  1404. if (PkgSelected(opts,"VRPN")):
  1405. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/vrpn/lib/vrpn.lib'
  1406. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/vrpn/lib/quat.lib'
  1407. if (PkgSelected(opts,"FMOD")):
  1408. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/fmod/lib/fmod.lib'
  1409. if (PkgSelected(opts,"MILES")):
  1410. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/miles/lib/mss32.lib'
  1411. if (PkgSelected(opts,"NVIDIACG")):
  1412. if (opts.count("CGGL")):
  1413. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/nvidiacg/lib/cgGL.lib'
  1414. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/nvidiacg/lib/cg.lib'
  1415. if (PkgSelected(opts,"HELIX")):
  1416. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/runtlib.lib'
  1417. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/syslib.lib'
  1418. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/contlib.lib'
  1419. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/debuglib.lib'
  1420. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/utillib.lib'
  1421. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/stlport_vc7.lib'
  1422. if (PkgSelected(opts,"NSPR")):
  1423. cmd = cmd + ' ' + SDK_LIB_PATH['nspr'] + '/nspr4.lib'
  1424. if (PkgSelected(opts,"SSL")):
  1425. cmd = cmd + ' ' + SDK_LIB_PATH['ssl'] + '/ssleay32.lib'
  1426. cmd = cmd + ' ' + SDK_LIB_PATH['ssl'] + '/libeay32.lib'
  1427. if (PkgSelected(opts,"FREETYPE")):
  1428. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/freetype/lib/libfreetype.lib'
  1429. if (PkgSelected(opts,"FFTW")):
  1430. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/fftw/lib/rfftw.lib'
  1431. cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/fftw/lib/fftw.lib'
  1432. for maya in ["MAYA5","MAYA6","MAYA65"]:
  1433. if (PkgSelected(opts,maya)):
  1434. cmd = cmd + ' "' + MAYASDK[maya] + '/lib/Foundation.lib"'
  1435. cmd = cmd + ' "' + MAYASDK[maya] + '/lib/OpenMaya.lib"'
  1436. cmd = cmd + ' "' + MAYASDK[maya] + '/lib/OpenMayaAnim.lib"'
  1437. for max in ["MAX5","MAX6","MAX7"]:
  1438. if PkgSelected(opts,max):
  1439. cmd = cmd + ' "' + MAXSDK[max] + '/lib/core.lib"'
  1440. cmd = cmd + ' "' + MAXSDK[max] + '/lib/edmodel.lib"'
  1441. cmd = cmd + ' "' + MAXSDK[max] + '/lib/gfx.lib"'
  1442. cmd = cmd + ' "' + MAXSDK[max] + '/lib/geom.lib"'
  1443. cmd = cmd + ' "' + MAXSDK[max] + '/lib/mesh.lib"'
  1444. cmd = cmd + ' "' + MAXSDK[max] + '/lib/maxutil.lib"'
  1445. cmd = cmd + ' "' + MAXSDK[max] + '/lib/paramblk2.lib"'
  1446. oscmd(cmd)
  1447. updatefiledate(dll)
  1448. if ((OPTIMIZE == 1) and (dll[-4:]==".dll")):
  1449. CopyFile(dll[:-4]+"_d.dll", dll)
  1450. elif (COMPILER=="LINUXA"):
  1451. ALLTARGETS.append(PREFIX+"/lib/"+dll[:-4]+".so")
  1452. if (dll[-4:]==".exe"): wdll = PREFIX+"/bin/"+dll[:-4]
  1453. else: wdll = PREFIX+"/lib/"+dll[:-4]+".so"
  1454. wobj = []
  1455. for x in obj:
  1456. suffix = x[-4:]
  1457. if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".o")
  1458. elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".so")
  1459. elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x[:-4]+".a")
  1460. elif (suffix==".ilb"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".a")
  1461. else: sys.exit("unknown suffix in object list.")
  1462. if (older(wdll, wobj+xdep)):
  1463. if (dll[-4:]==".exe"): cmd = 'g++ -o ' + wdll + ' -L' + PREFIX + '/lib'
  1464. else: cmd = 'g++ -shared -o ' + wdll + ' -L' + PREFIX + '/lib'
  1465. for x in obj:
  1466. suffix = x[-4:]
  1467. if (suffix==".obj"): cmd = cmd + ' ' + PREFIX + '/tmp/' + x[:-4] + '.o'
  1468. elif (suffix==".dll"): cmd = cmd + ' -l' + x[3:-4]
  1469. elif (suffix==".lib"): cmd = cmd + ' ' + PREFIX + '/lib/' + x[:-4] + '.a'
  1470. elif (suffix==".ilb"): cmd = cmd + ' ' + PREFIX + '/tmp/' + x[:-4] + '.a'
  1471. if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -L' + THIRDPARTY + '/linux-libs-a/fmod/lib -lfmod-3.74'
  1472. if (PkgSelected(opts,"NVIDIACG")):
  1473. cmd = cmd + ' -L' + THIRDPARTY + 'nvidiacg/lib '
  1474. if (opts.count("CGGL")): cmd = cmd + " -lCgGL"
  1475. cmd = cmd + " -lCg"
  1476. if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -L' + NSPR_SDK + '/lib -lpandanspr4'
  1477. if (PkgSelected(opts,"ZLIB")): cmd = cmd + " -lz"
  1478. if (PkgSelected(opts,"PNG")): cmd = cmd + " -lpng"
  1479. if (PkgSelected(opts,"JPEG")): cmd = cmd + " -ljpeg"
  1480. if (PkgSelected(opts,"TIFF")): cmd = cmd + " -ltiff"
  1481. if (PkgSelected(opts,"SSL")): cmd = cmd + " -lssl"
  1482. if (PkgSelected(opts,"FREETYPE")): cmd = cmd + " -lfreetype"
  1483. if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -L' + THIRDPARTY + '/linux-libs-a/vrpn/lib -lvrpn -lquat'
  1484. if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -L' + THIRDPARTY + '/linux-libs-a/fftw/lib -lrfftw -lfftw'
  1485. if (opts.count("GLUT")): cmd = cmd + " -lGL -lGLU"
  1486. oscmd(cmd)
  1487. updatefiledate(wdll)
  1488. ##########################################################################################
  1489. #
  1490. # CompileBAM
  1491. #
  1492. # Generate a BAM file from an EGG or FLT
  1493. #
  1494. ##########################################################################################
  1495. def CompileBAM(preconv, bam, egg):
  1496. dotexe = ".exe"
  1497. if (sys.platform != "win32" or sys.platform == "cygwin"): dotexe = ""
  1498. if (older(bam, egg)):
  1499. if (egg[-4:]==".flt"):
  1500. oscmd(PREFIX + "/bin/flt2egg" + dotexe + " -pr " + preconv + " -o " + PREFIX + "/tmp/tmp.egg" + " " + egg)
  1501. oscmd(PREFIX + "/bin/egg2bam" + dotexe + " -o " + bam + " " + PREFIX + "/tmp/tmp.egg")
  1502. else:
  1503. oscmd(PREFIX + "/bin/egg2bam" + dotexe + " -pr " + preconv + " -o " + bam + " " + egg)
  1504. ##########################################################################################
  1505. #
  1506. # If the 'make depend' process discovers an 'include'
  1507. # directive that includes one of the following files,
  1508. # the specified file is not added as a dependency,
  1509. # nor is it traversed.
  1510. #
  1511. ##########################################################################################
  1512. CxxIgnoreHeader["Python.h"] = 1
  1513. CxxIgnoreHeader["Python/Python.h"] = 1
  1514. CxxIgnoreHeader["alloc.h"] = 1
  1515. CxxIgnoreHeader["ctype.h"] = 1
  1516. CxxIgnoreHeader["stdlib.h"] = 1
  1517. CxxIgnoreHeader["ipc_thread.h"] = 1
  1518. CxxIgnoreHeader["platform/symbian/symbian_print.h"] = 1
  1519. CxxIgnoreHeader["hxtypes.h"] = 1
  1520. CxxIgnoreHeader["hxcom.h"] = 1
  1521. CxxIgnoreHeader["hxiids.h"] = 1
  1522. CxxIgnoreHeader["hxpiids.h"] = 1
  1523. CxxIgnoreHeader["dsound.h"] = 1
  1524. CxxIgnoreHeader["hlxosstr.h"] = 1
  1525. CxxIgnoreHeader["ddraw.h"] = 1
  1526. CxxIgnoreHeader["mss.h"] = 1
  1527. CxxIgnoreHeader["MacSocket.h"] = 1
  1528. CxxIgnoreHeader["textureTransition.h"] = 1
  1529. CxxIgnoreHeader["transformTransition.h"] = 1
  1530. CxxIgnoreHeader["billboardTransition.h"] = 1
  1531. CxxIgnoreHeader["transformTransition.h"] = 1
  1532. CxxIgnoreHeader["transparencyTransition.h"] = 1
  1533. CxxIgnoreHeader["allTransitionsWrapper.h"] = 1
  1534. CxxIgnoreHeader["allTransitionsWrapper.h"] = 1
  1535. CxxIgnoreHeader["namedNode.h"] = 1
  1536. CxxIgnoreHeader["renderRelation.h"] = 1
  1537. CxxIgnoreHeader["renderTraverser.h"] = 1
  1538. CxxIgnoreHeader["get_rel_pos.h"] = 1
  1539. CxxIgnoreHeader["Max.h"] = 1
  1540. CxxIgnoreHeader["iparamb2.h"] = 1
  1541. CxxIgnoreHeader["iparamm2.h"] = 1
  1542. CxxIgnoreHeader["istdplug.h"] = 1
  1543. CxxIgnoreHeader["iskin.h"] = 1
  1544. CxxIgnoreHeader["stdmat.h"] = 1
  1545. CxxIgnoreHeader["phyexp.h"] = 1
  1546. CxxIgnoreHeader["bipexp.h"] = 1
  1547. CxxIgnoreHeader["windows.h"] = 1
  1548. CxxIgnoreHeader["windef.h"] = 1
  1549. CxxIgnoreHeader["modstack.h"] = 1
  1550. CxxIgnoreHeader["afxres.h"] = 1
  1551. ##########################################################################################
  1552. #
  1553. # Generate pandaVersion.h
  1554. #
  1555. ##########################################################################################
  1556. VERSION1=int(VERSION.split(".")[0])
  1557. VERSION2=int(VERSION.split(".")[1])
  1558. VERSION3=int(VERSION.split(".")[2])
  1559. NVERSION=VERSION1*1000000+VERSION2*1000+VERSION3
  1560. conf="""
  1561. #define PANDA_MAJOR_VERSION VERSION1
  1562. #define PANDA_MINOR_VERSION VERSION2
  1563. #define PANDA_SEQUENCE_VERSION VERSION2
  1564. #undef PANDA_OFFICIAL_VERSION
  1565. #define PANDA_VERSION NVERSION
  1566. #define PANDA_VERSION_STR "VERSION1.VERSION2.VERSION3"
  1567. #define PANDA_DISTRIBUTOR "makepanda"
  1568. """
  1569. conf = conf.replace("VERSION1",str(VERSION1))
  1570. conf = conf.replace("VERSION2",str(VERSION2))
  1571. conf = conf.replace("VERSION3",str(VERSION3))
  1572. conf = conf.replace("NVERSION",str(NVERSION))
  1573. ConditionalWriteFile(PREFIX+'/include/pandaVersion.h',conf)
  1574. conf="""
  1575. # include "dtoolbase.h"
  1576. EXPCL_DTOOL int panda_version_VERSION1_VERSION2_VERSION3 = 0;
  1577. """
  1578. conf = conf.replace("VERSION1",str(VERSION1))
  1579. conf = conf.replace("VERSION2",str(VERSION2))
  1580. conf = conf.replace("VERSION3",str(VERSION3))
  1581. conf = conf.replace("NVERSION",str(NVERSION))
  1582. ConditionalWriteFile(PREFIX+'/include/checkPandaVersion.cxx',conf)
  1583. conf="""
  1584. # include "dtoolbase.h"
  1585. extern EXPCL_DTOOL int panda_version_VERSION1_VERSION2_VERSION3;
  1586. # ifndef WIN32
  1587. /* For Windows, exporting the symbol from the DLL is sufficient; the
  1588. DLL will not load unless all expected public symbols are defined.
  1589. Other systems may not mind if the symbol is absent unless we
  1590. explictly write code that references it. */
  1591. static int check_panda_version = panda_version_VERSION1_VERSION2_VERSION3;
  1592. # endif
  1593. """
  1594. conf = conf.replace("VERSION1",str(VERSION1))
  1595. conf = conf.replace("VERSION2",str(VERSION2))
  1596. conf = conf.replace("VERSION3",str(VERSION3))
  1597. conf = conf.replace("NVERSION",str(NVERSION))
  1598. ConditionalWriteFile(PREFIX+'/include/checkPandaVersion.h',conf)
  1599. ConditionalWriteFile(PREFIX + "/tmp/pythonversion", os.path.basename(PYTHONSDK))
  1600. ##########################################################################################
  1601. #
  1602. # If running under windows, compile up the icon.
  1603. #
  1604. ##########################################################################################
  1605. if (sys.platform == "win32" or sys.platform == "cygwin"):
  1606. IPATH=["panda/src/configfiles"]
  1607. OPTS=[]
  1608. CompileRES(ipath=IPATH, opts=OPTS, src='pandaIcon.rc', obj='pandaIcon.res')
  1609. ##########################################################################################
  1610. #
  1611. # Generate direct/__init__.py
  1612. #
  1613. ##########################################################################################
  1614. DIRECTINIT="""
  1615. import os,sys
  1616. srcdir1 = os.path.join(__path__[0], 'src')
  1617. srcdir2 = os.path.join(__path__[0], '..', '..', 'direct', 'src')
  1618. if (os.path.isdir(srcdir1)): __path__[0] = srcdir1
  1619. elif (os.path.isdir(srcdir2)): __path__[0] = srcdir2
  1620. else: sys.exit("Cannot find the 'direct' tree")
  1621. """
  1622. ConditionalWriteFile(PREFIX+'/direct/__init__.py', DIRECTINIT)
  1623. ##########################################################################################
  1624. #
  1625. # Generate dtool_have_xxx.dat
  1626. #
  1627. ##########################################################################################
  1628. for x in PACKAGES:
  1629. if (OMIT.count(x)): ConditionalWriteFile(PREFIX+'/tmp/dtool_have_'+x.lower()+'.dat',"0\n")
  1630. else: ConditionalWriteFile(PREFIX+'/tmp/dtool_have_'+x.lower()+'.dat',"1\n")
  1631. ##########################################################################################
  1632. #
  1633. # Generate dtool_config.h
  1634. #
  1635. ##########################################################################################
  1636. conf = "/* dtool_config.h. Generated automatically by makepanda.py */\n"
  1637. for key,win,unix in DTOOLDEFAULTS:
  1638. val = DTOOLCONFIG[key]
  1639. if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
  1640. else: conf = conf + "#define " + key + " " + val + "\n"
  1641. ConditionalWriteFile(PREFIX+'/include/dtool_config.h',conf)
  1642. ##########################################################################################
  1643. #
  1644. # Generate the PRC files into the ETC directory.
  1645. #
  1646. ##########################################################################################
  1647. CONFAUTOPRC="""
  1648. ###########################################################
  1649. ### ###
  1650. ### Panda3D Configuration File - Auto-Generated Portion ###
  1651. ### ###
  1652. ### Editing this file is not recommended. Most of these ###
  1653. ### directives can be overriden in Config.prc ###
  1654. ### ###
  1655. ###########################################################
  1656. # Define the display types that have been compiled in. Panda will
  1657. # pick one of these by going through the list in this order until one
  1658. # is found that works, unless the user specifically requests a
  1659. # particular display type with the load-display directive.
  1660. aux-display pandagl
  1661. aux-display pandadx9
  1662. aux-display pandadx8
  1663. aux-display pandadx7
  1664. # The egg loader is handy to have available by default. This allows
  1665. # clients to load egg files. (The bam loader is built-in so bam files
  1666. # are always loadable).
  1667. # By qualifying with the extension "egg", we indicate the egg loader
  1668. # should be made available only if you explicitly name a file with an
  1669. # .egg extension.
  1670. load-file-type egg pandaegg
  1671. # The following lines define some handy object types to use within the
  1672. # egg syntax. This remaps <ObjectType> { name } into whatever egg
  1673. # syntax is given by egg-object-type-name, which makes a handy
  1674. # abbreviation for modeling packages (like Maya) to insert
  1675. # sophisticated egg syntax into the generated egg file, using a single
  1676. # object type string.
  1677. egg-object-type-portal <Scalar> portal { 1 }
  1678. egg-object-type-polylight <Scalar> polylight { 1 }
  1679. egg-object-type-seq24 <Switch> { 1 } <Scalar> fps { 24 }
  1680. egg-object-type-seq12 <Switch> { 1 } <Scalar> fps { 12 }
  1681. egg-object-type-indexed <Scalar> indexed { 1 }
  1682. # These are just shortcuts to define the Model and DCS flags, which
  1683. # indicate nodes that should not be flattened out of the hierarchy
  1684. # during the conversion process. DCS goes one step further and
  1685. # indicates that the node's transform is important and should be
  1686. # preserved (DCS stands for Dynamic Coordinate System).
  1687. egg-object-type-model <Model> { 1 }
  1688. egg-object-type-dcs <DCS> { 1 }
  1689. # The following define various kinds of collision geometry. These
  1690. # mark the geometry at this level and below as invisible collision
  1691. # polygons, which can be used by Panda's collision system to detect
  1692. # collisions more optimally than regular visible polygons.
  1693. egg-object-type-barrier <Collide> { Polyset descend }
  1694. egg-object-type-sphere <Collide> { Sphere descend }
  1695. egg-object-type-invsphere <Collide> { InvSphere descend }
  1696. egg-object-type-tube <Collide> { Tube descend }
  1697. # As above, but these are flagged to be "intangible", so that they
  1698. # will trigger an event but not stop an object from passing through.
  1699. egg-object-type-trigger <Collide> { Polyset descend intangible }
  1700. egg-object-type-trigger-sphere <Collide> { Sphere descend intangible }
  1701. # "bubble" puts an invisible bubble around an object, but does not
  1702. # otherwise remove the geometry.
  1703. egg-object-type-bubble <Collide> { Sphere keep descend }
  1704. # "ghost" turns off the normal collide bit that is set on visible
  1705. # geometry by default, so that if you are using visible geometry for
  1706. # collisions, this particular geometry will not be part of those
  1707. # collisions--it is ghostlike.
  1708. egg-object-type-ghost <Scalar> collide-mask { 0 }
  1709. # This module allows direct loading of formats like .flt, .mb, or .dxf
  1710. load-file-type ptloader
  1711. # Define a new egg object type. See the comments in _panda.prc about this.
  1712. egg-object-type-direct-widget <Scalar> collide-mask { 0x80000000 } <Collide> { Polyset descend }
  1713. # Define a new cull bin that will render on top of everything else.
  1714. cull-bin gui-popup 60 unsorted
  1715. """
  1716. CONFIGPRC="""
  1717. ###########################################################
  1718. ### ###
  1719. ### Panda3D Configuration File - User-Editable Portion ###
  1720. ### ###
  1721. ###########################################################
  1722. # Uncomment one of the following lines to choose whether you should
  1723. # run using OpenGL or DirectX rendering.
  1724. load-display pandagl
  1725. # These control the placement and size of the default rendering window.
  1726. win-origin 100 0
  1727. win-size 800 600
  1728. # Uncomment this line if you want to run Panda fullscreen instead of
  1729. # in a window.
  1730. fullscreen #f
  1731. # If you don't object to running OpenGL in software leave the keyword
  1732. # "software" in the following line, otherwise remove it to force
  1733. # hardware only.
  1734. framebuffer-mode rgba double-buffer depth multisample hardware software
  1735. # These control the amount of output Panda gives for some various
  1736. # categories. The severity levels, in order, are "spam", "debug",
  1737. # "info", "warning", and "fatal"; the default is "info". Uncomment
  1738. # one (or define a new one for the particular category you wish to
  1739. # change) to control this output.
  1740. notify-level warning
  1741. default-directnotify-level warning
  1742. # These specify where model files may be loaded from. You probably
  1743. # want to set this to a sensible path for yourself. $THIS_PRC_DIR is
  1744. # a special variable that indicates the same directory as this
  1745. # particular Config.prc file.
  1746. model-path .
  1747. model-path $THIS_PRC_DIR/..
  1748. model-path $THIS_PRC_DIR/../models
  1749. sound-path .
  1750. sound-path $THIS_PRC_DIR/..
  1751. sound-path $THIS_PRC_DIR/../models
  1752. texture-path .
  1753. texture-path $THIS_PRC_DIR/..
  1754. texture-path $THIS_PRC_DIR/../models
  1755. # This enable the automatic creation of a TK window when running
  1756. # Direct.
  1757. want-directtools #f
  1758. want-tk #f
  1759. # This enables simple networked programs to easily provide a DC file
  1760. dc-file sample.dc
  1761. # Enable audio using the FMod audio library by default:
  1762. audio-library-name fmod_audio
  1763. """
  1764. if (sys.platform != "win32" or sys.platform == "cygwin"):
  1765. CONFAUTOPRC = CONFAUTOPRC.replace("aux-display pandadx9","")
  1766. CONFAUTOPRC = CONFAUTOPRC.replace("aux-display pandadx8","")
  1767. CONFAUTOPRC = CONFAUTOPRC.replace("aux-display pandadx7","")
  1768. ConditionalWriteFile(PREFIX + "/etc/Confauto.prc", CONFAUTOPRC)
  1769. ConditionalWriteFile(PREFIX + "/etc/Config.prc", CONFIGPRC)
  1770. ##########################################################################################
  1771. #
  1772. # Copy the precompiled binaries and DLLs into the build.
  1773. #
  1774. ##########################################################################################
  1775. for pkg in (PACKAGES + ["extras"]):
  1776. if (OMIT.count(pkg)==0):
  1777. if (COMPILER == "MSVC7" or COMPILER=="MSVC71"):
  1778. if (os.path.exists(THIRDPARTY+"/win-libs-vc7/"+pkg.lower()+"/bin")):
  1779. CopyAllFiles(PREFIX+"/bin/",THIRDPARTY+"/win-libs-vc7/"+pkg.lower()+"/bin/")
  1780. elif (COMPILER == "LINUXA"):
  1781. if (os.path.exists(THIRDPARTY+"/linux-libs-a/"+pkg.lower()+"/lib")):
  1782. CopyAllFiles(PREFIX+"/lib/",THIRDPARTY+"/linux-libs-a/"+pkg.lower()+"/lib/")
  1783. if sys.platform == "win32" or sys.platform == "cygwin":
  1784. CopyTree(PREFIX+'/python', PYTHONSDK)
  1785. if os.path.isfile(PYTHONSDK+'/python22.dll'):
  1786. CopyFile(PREFIX+'/bin/', PYTHONSDK+'/python22.dll')
  1787. ########################################################################
  1788. ##
  1789. ## Compile the 'ppython' executable and 'genpycode' executables
  1790. ##
  1791. ########################################################################
  1792. IPATH=['direct/src/directbase']
  1793. CompileC(ipath=IPATH, opts=['BUILDING_PPYTHON'], src='ppython.cxx', obj='ppython.obj')
  1794. CompileLink(opts=['WINUSER'], dll='ppython.exe', obj=['ppython.obj'])
  1795. IPATH=['direct/src/directbase']
  1796. CompileC(ipath=IPATH, opts=['BUILDING_GENPYCODE'], src='ppython.cxx', obj='genpycode.obj')
  1797. CompileLink(opts=['WINUSER'], dll='genpycode.exe', obj=['genpycode.obj'])
  1798. ########################################################################
  1799. #
  1800. # Copy header files to the PREFIX/include directory.
  1801. #
  1802. # Are we just copying *ALL* headers into the include directory?
  1803. # If so, let's automate this.
  1804. #
  1805. # We're definitely not copying all headers. We're only copying those
  1806. # same headers that are copied by ppremake. But the bigger question
  1807. # is, did he *intend* to copy all headers? Another good question is,
  1808. # could we just put a little tag into the header file itself, indicating
  1809. # that it is meant to be copied?
  1810. #
  1811. ########################################################################
  1812. ConditionalWriteFile(PREFIX+'/include/ctl3d.h', '/* dummy file to make MAX happy */')
  1813. class FileList:
  1814. allFiles=['*']
  1815. includes=['/*_src.cxx', '/*.h', '/*.I', '/*.T']
  1816. def __init__(self):
  1817. self.files={}
  1818. def add(self, srcPattern="*"):
  1819. global VERBOSE
  1820. if VERBOSE:
  1821. print "FileList.add(\"%s\")"%(srcPattern,)
  1822. for i in glob(srcPattern):
  1823. self.files[i.replace("\\", "/")]=None
  1824. def addIncludes(self, srcPattern="."):
  1825. for i in self.includes:
  1826. self.add(srcPattern+i)
  1827. def omit(self, srcPattern="*"):
  1828. global VERBOSE
  1829. if VERBOSE:
  1830. print "FileList.omit(\"%s\")"%(srcPattern,)
  1831. for i in glob(srcPattern):
  1832. try: del self.files[i.replace("\\", "/")]
  1833. except: pass
  1834. def omitIncludes(self, srcPattern="."):
  1835. for i in self.includes:
  1836. self.omit(srcPattern+i)
  1837. def copyTo(self, dstDir="."):
  1838. global VERBOSE
  1839. if VERBOSE:
  1840. print "FileList.copyTo(\"%s\")"%(dstDir,)
  1841. for i in self.files.keys():
  1842. if os.path.isfile(i):
  1843. CopyFile(dstDir+'/'+os.path.split(i)[1], i)
  1844. fileList=FileList()
  1845. fileList.addIncludes('dtool/src/*')
  1846. fileList.addIncludes('panda/src/*')
  1847. fileList.addIncludes('pandatool/src/*')
  1848. fileList.addIncludes('pandaapp/src/*')
  1849. fileList.addIncludes('direct/src/*')
  1850. fileList.omitIncludes('dtool/src/parser-inc')
  1851. fileList.omitIncludes('dtool/src/parser-inc')
  1852. fileList.copyTo(PREFIX+'/include')
  1853. del fileList
  1854. fileList=FileList()
  1855. fileList.add('dtool/src/parser-inc/*')
  1856. fileList.copyTo(PREFIX+'/include/parser-inc')
  1857. fileList.copyTo(PREFIX+'/include/parser-inc/openssl')
  1858. del fileList
  1859. fileList=FileList()
  1860. fileList.add('dtool/src/parser-inc/cg.h')
  1861. fileList.add('dtool/src/parser-inc/cgGL.h')
  1862. fileList.copyTo(PREFIX+'/include/parser-inc/Cg')
  1863. del fileList
  1864. ########################################################################
  1865. #
  1866. # This file contains a list of all the files that need to be compiled.
  1867. #
  1868. ########################################################################
  1869. #
  1870. # DIRECTORY: dtool/src/dtoolbase/
  1871. #
  1872. IPATH=['dtool/src/dtoolbase']
  1873. OPTS=['BUILDING_DTOOL', 'NSPR']
  1874. CompileC(ipath=IPATH, opts=OPTS, src='dtoolbase.cxx', obj='dtoolbase_dtoolbase.obj')
  1875. #
  1876. # DIRECTORY: dtool/src/dtoolutil/
  1877. #
  1878. IPATH=['dtool/src/dtoolutil']
  1879. OPTS=['BUILDING_DTOOL', 'NSPR']
  1880. CompileC(ipath=IPATH, opts=OPTS, src='gnu_getopt.c', obj='dtoolutil_gnu_getopt.obj')
  1881. CompileC(ipath=IPATH, opts=OPTS, src='gnu_getopt1.c', obj='dtoolutil_gnu_getopt1.obj')
  1882. CompileC(ipath=IPATH, opts=OPTS, src='dtoolutil_composite1.cxx', obj='dtoolutil_composite1.obj')
  1883. CompileC(ipath=IPATH, opts=OPTS, src='dtoolutil_composite2.cxx', obj='dtoolutil_composite2.obj')
  1884. #
  1885. # DIRECTORY: dtool/metalibs/dtool/
  1886. #
  1887. IPATH=['dtool/metalibs/dtool']
  1888. OPTS=['BUILDING_DTOOL', 'NSPR']
  1889. CompileC(ipath=IPATH, opts=OPTS, src='dtool.cxx', obj='dtool_dtool.obj')
  1890. CompileLink(opts=['ADVAPI', 'NSPR'], dll='libdtool.dll', obj=[
  1891. 'dtool_dtool.obj',
  1892. 'dtoolutil_gnu_getopt.obj',
  1893. 'dtoolutil_gnu_getopt1.obj',
  1894. 'dtoolutil_composite1.obj',
  1895. 'dtoolutil_composite2.obj',
  1896. 'dtoolbase_dtoolbase.obj',
  1897. ])
  1898. #
  1899. # DIRECTORY: dtool/src/cppparser/
  1900. #
  1901. IPATH=['dtool/src/cppparser']
  1902. CompileBison(pre='cppyy', dstc='cppBison.cxx', dsth='cppBison.h', src='dtool/src/cppparser/cppBison.yxx')
  1903. OPTS=['NSPR']
  1904. CompileC(ipath=IPATH, opts=OPTS, src='cppParser_composite1.cxx', obj='cppParser_composite1.obj')
  1905. CompileC(ipath=IPATH, opts=OPTS, src='cppParser_composite2.cxx', obj='cppParser_composite2.obj')
  1906. CompileC(ipath=IPATH, opts=OPTS, src='cppBison.cxx', obj='cppParser_cppBison.obj')
  1907. CompileLIB(lib='libcppParser.ilb', obj=[
  1908. 'cppParser_composite1.obj',
  1909. 'cppParser_composite2.obj',
  1910. 'cppParser_cppBison.obj',
  1911. ])
  1912. #
  1913. # DIRECTORY: dtool/src/prc/
  1914. #
  1915. IPATH=['dtool/src/prc']
  1916. OPTS=['BUILDING_DTOOLCONFIG', 'SSL', 'NSPR']
  1917. CompileC(ipath=IPATH, opts=OPTS, src='prc_composite1.cxx', obj='prc_composite1.obj')
  1918. CompileC(ipath=IPATH, opts=OPTS, src='prc_composite2.cxx', obj='prc_composite2.obj')
  1919. #
  1920. # DIRECTORY: dtool/src/dconfig/
  1921. #
  1922. IPATH=['dtool/src/dconfig']
  1923. OPTS=['BUILDING_DTOOLCONFIG', 'NSPR']
  1924. CompileC(ipath=IPATH, opts=OPTS, src='dconfig_composite1.cxx', obj='dconfig_composite1.obj')
  1925. #
  1926. # DIRECTORY: dtool/src/interrogatedb/
  1927. #
  1928. IPATH=['dtool/src/interrogatedb']
  1929. OPTS=['BUILDING_DTOOLCONFIG', 'NSPR']
  1930. CompileC(ipath=IPATH, opts=OPTS, src='interrogatedb_composite1.cxx', obj='interrogatedb_composite1.obj')
  1931. CompileC(ipath=IPATH, opts=OPTS, src='interrogatedb_composite2.cxx', obj='interrogatedb_composite2.obj')
  1932. #
  1933. # DIRECTORY: dtool/metalibs/dtoolconfig/
  1934. #
  1935. IPATH=['dtool/metalibs/dtoolconfig']
  1936. OPTS=['BUILDING_DTOOLCONFIG', 'NSPR']
  1937. CompileC(ipath=IPATH, opts=OPTS, src='dtoolconfig.cxx', obj='dtoolconfig_dtoolconfig.obj')
  1938. CompileC(ipath=IPATH, opts=OPTS, src='pydtool.cxx', obj='dtoolconfig_pydtool.obj')
  1939. CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='libdtoolconfig.dll', obj=[
  1940. 'dtoolconfig_dtoolconfig.obj',
  1941. 'dtoolconfig_pydtool.obj',
  1942. 'interrogatedb_composite1.obj',
  1943. 'interrogatedb_composite2.obj',
  1944. 'dconfig_composite1.obj',
  1945. 'prc_composite1.obj',
  1946. 'prc_composite2.obj',
  1947. 'libdtool.dll',
  1948. ])
  1949. #
  1950. # DIRECTORY: dtool/src/pystub/
  1951. #
  1952. IPATH=['dtool/src/pystub']
  1953. OPTS=['BUILDING_DTOOLCONFIG', 'NSPR']
  1954. CompileC(ipath=IPATH, opts=OPTS, src='pystub.cxx', obj='pystub_pystub.obj')
  1955. CompileLink(opts=['ADVAPI', 'NSPR'], dll='libpystub.dll', obj=[
  1956. 'pystub_pystub.obj',
  1957. 'libdtool.dll',
  1958. ])
  1959. #
  1960. # DIRECTORY: dtool/src/interrogate/
  1961. #
  1962. IPATH=['dtool/src/interrogate', 'dtool/src/cppparser', 'dtool/src/interrogatedb']
  1963. OPTS=['NSPR']
  1964. CompileC(ipath=IPATH, opts=OPTS, src='interrogate_composite1.cxx', obj='interrogate_composite1.obj')
  1965. CompileC(ipath=IPATH, opts=OPTS, src='interrogate_composite2.cxx', obj='interrogate_composite2.obj')
  1966. CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='interrogate.exe', obj=[
  1967. 'interrogate_composite1.obj',
  1968. 'interrogate_composite2.obj',
  1969. 'libcppParser.ilb',
  1970. 'libpystub.dll',
  1971. 'libdtoolconfig.dll',
  1972. 'libdtool.dll',
  1973. ])
  1974. CompileC(ipath=IPATH, opts=OPTS, src='interrogate_module.cxx', obj='interrogate_module_interrogate_module.obj')
  1975. CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='interrogate_module.exe', obj=[
  1976. 'interrogate_module_interrogate_module.obj',
  1977. 'libcppParser.ilb',
  1978. 'libpystub.dll',
  1979. 'libdtoolconfig.dll',
  1980. 'libdtool.dll',
  1981. ])
  1982. CompileC(ipath=IPATH, opts=OPTS, src='parse_file.cxx', obj='parse_file_parse_file.obj')
  1983. CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='parse_file.exe', obj=[
  1984. 'parse_file_parse_file.obj',
  1985. 'libcppParser.ilb',
  1986. 'libpystub.dll',
  1987. 'libdtoolconfig.dll',
  1988. 'libdtool.dll',
  1989. ])
  1990. #
  1991. # DIRECTORY: dtool/src/prckeys/
  1992. #
  1993. if (OMIT.count("SSL")==0):
  1994. IPATH=['dtool/src/prckeys']
  1995. OPTS=['SSL', 'NSPR']
  1996. CompileC(ipath=IPATH, opts=OPTS, src='makePrcKey.cxx', obj='make-prc-key_makePrcKey.obj')
  1997. CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='make-prc-key.exe', obj=[
  1998. 'make-prc-key_makePrcKey.obj',
  1999. 'libpystub.dll',
  2000. 'libdtool.dll',
  2001. 'libdtoolconfig.dll',
  2002. ])
  2003. #
  2004. # DIRECTORY: dtool/src/test_interrogate/
  2005. #
  2006. IPATH=['dtool/src/test_interrogate']
  2007. OPTS=['NSPR']
  2008. CompileC(ipath=IPATH, opts=OPTS, src='test_interrogate.cxx', obj='test_interrogate_test_interrogate.obj')
  2009. CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='test_interrogate.exe', obj=[
  2010. 'test_interrogate_test_interrogate.obj',
  2011. 'libpystub.dll',
  2012. 'libdtoolconfig.dll',
  2013. 'libdtool.dll',
  2014. ])
  2015. #
  2016. # DIRECTORY: panda/src/pandabase/
  2017. #
  2018. IPATH=['panda/src/pandabase']
  2019. OPTS=['BUILDING_PANDAEXPRESS', 'NSPR']
  2020. CompileC(ipath=IPATH, opts=OPTS, src='pandabase.cxx', obj='pandabase_pandabase.obj')
  2021. #
  2022. # DIRECTORY: panda/src/express/
  2023. #
  2024. IPATH=['panda/src/express']
  2025. OPTS=['BUILDING_PANDAEXPRESS', 'SSL', 'ZLIB', 'NSPR']
  2026. CompileC(ipath=IPATH, opts=OPTS, src='express_composite1.cxx', obj='express_composite1.obj')
  2027. CompileC(ipath=IPATH, opts=OPTS, src='express_composite2.cxx', obj='express_composite2.obj')
  2028. Interrogate(ipath=IPATH, opts=OPTS, outd='libexpress.in', outc='libexpress_igate.cxx',
  2029. src='panda/src/express', module='pandaexpress', library='libexpress',
  2030. files=['atomicAdjustDummyImpl.h', 'atomicAdjust.h', 'atomicAdjustImpl.h', 'atomicAdjustNsprImpl.h', 'bigEndian.h', 'buffer.h', 'checksumHashGenerator.h', 'circBuffer.h', 'clockObject.h', 'conditionVarDummyImpl.h', 'conditionVar.h', 'conditionVarImpl.h', 'conditionVarNsprImpl.h', 'config_express.h', 'datagram.h', 'datagramGenerator.h', 'datagramIterator.h', 'datagramSink.h', 'dcast.h', 'encryptStreamBuf.h', 'encryptStream.h', 'error_utils.h', 'hashGeneratorBase.h', 'hashVal.h', 'indent.h', 'indirectLess.h', 'littleEndian.h', 'memoryInfo.h', 'memoryUsage.h', 'memoryUsagePointerCounts.h', 'memoryUsagePointers.h', 'multifile.h', 'mutexDummyImpl.h', 'pmutex.h', 'mutexHolder.h', 'mutexImpl.h', 'mutexNsprImpl.h', 'namable.h', 'nativeNumericData.h', 'numeric_types.h', 'ordered_vector.h', 'password_hash.h', 'patchfile.h', 'pointerTo.h', 'pointerToArray.h', 'pointerToBase.h', 'pointerToVoid.h', 'profileTimer.h', 'pta_uchar.h', 'ramfile.h', 'referenceCount.h', 'register_type.h', 'reversedNumericData.h', 'selectThreadImpl.h', 'streamReader.h', 'streamWriter.h', 'stringDecoder.h', 'subStream.h', 'subStreamBuf.h', 'textEncoder.h', 'threadDummyImpl.h', 'thread.h', 'threadImpl.h', 'threadNsprImpl.h', 'threadPriority.h', 'tokenBoard.h', 'trueClock.h', 'typeHandle.h', 'typedObject.h', 'typedReferenceCount.h', 'typedef.h', 'typeRegistry.h', 'typeRegistryNode.h', 'unicodeLatinMap.h', 'vector_uchar.h', 'virtualFileComposite.h', 'virtualFile.h', 'virtualFileList.h', 'virtualFileMount.h', 'virtualFileMountMultifile.h', 'virtualFileMountSystem.h', 'virtualFileSimple.h', 'virtualFileSystem.h', 'weakPointerTo.h', 'weakPointerToBase.h', 'weakPointerToVoid.h', 'weakReferenceList.h', 'windowsRegistry.h', 'zStream.h', 'zStreamBuf.h', 'express_composite1.cxx', 'express_composite2.cxx'])
  2031. CompileC(ipath=IPATH, opts=OPTS, src='libexpress_igate.cxx', obj='libexpress_igate.obj')
  2032. #
  2033. # DIRECTORY: panda/src/downloader/
  2034. #
  2035. IPATH=['panda/src/downloader']
  2036. OPTS=['BUILDING_PANDAEXPRESS', 'SSL', 'ZLIB', 'NSPR']
  2037. CompileC(ipath=IPATH, opts=OPTS, src='downloader_composite1.cxx', obj='downloader_composite1.obj')
  2038. CompileC(ipath=IPATH, opts=OPTS, src='downloader_composite2.cxx', obj='downloader_composite2.obj')
  2039. Interrogate(ipath=IPATH, opts=OPTS, outd='libdownloader.in', outc='libdownloader_igate.cxx',
  2040. src='panda/src/downloader', module='pandaexpress', library='libdownloader', files=[
  2041. 'config_downloader.h', 'asyncUtility.h', 'bioPtr.h', 'bioStreamPtr.h', 'bioStream.h', 'bioStreamBuf.h',
  2042. 'chunkedStream.h', 'chunkedStreamBuf.h', 'decompressor.h', 'documentSpec.h', 'downloadDb.h',
  2043. 'download_utils.h', 'extractor.h', 'httpAuthorization.h', 'httpBasicAuthorization.h', 'httpChannel.h',
  2044. 'httpClient.h', 'httpCookie.h', 'httpDate.h', 'httpDigestAuthorization.h', 'httpEntityTag.h',
  2045. 'httpEnum.h', 'identityStream.h', 'identityStreamBuf.h', 'multiplexStream.h', 'multiplexStreamBuf.h',
  2046. 'patcher.h', 'socketStream.h', 'ssl_utils.h', 'urlSpec.h',
  2047. 'downloader_composite1.cxx', 'downloader_composite2.cxx'])
  2048. CompileC(ipath=IPATH, opts=OPTS, src='libdownloader_igate.cxx', obj='libdownloader_igate.obj')
  2049. #
  2050. # DIRECTORY: panda/metalibs/pandaexpress/
  2051. #
  2052. IPATH=['panda/metalibs/pandaexpress']
  2053. OPTS=['BUILDING_PANDAEXPRESS', 'ZLIB', 'NSPR']
  2054. CompileC(ipath=IPATH, opts=OPTS, src='pandaexpress.cxx', obj='pandaexpress_pandaexpress.obj')
  2055. InterrogateModule(outc='libpandaexpress_module.cxx', module='pandaexpress', library='libpandaexpress',
  2056. files=['libdownloader.in', 'libexpress.in'])
  2057. CompileC(ipath=IPATH, opts=OPTS, src='libpandaexpress_module.cxx', obj='libpandaexpress_module.obj')
  2058. CompileLink(opts=['ADVAPI', 'WINSOCK2', 'NSPR', 'SSL', 'ZLIB'], dll='libpandaexpress.dll', obj=[
  2059. 'pandaexpress_pandaexpress.obj',
  2060. 'libpandaexpress_module.obj',
  2061. 'downloader_composite1.obj',
  2062. 'downloader_composite2.obj',
  2063. 'libdownloader_igate.obj',
  2064. 'express_composite1.obj',
  2065. 'express_composite2.obj',
  2066. 'libexpress_igate.obj',
  2067. 'pandabase_pandabase.obj',
  2068. 'libdtoolconfig.dll',
  2069. 'libdtool.dll',
  2070. ])
  2071. #
  2072. # DIRECTORY: panda/src/putil/
  2073. #
  2074. IPATH=['panda/src/putil']
  2075. OPTS=['BUILDING_PANDA', 'NSPR']
  2076. CompileC(ipath=IPATH, opts=OPTS, src='putil_composite1.cxx', obj='putil_composite1.obj')
  2077. CompileC(ipath=IPATH, opts=OPTS, src='putil_composite2.cxx', obj='putil_composite2.obj')
  2078. Interrogate(ipath=IPATH, opts=OPTS, outd='libputil.in', outc='libputil_igate.cxx',
  2079. src='panda/src/putil', module='panda', library='libputil', files=[
  2080. 'bam.h', 'bamReader.h', 'bamReaderParam.h', 'bamWriter.h', 'bitMask.h', 'buttonHandle.h',
  2081. 'buttonRegistry.h', 'cachedTypedWritableReferenceCount.h', 'collideMask.h', 'portalMask.h',
  2082. 'compareTo.h', 'config_util.h', 'configurable.h', 'cycleData.h', 'cycleDataReader.h',
  2083. 'cycleDataWriter.h', 'datagramInputFile.h', 'datagramOutputFile.h', 'drawMask.h', 'factoryBase.h',
  2084. 'factoryParam.h', 'factoryParams.h', 'firstOfPairCompare.h', 'firstOfPairLess.h',
  2085. 'globalPointerRegistry.h', 'indirectCompareNames.h', 'indirectCompareTo.h', 'ioPtaDatagramFloat.h',
  2086. 'ioPtaDatagramInt.h', 'ioPtaDatagramShort.h', 'keyboardButton.h', 'lineStream.h', 'lineStreamBuf.h',
  2087. 'load_prc_file.h', 'modifierButtons.h', 'mouseButton.h', 'mouseData.h', 'nameUniquifier.h',
  2088. 'pipeline.h', 'pipelineCycler.h', 'pipelineCyclerBase.h', 'pta_double.h', 'pta_float.h',
  2089. 'pta_int.h', 'string_utils.h', 'timedCycle.h', 'typedWritable.h', 'typedWritableReferenceCount.h',
  2090. 'updateSeq.h', 'uniqueIdAllocator.h', 'vector_double.h', 'vector_float.h', 'vector_typedWritable.h',
  2091. 'vector_ushort.h', 'vector_writable.h', 'writableConfigurable.h', 'writableParam.h',
  2092. 'putil_composite1.cxx', 'putil_composite2.cxx'])
  2093. CompileC(ipath=IPATH, opts=OPTS, src='libputil_igate.cxx', obj='libputil_igate.obj')
  2094. #
  2095. # DIRECTORY: panda/src/audio/
  2096. #
  2097. IPATH=['panda/src/audio']
  2098. OPTS=['BUILDING_PANDA', 'NSPR']
  2099. CompileC(ipath=IPATH, opts=OPTS, src='audio_composite1.cxx', obj='audio_composite1.obj')
  2100. Interrogate(ipath=IPATH, opts=OPTS, outd='libaudio.in', outc='libaudio_igate.cxx',
  2101. src='panda/src/audio', module='panda', library='libaudio',
  2102. files=['audio.h'])
  2103. CompileC(ipath=IPATH, opts=OPTS, src='libaudio_igate.cxx', obj='libaudio_igate.obj')
  2104. #
  2105. # DIRECTORY: panda/src/event/
  2106. #
  2107. IPATH=['panda/src/event']
  2108. OPTS=['BUILDING_PANDA', 'NSPR']
  2109. CompileC(ipath=IPATH, opts=OPTS, src='event_composite1.cxx', obj='event_composite1.obj')
  2110. Interrogate(ipath=IPATH, opts=OPTS, outd='libevent.in', outc='libevent_igate.cxx',
  2111. src='panda/src/event', module='panda', library='libevent', files=[
  2112. 'config_event.h', 'buttonEvent.h', 'buttonEventList.h', 'event.h', 'eventHandler.h',
  2113. 'eventParameter.h', 'eventQueue.h', 'eventReceiver.h', 'pt_Event.h', 'throw_event.h', 'event_composite1.cxx'])
  2114. CompileC(ipath=IPATH, opts=OPTS, src='libevent_igate.cxx', obj='libevent_igate.obj')
  2115. #
  2116. # DIRECTORY: panda/src/linmath/
  2117. #
  2118. IPATH=['panda/src/linmath']
  2119. OPTS=['BUILDING_PANDA', 'NSPR']
  2120. CompileC(ipath=IPATH, opts=OPTS, src='linmath_composite1.cxx', obj='linmath_composite1.obj')
  2121. CompileC(ipath=IPATH, opts=OPTS, src='linmath_composite2.cxx', obj='linmath_composite2.obj')
  2122. Interrogate(ipath=IPATH, opts=OPTS, outd='liblinmath.in', outc='liblinmath_igate.cxx',
  2123. src='panda/src/linmath', module='panda', library='liblinmath', files=[
  2124. 'compose_matrix.h', 'compose_matrix_src.h', 'config_linmath.h', 'coordinateSystem.h', 'dbl2fltnames.h', 'dblnames.h', 'deg_2_rad.h', 'flt2dblnames.h', 'fltnames.h', 'ioPtaDatagramLinMath.h', 'lcast_to.h', 'lcast_to_src.h', 'lmatrix.h', 'lmatrix3.h', 'lmatrix3_src.h', 'lmatrix4.h', 'lmatrix4_src.h', 'lorientation.h', 'lorientation_src.h', 'lpoint2.h', 'lpoint2_src.h', 'lpoint3.h', 'lpoint3_src.h', 'lpoint4.h', 'lpoint4_src.h', 'lquaternion.h', 'lquaternion_src.h', 'lrotation.h', 'lrotation_src.h', 'luse.h', 'lvec2_ops.h', 'lvec2_ops_src.h', 'lvec3_ops.h', 'lvec3_ops_src.h', 'lvec4_ops.h', 'lvec4_ops_src.h', 'lvecBase2.h', 'lvecBase2_src.h', 'lvecBase3.h', 'lvecBase3_src.h', 'lvecBase4.h', 'lvecBase4_src.h', 'lvector2.h', 'lvector2_src.h', 'lvector3.h', 'lvector3_src.h', 'lvector4.h', 'lvector4_src.h', 'mathNumbers.h', 'pta_Colorf.h', 'pta_Normalf.h', 'pta_TexCoordf.h', 'pta_Vertexf.h', 'vector_Colorf.h', 'vector_LPoint2f.h', 'vector_LVecBase3f.h', 'vector_Normalf.h', 'vector_TexCoordf.h', 'vector_Vertexf.h', 'linmath_composite1.cxx', 'linmath_composite2.cxx'])
  2125. CompileC(ipath=IPATH, opts=OPTS, src='liblinmath_igate.cxx', obj='liblinmath_igate.obj')
  2126. #
  2127. # DIRECTORY: panda/src/mathutil/
  2128. #
  2129. IPATH=['panda/src/mathutil']
  2130. OPTS=['BUILDING_PANDA', 'FFTW', 'NSPR']
  2131. CompileC(ipath=IPATH, opts=OPTS, src='mathutil_composite1.cxx', obj='mathutil_composite1.obj')
  2132. CompileC(ipath=IPATH, opts=OPTS, src='mathutil_composite2.cxx', obj='mathutil_composite2.obj')
  2133. Interrogate(ipath=IPATH, opts=OPTS, outd='libmathutil.in', outc='libmathutil_igate.cxx',
  2134. src='panda/src/mathutil', module='panda', library='libmathutil', files=[
  2135. 'boundingHexahedron.h', 'boundingLine.h', 'boundingSphere.h', 'boundingVolume.h', 'config_mathutil.h', 'fftCompressor.h', 'finiteBoundingVolume.h', 'frustum.h', 'frustum_src.h', 'geometricBoundingVolume.h', 'linmath_events.h', 'look_at.h', 'look_at_src.h', 'omniBoundingVolume.h', 'plane.h', 'plane_src.h', 'rotate_to.h', 'mathutil_composite1.cxx', 'mathutil_composite2.cxx'])
  2136. CompileC(ipath=IPATH, opts=OPTS, src='libmathutil_igate.cxx', obj='libmathutil_igate.obj')
  2137. #
  2138. # DIRECTORY: panda/src/gsgbase/
  2139. #
  2140. IPATH=['panda/src/gsgbase']
  2141. OPTS=['BUILDING_PANDA', 'NSPR']
  2142. CompileC(ipath=IPATH, opts=OPTS, src='gsgbase_composite1.cxx', obj='gsgbase_composite1.obj')
  2143. Interrogate(ipath=IPATH, opts=OPTS, outd='libgsgbase.in', outc='libgsgbase_igate.cxx',
  2144. src='panda/src/gsgbase', module='panda', library='libgsgbase', files=[
  2145. 'config_gsgbase.h', 'graphicsStateGuardianBase.h', 'gsgbase_composite1.cxx'])
  2146. CompileC(ipath=IPATH, opts=OPTS, src='libgsgbase_igate.cxx', obj='libgsgbase_igate.obj')
  2147. #
  2148. # DIRECTORY: panda/src/pnmimage/
  2149. #
  2150. IPATH=['panda/src/pnmimage']
  2151. OPTS=['BUILDING_PANDA', 'NSPR']
  2152. CompileC(ipath=IPATH, opts=OPTS, src='pnmimage_composite1.cxx', obj='pnmimage_composite1.obj')
  2153. CompileC(ipath=IPATH, opts=OPTS, src='pnmimage_composite2.cxx', obj='pnmimage_composite2.obj')
  2154. Interrogate(ipath=IPATH, opts=OPTS, outd='libpnmimage.in', outc='libpnmimage_igate.cxx',
  2155. src='panda/src/pnmimage', module='panda', library='libpnmimage', files=[
  2156. 'config_pnmimage.h', 'pnmbitio.h', 'pnmFileType.h', 'pnmFileTypeRegistry.h', 'pnmImage.h', 'pnmImageHeader.h', 'pnmReader.h', 'pnmWriter.h', 'pnmimage_base.h', 'ppmcmap.h', 'pnmimage_composite1.cxx', 'pnmimage_composite2.cxx'])
  2157. CompileC(ipath=IPATH, opts=OPTS, src='libpnmimage_igate.cxx', obj='libpnmimage_igate.obj')
  2158. #
  2159. # DIRECTORY: panda/src/net/
  2160. #
  2161. if (OMIT.count("NSPR")==0):
  2162. IPATH=['panda/src/net']
  2163. OPTS=['BUILDING_PANDA', 'NSPR']
  2164. CompileC(ipath=IPATH, opts=OPTS, src='net_composite1.cxx', obj='net_composite1.obj')
  2165. CompileC(ipath=IPATH, opts=OPTS, src='net_composite2.cxx', obj='net_composite2.obj')
  2166. Interrogate(ipath=IPATH, opts=OPTS, outd='libnet.in', outc='libnet_igate.cxx',
  2167. src='panda/src/net', module='panda', library='libnet', files=[
  2168. 'config_net.h', 'connection.h', 'connectionListener.h', 'connectionManager.h',
  2169. 'connectionReader.h', 'connectionWriter.h', 'datagramQueue.h', 'datagramTCPHeader.h',
  2170. 'datagramUDPHeader.h', 'netAddress.h', 'netDatagram.h', 'pprerror.h', 'queuedConnectionListener.h',
  2171. 'queuedConnectionManager.h', 'queuedConnectionReader.h', 'recentConnectionReader.h',
  2172. 'queuedReturn.h', 'net_composite1.cxx', 'net_composite2.cxx'])
  2173. CompileC(ipath=IPATH, opts=OPTS, src='libnet_igate.cxx', obj='libnet_igate.obj')
  2174. #
  2175. # DIRECTORY: panda/src/pstatclient/
  2176. #
  2177. IPATH=['panda/src/pstatclient']
  2178. OPTS=['BUILDING_PANDA', 'NSPR']
  2179. CompileC(ipath=IPATH, opts=OPTS, src='pstatclient_composite1.cxx', obj='pstatclient_composite1.obj')
  2180. CompileC(ipath=IPATH, opts=OPTS, src='pstatclient_composite2.cxx', obj='pstatclient_composite2.obj')
  2181. Interrogate(ipath=IPATH, opts=OPTS, outd='libpstatclient.in', outc='libpstatclient_igate.cxx',
  2182. src='panda/src/pstatclient', module='panda', library='libpstatclient', files=[
  2183. 'config_pstats.h', 'pStatClient.h', 'pStatClientImpl.h', 'pStatClientVersion.h', 'pStatClientControlMessage.h', 'pStatCollector.h', 'pStatCollectorDef.h', 'pStatFrameData.h', 'pStatProperties.h', 'pStatServerControlMessage.h', 'pStatThread.h', 'pStatTimer.h', 'pstatclient_composite1.cxx', 'pstatclient_composite2.cxx'])
  2184. CompileC(ipath=IPATH, opts=OPTS, src='libpstatclient_igate.cxx', obj='libpstatclient_igate.obj')
  2185. #
  2186. # DIRECTORY: panda/src/gobj/
  2187. #
  2188. IPATH=['panda/src/gobj']
  2189. OPTS=['BUILDING_PANDA', 'NSPR']
  2190. CompileC(ipath=IPATH, opts=OPTS, src='gobj_composite1.cxx', obj='gobj_composite1.obj')
  2191. CompileC(ipath=IPATH, opts=OPTS, src='gobj_composite2.cxx', obj='gobj_composite2.obj')
  2192. Interrogate(ipath=IPATH, opts=OPTS, outd='libgobj.in', outc='libgobj_igate.cxx',
  2193. src='panda/src/gobj', module='panda', library='libgobj', files=[
  2194. 'boundedObject.h', 'config_gobj.h', 'drawable.h', 'geom.h',
  2195. 'geomContext.h', 'geomLine.h', 'geomLinestrip.h', 'geomPoint.h',
  2196. 'geomPolygon.h', 'geomQuad.h', 'geomSphere.h', 'geomSprite.h',
  2197. 'geomTri.h', 'geomTrifan.h', 'geomTristrip.h', 'imageBuffer.h',
  2198. 'material.h', 'materialPool.h', 'matrixLens.h', 'orthographicLens.h',
  2199. 'perspectiveLens.h', 'pixelBuffer.h', 'preparedGraphicsObjects.h',
  2200. 'lens.h', 'savedContext.h', 'texture.h', 'textureContext.h',
  2201. 'texturePool.h', 'texCoordName.h', 'textureStage.h',
  2202. 'gobj_composite1.cxx', 'gobj_composite2.cxx'])
  2203. CompileC(ipath=IPATH, opts=OPTS, src='libgobj_igate.cxx', obj='libgobj_igate.obj')
  2204. #
  2205. # DIRECTORY: panda/src/lerp/
  2206. #
  2207. IPATH=['panda/src/lerp']
  2208. OPTS=['BUILDING_PANDA', 'NSPR']
  2209. CompileC(ipath=IPATH, opts=OPTS, src='lerp_composite1.cxx', obj='lerp_composite1.obj')
  2210. Interrogate(ipath=IPATH, opts=OPTS, outd='liblerp.in', outc='liblerp_igate.cxx',
  2211. src='panda/src/lerp', module='panda', library='liblerp', files=[
  2212. 'config_lerp.h', 'lerp.h', 'lerpblend.h', 'lerpfunctor.h', 'lerp_composite1.cxx'])
  2213. CompileC(ipath=IPATH, opts=OPTS, src='liblerp_igate.cxx', obj='liblerp_igate.obj')
  2214. #
  2215. # DIRECTORY: panda/src/pgraph/
  2216. #
  2217. IPATH=['panda/src/pgraph']
  2218. OPTS=['BUILDING_PANDA', 'NSPR']
  2219. CompileC(ipath=IPATH, opts=OPTS, src='nodePath.cxx', obj='pgraph_nodePath.obj')
  2220. CompileC(ipath=IPATH, opts=OPTS, src='pgraph_composite1.cxx', obj='pgraph_composite1.obj')
  2221. CompileC(ipath=IPATH, opts=OPTS, src='pgraph_composite2.cxx', obj='pgraph_composite2.obj')
  2222. Interrogate(ipath=IPATH, opts=OPTS, outd='libpgraph.in', outc='libpgraph_igate.cxx',
  2223. src='panda/src/pgraph', module='panda', library='libpgraph', files=[
  2224. 'accumulatedAttribs.h', 'alphaTestAttrib.h', 'ambientLight.h', 'auxSceneData.h', 'bamFile.h', 'billboardEffect.h', 'binCullHandler.h', 'camera.h', 'clipPlaneAttrib.h', 'colorAttrib.h', 'colorBlendAttrib.h', 'colorScaleAttrib.h', 'colorWriteAttrib.h', 'compassEffect.h', 'config_pgraph.h', 'cullBin.h', 'cullBinAttrib.h', 'cullBinBackToFront.h', 'cullBinFixed.h', 'cullBinFrontToBack.h', 'cullBinManager.h', 'cullBinUnsorted.h', 'cullFaceAttrib.h', 'cullHandler.h', 'cullResult.h', 'cullTraverser.h', 'cullTraverserData.h', 'cullableObject.h', 'decalEffect.h', 'depthOffsetAttrib.h', 'depthTestAttrib.h', 'depthWriteAttrib.h', 'directionalLight.h', 'drawCullHandler.h', 'fadeLodNode.h', 'fadeLodNodeData.h', 'findApproxLevelEntry.h', 'findApproxPath.h', 'fog.h', 'fogAttrib.h', 'geomNode.h', 'geomTransformer.h', 'lensNode.h', 'light.h', 'lightAttrib.h', 'lightLensNode.h', 'lightNode.h', 'loader.h', 'loaderFileType.h', 'loaderFileTypeBam.h', 'loaderFileTypeRegistry.h', 'lodNode.h', 'materialAttrib.h', 'modelNode.h', 'modelPool.h', 'modelRoot.h', 'nodePath.h', 'nodePath.cxx', 'nodePathCollection.h', 'nodePathComponent.h', 'nodePathLerps.h', 'pandaNode.h', 'planeNode.h', 'pointLight.h', 'polylightNode.h', 'polylightEffect.h', 'portalNode.h', 'portalClipper.h', 'renderAttrib.h', 'renderEffect.h', 'renderEffects.h', 'renderModeAttrib.h', 'renderState.h', 'rescaleNormalAttrib.h', 'sceneGraphAnalyzer.h', 'sceneGraphReducer.h', 'sceneSetup.h', 'selectiveChildNode.h', 'sequenceNode.h', 'showBoundsEffect.h', 'spotlight.h', 'switchNode.h', 'texMatrixAttrib.h', 'texProjectorEffect.h', 'textureApplyAttrib.h', 'textureAttrib.h', 'texGenAttrib.h', 'textureCollection.h', 'textureStageCollection.h', 'transformState.h', 'transparencyAttrib.h', 'weakNodePath.h', 'workingNodePath.h', 'pgraph_composite1.cxx', 'pgraph_composite2.cxx'])
  2225. CompileC(ipath=IPATH, opts=OPTS, src='libpgraph_igate.cxx', obj='libpgraph_igate.obj')
  2226. #
  2227. # DIRECTORY: panda/src/chan/
  2228. #
  2229. IPATH=['panda/src/chan']
  2230. OPTS=['BUILDING_PANDA', 'NSPR']
  2231. CompileC(ipath=IPATH, opts=OPTS, src='chan_composite1.cxx', obj='chan_composite1.obj')
  2232. CompileC(ipath=IPATH, opts=OPTS, src='chan_composite2.cxx', obj='chan_composite2.obj')
  2233. Interrogate(ipath=IPATH, opts=OPTS, outd='libchan.in', outc='libchan_igate.cxx',
  2234. src='panda/src/chan', module='panda', library='libchan', files=[
  2235. 'animBundle.h', 'animBundleNode.h', 'animChannel.h', 'animChannelBase.h', 'animChannelMatrixDynamic.h', 'animChannelMatrixXfmTable.h', 'animChannelScalarDynamic.h', 'animChannelScalarTable.h', 'animControl.h', 'animControlCollection.h', 'animGroup.h', 'auto_bind.h', 'config_chan.h', 'movingPartBase.h', 'movingPartMatrix.h', 'movingPartScalar.h', 'partBundle.h', 'partBundleNode.h', 'partGroup.h', 'vector_PartGroupStar.h', 'chan_composite1.cxx', 'chan_composite2.cxx'])
  2236. CompileC(ipath=IPATH, opts=OPTS, src='libchan_igate.cxx', obj='libchan_igate.obj')
  2237. #
  2238. # DIRECTORY: panda/src/char/
  2239. #
  2240. IPATH=['panda/src/char']
  2241. OPTS=['BUILDING_PANDA', 'NSPR']
  2242. CompileC(ipath=IPATH, opts=OPTS, src='char_composite1.cxx', obj='char_composite1.obj')
  2243. CompileC(ipath=IPATH, opts=OPTS, src='char_composite2.cxx', obj='char_composite2.obj')
  2244. Interrogate(ipath=IPATH, opts=OPTS, outd='libchar.in', outc='libchar_igate.cxx',
  2245. src='panda/src/char', module='panda', library='libchar', files=[
  2246. 'character.h', 'characterJoint.h', 'characterJointBundle.h', 'characterSlider.h', 'computedVertices.h', 'computedVerticesMorph.h', 'config_char.h', 'dynamicVertices.h', 'char_composite1.cxx', 'char_composite2.cxx'])
  2247. CompileC(ipath=IPATH, opts=OPTS, src='libchar_igate.cxx', obj='libchar_igate.obj')
  2248. #
  2249. # DIRECTORY: panda/src/dgraph/
  2250. #
  2251. IPATH=['panda/src/dgraph']
  2252. OPTS=['BUILDING_PANDA', 'NSPR']
  2253. CompileC(ipath=IPATH, opts=OPTS, src='dgraph_composite1.cxx', obj='dgraph_composite1.obj')
  2254. CompileC(ipath=IPATH, opts=OPTS, src='dgraph_composite2.cxx', obj='dgraph_composite2.obj')
  2255. Interrogate(ipath=IPATH, opts=OPTS, outd='libdgraph.in', outc='libdgraph_igate.cxx',
  2256. src='panda/src/dgraph', module='panda', library='libdgraph', files=[
  2257. 'config_dgraph.h', 'dataGraphTraverser.h', 'dataNode.h', 'dataNodeTransmit.h', 'dgraph_composite1.cxx', 'dgraph_composite2.cxx'])
  2258. CompileC(ipath=IPATH, opts=OPTS, src='libdgraph_igate.cxx', obj='libdgraph_igate.obj')
  2259. #
  2260. # DIRECTORY: panda/src/display/
  2261. #
  2262. IPATH=['panda/src/display']
  2263. OPTS=['BUILDING_PANDA', 'NSPR']
  2264. CompileC(ipath=IPATH, opts=OPTS, src='display_composite1.cxx', obj='display_composite1.obj')
  2265. CompileC(ipath=IPATH, opts=OPTS, src='display_composite2.cxx', obj='display_composite2.obj')
  2266. Interrogate(ipath=IPATH, opts=OPTS, outd='libdisplay.in', outc='libdisplay_igate.cxx',
  2267. src='panda/src/display', module='panda', library='libdisplay', files=[
  2268. 'config_display.h', 'drawableRegion.h', 'displayRegion.h', 'displayRegionStack.h', 'frameBufferProperties.h', 'frameBufferStack.h', 'graphicsEngine.h', 'graphicsOutput.h', 'graphicsBuffer.h', 'graphicsPipe.h', 'graphicsPipeSelection.h', 'graphicsStateGuardian.h', 'graphicsThreadingModel.h', 'graphicsWindow.h', 'graphicsWindowInputDevice.h', 'graphicsDevice.h', 'parasiteBuffer.h', 'windowProperties.h', 'lensStack.h', 'savedFrameBuffer.h', 'display_composite1.cxx', 'display_composite2.cxx'])
  2269. CompileC(ipath=IPATH, opts=OPTS, src='libdisplay_igate.cxx', obj='libdisplay_igate.obj')
  2270. #
  2271. # DIRECTORY: panda/src/device/
  2272. #
  2273. IPATH=['panda/src/device']
  2274. OPTS=['BUILDING_PANDA', 'NSPR']
  2275. CompileC(ipath=IPATH, opts=OPTS, src='device_composite1.cxx', obj='device_composite1.obj')
  2276. CompileC(ipath=IPATH, opts=OPTS, src='device_composite2.cxx', obj='device_composite2.obj')
  2277. Interrogate(ipath=IPATH, opts=OPTS, outd='libdevice.in', outc='libdevice_igate.cxx',
  2278. src='panda/src/device', module='panda', library='libdevice', files=[
  2279. 'analogNode.h', 'buttonNode.h', 'clientAnalogDevice.h', 'clientBase.h', 'clientButtonDevice.h', 'clientDevice.h', 'clientDialDevice.h', 'clientTrackerDevice.h', 'config_device.h', 'dialNode.h', 'mouseAndKeyboard.h', 'trackerData.h', 'trackerNode.h', 'virtualMouse.h', 'device_composite1.cxx', 'device_composite2.cxx'])
  2280. CompileC(ipath=IPATH, opts=OPTS, src='libdevice_igate.cxx', obj='libdevice_igate.obj')
  2281. #
  2282. # DIRECTORY: panda/src/tform/
  2283. #
  2284. IPATH=['panda/src/tform']
  2285. OPTS=['BUILDING_PANDA', 'NSPR']
  2286. CompileC(ipath=IPATH, opts=OPTS, src='tform_composite1.cxx', obj='tform_composite1.obj')
  2287. CompileC(ipath=IPATH, opts=OPTS, src='tform_composite2.cxx', obj='tform_composite2.obj')
  2288. Interrogate(ipath=IPATH, opts=OPTS, outd='libtform.in', outc='libtform_igate.cxx',
  2289. src='panda/src/tform', module='panda', library='libtform', files=[
  2290. 'buttonThrower.h', 'config_tform.h', 'driveInterface.h', 'mouseInterfaceNode.h', 'mouseWatcher.h', 'mouseWatcherGroup.h', 'mouseWatcherParameter.h', 'mouseWatcherRegion.h', 'trackball.h', 'transform2sg.h', 'tform_composite1.cxx', 'tform_composite2.cxx'])
  2291. CompileC(ipath=IPATH, opts=OPTS, src='libtform_igate.cxx', obj='libtform_igate.obj')
  2292. #
  2293. # DIRECTORY: panda/src/collide/
  2294. #
  2295. IPATH=['panda/src/collide']
  2296. OPTS=['BUILDING_PANDA', 'NSPR']
  2297. CompileC(ipath=IPATH, opts=OPTS, src='collide_composite1.cxx', obj='collide_composite1.obj')
  2298. CompileC(ipath=IPATH, opts=OPTS, src='collide_composite2.cxx', obj='collide_composite2.obj')
  2299. Interrogate(ipath=IPATH, opts=OPTS, outd='libcollide.in', outc='libcollide_igate.cxx',
  2300. src='panda/src/collide', module='panda', library='libcollide', files=[
  2301. 'collisionEntry.h', 'collisionHandler.h', 'collisionHandlerEvent.h', 'collisionHandlerFloor.h', 'collisionHandlerGravity.h', 'collisionHandlerPhysical.h', 'collisionHandlerPusher.h', 'collisionHandlerQueue.h', 'collisionInvSphere.h', 'collisionLine.h', 'collisionLevelState.h', 'collisionNode.h', 'collisionPlane.h', 'collisionPolygon.h', 'collisionRay.h', 'collisionRecorder.h', 'collisionSegment.h', 'collisionSolid.h', 'collisionSphere.h', 'collisionTraverser.h', 'collisionTube.h', 'collisionVisualizer.h', 'config_collide.h', 'collide_composite1.cxx', 'collide_composite2.cxx'])
  2302. CompileC(ipath=IPATH, opts=OPTS, src='libcollide_igate.cxx', obj='libcollide_igate.obj')
  2303. #
  2304. # DIRECTORY: panda/src/pnmtext/
  2305. #
  2306. if (OMIT.count("FREETYPE")==0):
  2307. IPATH=['panda/src/pnmtext']
  2308. OPTS=['BUILDING_PANDA', 'NSPR', 'FREETYPE']
  2309. CompileC(ipath=IPATH, opts=OPTS, src='config_pnmtext.cxx', obj='pnmtext_config_pnmtext.obj')
  2310. CompileC(ipath=IPATH, opts=OPTS, src='freetypeFont.cxx', obj='pnmtext_freetypeFont.obj')
  2311. CompileC(ipath=IPATH, opts=OPTS, src='pnmTextGlyph.cxx', obj='pnmtext_pnmTextGlyph.obj')
  2312. CompileC(ipath=IPATH, opts=OPTS, src='pnmTextMaker.cxx', obj='pnmtext_pnmTextMaker.obj')
  2313. #
  2314. # DIRECTORY: panda/src/text/
  2315. #
  2316. IPATH=['panda/src/text']
  2317. OPTS=['BUILDING_PANDA', 'ZLIB', 'NSPR', 'FREETYPE']
  2318. CompileC(ipath=IPATH, opts=OPTS, src='text_composite1.cxx', obj='text_composite1.obj')
  2319. CompileC(ipath=IPATH, opts=OPTS, src='text_composite2.cxx', obj='text_composite2.obj')
  2320. Interrogate(ipath=IPATH, opts=OPTS, outd='libtext.in', outc='libtext_igate.cxx',
  2321. src='panda/src/text', module='panda', library='libtext', files=[
  2322. 'config_text.h', 'default_font.h', 'dynamicTextFont.h', 'dynamicTextGlyph.h', 'dynamicTextPage.h', 'fontPool.h', 'geomTextGlyph.h', 'staticTextFont.h', 'textAssembler.h', 'textFont.h', 'textGlyph.h', 'textNode.h', 'textProperties.h', 'textPropertiesManager.h', 'text_composite1.cxx', 'text_composite2.cxx'])
  2323. CompileC(ipath=IPATH, opts=OPTS, src='libtext_igate.cxx', obj='libtext_igate.obj')
  2324. #
  2325. # DIRECTORY: panda/src/grutil/
  2326. #
  2327. IPATH=['panda/src/grutil']
  2328. OPTS=['BUILDING_PANDA', 'NSPR']
  2329. CompileC(ipath=IPATH, opts=OPTS, src='multitexReducer.cxx', obj='grutil_multitexReducer.obj')
  2330. CompileC(ipath=IPATH, opts=OPTS, src='grutil_composite1.cxx', obj='grutil_composite1.obj')
  2331. Interrogate(ipath=IPATH, opts=OPTS, outd='libgrutil.in', outc='libgrutil_igate.cxx',
  2332. src='panda/src/grutil', module='panda', library='libgrutil', files=[
  2333. 'cardMaker.h', 'config_grutil.h', 'frameRateMeter.h', 'lineSegs.h', 'multitexReducer.h', 'multitexReducer.cxx', 'grutil_composite1.cxx'])
  2334. CompileC(ipath=IPATH, opts=OPTS, src='libgrutil_igate.cxx', obj='libgrutil_igate.obj')
  2335. #
  2336. # DIRECTORY: panda/src/gsgmisc/
  2337. #
  2338. IPATH=['panda/src/gsgmisc']
  2339. OPTS=['BUILDING_PANDA', 'NSPR']
  2340. CompileC(ipath=IPATH, opts=OPTS, src='geomIssuer.cxx', obj='gsgmisc_geomIssuer.obj')
  2341. #
  2342. # DIRECTORY: panda/src/helix/
  2343. #
  2344. if (OMIT.count("HELIX")==0):
  2345. IPATH=['panda/src/helix']
  2346. OPTS=['BUILDING_PANDA', 'NSPR', 'HELIX']
  2347. CompileC(ipath=IPATH, opts=OPTS, src='config_helix.cxx', obj='helix_config_helix.obj')
  2348. CompileC(ipath=IPATH, opts=OPTS, src='fivemmap.cxx', obj='helix_fivemmap.obj')
  2349. CompileC(ipath=IPATH, opts=OPTS, src='HelixClient.cxx', obj='helix_HelixClient.obj')
  2350. CompileC(ipath=IPATH, opts=OPTS, src='HxAdviseSink.cxx', obj='helix_HxAdviseSink.obj')
  2351. CompileC(ipath=IPATH, opts=OPTS, src='HxAuthenticationManager.cxx', obj='helix_HxAuthenticationManager.obj')
  2352. CompileC(ipath=IPATH, opts=OPTS, src='HxClientContext.cxx', obj='helix_HxClientContext.obj')
  2353. CompileC(ipath=IPATH, opts=OPTS, src='HxErrorSink.cxx', obj='helix_HxErrorSink.obj')
  2354. CompileC(ipath=IPATH, opts=OPTS, src='HxSiteSupplier.cxx', obj='helix_HxSiteSupplier.obj')
  2355. CompileC(ipath=IPATH, opts=OPTS, src='iids.cxx', obj='helix_iids.obj')
  2356. CompileC(ipath=IPATH, opts=OPTS, src='print.cxx', obj='helix_print.obj')
  2357. Interrogate(ipath=IPATH, opts=OPTS, outd='libhelix.in', outc='libhelix_igate.cxx',
  2358. src='panda/src/helix', module='panda', library='libhelix', files=['HelixClient.cxx'])
  2359. CompileC(ipath=IPATH, opts=OPTS, src='libhelix_igate.cxx', obj='libhelix_igate.obj')
  2360. CompileLIB(lib='libhelix.ilb', obj=[
  2361. 'helix_config_helix.obj',
  2362. 'helix_fivemmap.obj',
  2363. 'helix_HelixClient.obj',
  2364. 'helix_HxAdviseSink.obj',
  2365. 'helix_HxAuthenticationManager.obj',
  2366. 'helix_HxClientContext.obj',
  2367. 'helix_HxErrorSink.obj',
  2368. 'helix_HxSiteSupplier.obj',
  2369. 'helix_iids.obj',
  2370. 'helix_print.obj',
  2371. 'libhelix_igate.obj'])
  2372. #
  2373. # DIRECTORY: panda/src/parametrics/
  2374. #
  2375. IPATH=['panda/src/parametrics']
  2376. OPTS=['BUILDING_PANDA', 'NSPR']
  2377. CompileC(ipath=IPATH, opts=OPTS, src='parametrics_composite1.cxx', obj='parametrics_composite1.obj')
  2378. CompileC(ipath=IPATH, opts=OPTS, src='parametrics_composite2.cxx', obj='parametrics_composite2.obj')
  2379. Interrogate(ipath=IPATH, opts=OPTS, outd='libparametrics.in', outc='libparametrics_igate.cxx',
  2380. src='panda/src/parametrics', module='panda', library='libparametrics', files=[
  2381. 'classicNurbsCurve.h', 'config_parametrics.h', 'cubicCurveseg.h', 'parametricCurveDrawer.h',
  2382. 'curveFitter.h', 'hermiteCurve.h', 'nurbsCurve.h', 'nurbsCurveDrawer.h', 'nurbsCurveEvaluator.h',
  2383. 'nurbsCurveInterface.h', 'nurbsCurveResult.h', 'nurbsBasisVector.h', 'nurbsSurfaceEvaluator.h',
  2384. 'nurbsSurfaceResult.h', 'nurbsVertex.h', 'parametricCurve.h', 'parametricCurveCollection.h',
  2385. 'piecewiseCurve.h', 'ropeNode.h', 'sheetNode.h', 'parametrics_composite1.cxx', 'parametrics_composite2.cxx'])
  2386. CompileC(ipath=IPATH, opts=OPTS, src='libparametrics_igate.cxx', obj='libparametrics_igate.obj')
  2387. #
  2388. # DIRECTORY: panda/src/pgui/
  2389. #
  2390. IPATH=['panda/src/pgui']
  2391. OPTS=['BUILDING_PANDA', 'NSPR']
  2392. CompileC(ipath=IPATH, opts=OPTS, src='pgui_composite1.cxx', obj='pgui_composite1.obj')
  2393. CompileC(ipath=IPATH, opts=OPTS, src='pgui_composite2.cxx', obj='pgui_composite2.obj')
  2394. Interrogate(ipath=IPATH, opts=OPTS, outd='libpgui.in', outc='libpgui_igate.cxx',
  2395. src='panda/src/pgui', module='panda', library='libpgui', files=[
  2396. 'config_pgui.h', 'pgButton.h', 'pgSliderButton.h', 'pgCullTraverser.h', 'pgEntry.h',
  2397. 'pgMouseWatcherGroup.h', 'pgMouseWatcherParameter.h', 'pgFrameStyle.h', 'pgItem.h',
  2398. 'pgMouseWatcherBackground.h', 'pgMouseWatcherRegion.h', 'pgTop.h', 'pgWaitBar.h', 'pgSliderBar.h',
  2399. 'pgui_composite1.cxx', 'pgui_composite2.cxx'])
  2400. CompileC(ipath=IPATH, opts=OPTS, src='libpgui_igate.cxx', obj='libpgui_igate.obj')
  2401. #
  2402. # DIRECTORY: panda/src/pnmimagetypes/
  2403. #
  2404. IPATH=['panda/src/pnmimagetypes', 'panda/src/pnmimage']
  2405. OPTS=['BUILDING_PANDA', 'PNG', 'ZLIB', 'JPEG', 'ZLIB', 'NSPR', 'JPEG', 'TIFF']
  2406. CompileC(ipath=IPATH, opts=OPTS, src='pnmFileTypePNG.cxx', obj='pnmimagetypes_pnmFileTypePNG.obj')
  2407. CompileC(ipath=IPATH, opts=OPTS, src='pnmFileTypeTIFF.cxx', obj='pnmimagetypes_pnmFileTypeTIFF.obj')
  2408. CompileC(ipath=IPATH, opts=OPTS, src='pnmimagetypes_composite1.cxx', obj='pnmimagetypes_composite1.obj')
  2409. CompileC(ipath=IPATH, opts=OPTS, src='pnmimagetypes_composite2.cxx', obj='pnmimagetypes_composite2.obj')
  2410. #
  2411. # DIRECTORY: panda/src/recorder/
  2412. #
  2413. IPATH=['panda/src/recorder']
  2414. OPTS=['BUILDING_PANDA', 'NSPR']
  2415. CompileC(ipath=IPATH, opts=OPTS, src='recorder_composite1.cxx', obj='recorder_composite1.obj')
  2416. CompileC(ipath=IPATH, opts=OPTS, src='recorder_composite2.cxx', obj='recorder_composite2.obj')
  2417. Interrogate(ipath=IPATH, opts=OPTS, outd='librecorder.in', outc='librecorder_igate.cxx',
  2418. src='panda/src/recorder', module='panda', library='librecorder', files=[
  2419. 'config_recorder.h', 'mouseRecorder.h', 'recorderBase.h', 'recorderController.h', 'recorderFrame.h', 'recorderHeader.h', 'recorderTable.h', 'socketStreamRecorder.h', 'recorder_composite1.cxx', 'recorder_composite2.cxx'])
  2420. CompileC(ipath=IPATH, opts=OPTS, src='librecorder_igate.cxx', obj='librecorder_igate.obj')
  2421. #
  2422. # DIRECTORY: panda/src/vrpn/
  2423. #
  2424. if (OMIT.count("VRPN")==0):
  2425. IPATH=['panda/src/vrpn']
  2426. OPTS=['BUILDING_PANDA', 'NSPR', 'VRPN']
  2427. CompileC(ipath=IPATH, opts=OPTS, src='vrpn_composite1.cxx', obj='pvrpn_composite1.obj')
  2428. Interrogate(ipath=IPATH, opts=OPTS, outd='libpvrpn.in', outc='libpvrpn_igate.cxx',
  2429. src='panda/src/vrpn', module='panda', library='libpvrpn', files=[
  2430. 'config_vrpn.cxx', 'config_vrpn.h', 'vrpnClient.cxx', 'vrpnAnalog.cxx', 'vrpnAnalog.h',
  2431. 'vrpnAnalogDevice.cxx', 'vrpnAnalogDevice.h', 'vrpnButton.cxx', 'vrpnButton.h',
  2432. 'vrpnButtonDevice.cxx', 'vrpnButtonDevice.h', 'vrpnClient.h', 'vrpnDial.cxx', 'vrpnDial.h',
  2433. 'vrpnDialDevice.cxx', 'vrpnDialDevice.h', 'vrpnTracker.cxx', 'vrpnTracker.h', 'vrpnTrackerDevice.cxx',
  2434. 'vrpnTrackerDevice.h', 'vrpn_interface.h'])
  2435. CompileC(ipath=IPATH, opts=OPTS, src='libpvrpn_igate.cxx', obj='libpvrpn_igate.obj')
  2436. #
  2437. # DIRECTORY: panda/metalibs/panda/
  2438. #
  2439. IPATH=['panda/metalibs/panda']
  2440. OPTS=['BUILDING_PANDA', 'ZLIB', 'VRPN', 'JPEG', 'PNG', 'TIFF', 'NSPR', 'FREETYPE', 'HELIX', 'FFTW',
  2441. 'ADVAPI', 'WINSOCK2', 'WINUSER', 'WINMM']
  2442. INFILES=['librecorder.in', 'libpgraph.in', 'libgrutil.in', 'libchan.in', 'libpstatclient.in',
  2443. 'libchar.in', 'libcollide.in', 'libdevice.in', 'libdgraph.in', 'libdisplay.in', 'libevent.in',
  2444. 'libgobj.in', 'libgsgbase.in', 'liblinmath.in', 'libmathutil.in', 'libparametrics.in',
  2445. 'libpnmimage.in', 'libtext.in', 'libtform.in', 'liblerp.in', 'libputil.in', 'libaudio.in',
  2446. 'libpgui.in']
  2447. OBJFILES=['panda_panda.obj', 'libpanda_module.obj', 'recorder_composite1.obj',
  2448. 'recorder_composite2.obj', 'librecorder_igate.obj',
  2449. 'pgraph_nodePath.obj', 'pgraph_composite1.obj', 'pgraph_composite2.obj', 'libpgraph_igate.obj',
  2450. 'grutil_multitexReducer.obj', 'grutil_composite1.obj', 'libgrutil_igate.obj',
  2451. 'chan_composite1.obj', 'chan_composite2.obj', 'libchan_igate.obj', 'pstatclient_composite1.obj',
  2452. 'pstatclient_composite2.obj', 'libpstatclient_igate.obj', 'char_composite1.obj',
  2453. 'char_composite2.obj', 'libchar_igate.obj', 'collide_composite1.obj', 'collide_composite2.obj',
  2454. 'libcollide_igate.obj', 'device_composite1.obj', 'device_composite2.obj', 'libdevice_igate.obj',
  2455. 'dgraph_composite1.obj', 'dgraph_composite2.obj', 'libdgraph_igate.obj', 'display_composite1.obj',
  2456. 'display_composite2.obj', 'libdisplay_igate.obj', 'event_composite1.obj', 'libevent_igate.obj',
  2457. 'gobj_composite1.obj', 'gobj_composite2.obj', 'libgobj_igate.obj', 'gsgbase_composite1.obj',
  2458. 'libgsgbase_igate.obj', 'gsgmisc_geomIssuer.obj', 'linmath_composite1.obj',
  2459. 'linmath_composite2.obj', 'liblinmath_igate.obj',
  2460. 'mathutil_composite1.obj', 'mathutil_composite2.obj', 'libmathutil_igate.obj',
  2461. 'parametrics_composite1.obj', 'parametrics_composite2.obj', 'libparametrics_igate.obj',
  2462. 'pnmimagetypes_pnmFileTypePNG.obj', 'pnmimagetypes_pnmFileTypeTIFF.obj', 'pnmimagetypes_composite1.obj',
  2463. 'pnmimagetypes_composite2.obj', 'pnmimage_composite1.obj', 'pnmimage_composite2.obj', 'libpnmimage_igate.obj',
  2464. 'text_composite1.obj', 'text_composite2.obj', 'libtext_igate.obj',
  2465. 'tform_composite1.obj', 'tform_composite2.obj',
  2466. 'libtform_igate.obj', 'lerp_composite1.obj', 'liblerp_igate.obj',
  2467. 'putil_composite1.obj', 'putil_composite2.obj', 'libputil_igate.obj',
  2468. 'audio_composite1.obj', 'libaudio_igate.obj', 'pgui_composite1.obj', 'pgui_composite2.obj',
  2469. 'libpgui_igate.obj', 'pandabase_pandabase.obj', 'libpandaexpress.dll', 'libdtoolconfig.dll', 'libdtool.dll']
  2470. if OMIT.count("HELIX")==0:
  2471. OBJFILES.append("libhelix.ilb")
  2472. INFILES.append("libhelix.in")
  2473. if OMIT.count("VRPN")==0:
  2474. OBJFILES.append("pvrpn_composite1.obj")
  2475. OBJFILES.append("libpvrpn_igate.obj")
  2476. INFILES.append("libpvrpn.in")
  2477. if OMIT.count("NSPR")==0:
  2478. OBJFILES.append("net_composite1.obj")
  2479. OBJFILES.append("net_composite2.obj")
  2480. OBJFILES.append("libnet_igate.obj")
  2481. INFILES.append("libnet.in")
  2482. if OMIT.count("FREETYPE")==0:
  2483. OBJFILES.append("pnmtext_config_pnmtext.obj")
  2484. OBJFILES.append("pnmtext_freetypeFont.obj")
  2485. OBJFILES.append("pnmtext_pnmTextGlyph.obj")
  2486. OBJFILES.append("pnmtext_pnmTextMaker.obj")
  2487. InterrogateModule(outc='libpanda_module.cxx', module='panda', library='libpanda', files=INFILES)
  2488. CompileC(ipath=IPATH, opts=OPTS, src='panda.cxx', obj='panda_panda.obj')
  2489. CompileC(ipath=IPATH, opts=OPTS, src='libpanda_module.cxx', obj='libpanda_module.obj')
  2490. CompileLink(opts=OPTS, dll='libpanda.dll', obj=OBJFILES, xdep=[
  2491. PREFIX+'/tmp/dtool_have_helix.dat',
  2492. PREFIX+'/tmp/dtool_have_vrpn.dat',
  2493. PREFIX+'/tmp/dtool_have_nspr.dat',
  2494. PREFIX+'/tmp/dtool_have_freetype.dat',
  2495. ])
  2496. #
  2497. # DIRECTORY: panda/src/audiotraits/
  2498. #
  2499. if OMIT.count("FMOD") == 0:
  2500. IPATH=['panda/src/audiotraits']
  2501. OPTS=['BUILDING_FMOD_AUDIO', 'NSPR', 'FMOD']
  2502. CompileC(ipath=IPATH, opts=OPTS, src='fmod_audio_composite1.cxx', obj='fmod_audio_fmod_audio_composite1.obj')
  2503. CompileLink(opts=['ADVAPI', 'WINUSER', 'WINMM', 'FMOD', 'NSPR'], dll='libfmod_audio.dll', obj=[
  2504. 'fmod_audio_fmod_audio_composite1.obj',
  2505. 'libpanda.dll',
  2506. 'libpandaexpress.dll',
  2507. 'libdtoolconfig.dll',
  2508. 'libdtool.dll',
  2509. ])
  2510. if OMIT.count("MILES") == 0:
  2511. IPATH=['panda/src/audiotraits']
  2512. OPTS=['BUILDING_MILES_AUDIO', 'NSPR', 'MILES']
  2513. CompileC(ipath=IPATH, opts=OPTS, src='miles_audio_composite1.cxx', obj='miles_audio_miles_audio_composite1.obj')
  2514. CompileLink(opts=['ADVAPI', 'WINUSER', 'WINMM', 'MILES', 'NSPR'], dll='libmiles_audio.dll', obj=[
  2515. 'miles_audio_miles_audio_composite1.obj',
  2516. 'libpanda.dll',
  2517. 'libpandaexpress.dll',
  2518. 'libdtoolconfig.dll',
  2519. 'libdtool.dll',
  2520. ])
  2521. #
  2522. # DIRECTORY: panda/src/builder/
  2523. #
  2524. IPATH=['panda/src/builder']
  2525. OPTS=['BUILDING_PANDAEGG', 'NSPR']
  2526. CompileC(ipath=IPATH, opts=OPTS, src='builder_composite1.cxx', obj='builder_composite1.obj')
  2527. CompileC(ipath=IPATH, opts=OPTS, src='builder_composite2.cxx', obj='builder_composite2.obj')
  2528. #
  2529. # DIRECTORY: panda/src/distort/
  2530. #
  2531. IPATH=['panda/src/distort']
  2532. OPTS=['BUILDING_PANDAFX', 'NSPR']
  2533. CompileC(ipath=IPATH, opts=OPTS, src='distort_composite1.cxx', obj='distort_composite1.obj')
  2534. Interrogate(ipath=IPATH, opts=OPTS, outd='libdistort.in', outc='libdistort_igate.cxx',
  2535. src='panda/src/distort', module='pandafx', library='libdistort',
  2536. files=['config_distort.h', 'projectionScreen.h', 'cylindricalLens.h', 'fisheyeLens.h', 'nonlinearImager.h', 'pSphereLens.h', 'distort_composite1.cxx'])
  2537. CompileC(ipath=IPATH, opts=OPTS, src='libdistort_igate.cxx', obj='libdistort_igate.obj')
  2538. #
  2539. # DIRECTORY: panda/src/downloadertools/
  2540. #
  2541. if OMIT.count("SSL")==0:
  2542. IPATH=['panda/src/downloadertools']
  2543. OPTS=['SSL', 'ZLIB', 'NSPR']
  2544. CompileC(ipath=IPATH, opts=OPTS, src='apply_patch.cxx', obj='apply_patch_apply_patch.obj')
  2545. CompileLink(dll='apply_patch.exe', opts=['ADVAPI', 'NSPR'], obj=[
  2546. 'apply_patch_apply_patch.obj',
  2547. 'libpandaexpress.dll',
  2548. 'libpanda.dll',
  2549. 'libdtoolconfig.dll',
  2550. 'libdtool.dll',
  2551. 'libpystub.dll',
  2552. ])
  2553. CompileC(ipath=IPATH, opts=OPTS, src='build_patch.cxx', obj='build_patch_build_patch.obj')
  2554. CompileLink(dll='build_patch.exe', opts=['ADVAPI', 'NSPR'], obj=[
  2555. 'build_patch_build_patch.obj',
  2556. 'libpandaexpress.dll',
  2557. 'libpanda.dll',
  2558. 'libdtoolconfig.dll',
  2559. 'libdtool.dll',
  2560. 'libpystub.dll',
  2561. ])
  2562. IPATH=['panda/src/downloadertools']
  2563. OPTS=['SSL', 'ZLIB', 'ZLIB', 'NSPR']
  2564. CompileC(ipath=IPATH, opts=OPTS, src='check_adler.cxx', obj='check_adler_check_adler.obj')
  2565. CompileLink(dll='check_adler.exe', opts=['ADVAPI', 'NSPR', 'ZLIB'], obj=[
  2566. 'check_adler_check_adler.obj',
  2567. 'libpandaexpress.dll',
  2568. 'libpanda.dll',
  2569. 'libdtoolconfig.dll',
  2570. 'libdtool.dll',
  2571. 'libpystub.dll',
  2572. ])
  2573. CompileC(ipath=IPATH, opts=OPTS, src='check_crc.cxx', obj='check_crc_check_crc.obj')
  2574. CompileLink(dll='check_crc.exe', opts=['ADVAPI', 'NSPR', 'ZLIB'], obj=[
  2575. 'check_crc_check_crc.obj',
  2576. 'libpandaexpress.dll',
  2577. 'libpanda.dll',
  2578. 'libdtoolconfig.dll',
  2579. 'libdtool.dll',
  2580. 'libpystub.dll',
  2581. ])
  2582. IPATH=['panda/src/downloadertools']
  2583. OPTS=['SSL', 'ZLIB', 'NSPR']
  2584. CompileC(ipath=IPATH, opts=OPTS, src='check_md5.cxx', obj='check_md5_check_md5.obj')
  2585. CompileLink(dll='check_md5.exe', opts=['ADVAPI', 'NSPR', 'SSL'], obj=[
  2586. 'check_md5_check_md5.obj',
  2587. 'libpandaexpress.dll',
  2588. 'libpanda.dll',
  2589. 'libdtoolconfig.dll',
  2590. 'libdtool.dll',
  2591. 'libpystub.dll',
  2592. ])
  2593. CompileC(ipath=IPATH, opts=OPTS, src='multify.cxx', obj='multify_multify.obj')
  2594. CompileLink(dll='multify.exe', opts=['ADVAPI', 'NSPR'], obj=[
  2595. 'multify_multify.obj',
  2596. 'libpandaexpress.dll',
  2597. 'libpanda.dll',
  2598. 'libdtoolconfig.dll',
  2599. 'libdtool.dll',
  2600. 'libpystub.dll',
  2601. ])
  2602. IPATH=['panda/src/downloadertools']
  2603. OPTS=['SSL', 'ZLIB', 'ZLIB', 'NSPR']
  2604. CompileC(ipath=IPATH, opts=OPTS, src='pcompress.cxx', obj='pcompress_pcompress.obj')
  2605. CompileLink(dll='pcompress.exe', opts=['ADVAPI', 'NSPR', 'ZLIB'], obj=[
  2606. 'pcompress_pcompress.obj',
  2607. 'libpandaexpress.dll',
  2608. 'libpanda.dll',
  2609. 'libdtoolconfig.dll',
  2610. 'libdtool.dll',
  2611. 'libpystub.dll',
  2612. ])
  2613. CompileC(ipath=IPATH, opts=OPTS, src='pdecompress.cxx', obj='pdecompress_pdecompress.obj')
  2614. CompileLink(dll='pdecompress.exe', opts=['ADVAPI', 'NSPR', 'ZLIB'], obj=[
  2615. 'pdecompress_pdecompress.obj',
  2616. 'libpandaexpress.dll',
  2617. 'libpanda.dll',
  2618. 'libdtoolconfig.dll',
  2619. 'libdtool.dll',
  2620. 'libpystub.dll',
  2621. ])
  2622. IPATH=['panda/src/downloadertools']
  2623. OPTS=['SSL', 'ZLIB', 'NSPR']
  2624. CompileC(ipath=IPATH, opts=OPTS, src='pdecrypt.cxx', obj='pdecrypt_pdecrypt.obj')
  2625. CompileLink(dll='pdecrypt.exe', opts=['ADVAPI', 'NSPR', 'SSL'], obj=[
  2626. 'pdecrypt_pdecrypt.obj',
  2627. 'libpandaexpress.dll',
  2628. 'libpanda.dll',
  2629. 'libdtoolconfig.dll',
  2630. 'libdtool.dll',
  2631. 'libpystub.dll',
  2632. ])
  2633. CompileC(ipath=IPATH, opts=OPTS, src='pencrypt.cxx', obj='pencrypt_pencrypt.obj')
  2634. CompileLink(dll='pencrypt.exe', opts=['ADVAPI', 'NSPR', 'SSL'], obj=[
  2635. 'pencrypt_pencrypt.obj',
  2636. 'libpandaexpress.dll',
  2637. 'libpanda.dll',
  2638. 'libdtoolconfig.dll',
  2639. 'libdtool.dll',
  2640. 'libpystub.dll',
  2641. ])
  2642. CompileC(ipath=IPATH, opts=OPTS, src='show_ddb.cxx', obj='show_ddb_show_ddb.obj')
  2643. CompileLink(dll='show_ddb.exe', opts=['ADVAPI', 'NSPR'], obj=[
  2644. 'show_ddb_show_ddb.obj',
  2645. 'libpandaexpress.dll',
  2646. 'libpanda.dll',
  2647. 'libdtoolconfig.dll',
  2648. 'libdtool.dll',
  2649. 'libpystub.dll',
  2650. ])
  2651. #
  2652. # DIRECTORY: panda/src/glgsg/
  2653. #
  2654. IPATH=['panda/src/glgsg', 'panda/src/glstuff', 'panda/src/gobj']
  2655. OPTS=['BUILDING_PANDAGL', 'NSPR', 'NVIDIACG']
  2656. CompileC(ipath=IPATH, opts=OPTS, src='config_glgsg.cxx', obj='glgsg_config_glgsg.obj')
  2657. CompileC(ipath=IPATH, opts=OPTS, src='glgsg.cxx', obj='glgsg_glgsg.obj')
  2658. #
  2659. # DIRECTORY: panda/src/effects/
  2660. #
  2661. IPATH=['panda/src/effects']
  2662. OPTS=['BUILDING_PANDAFX', 'NSPR', 'NVIDIACG']
  2663. CompileC(ipath=IPATH, opts=OPTS, src='effects_composite1.cxx', obj='effects_composite1.obj')
  2664. Interrogate(ipath=IPATH, opts=OPTS, outd='libeffects.in', outc='libeffects_igate.cxx',
  2665. src='panda/src/effects', module='pandafx', library='libeffects',
  2666. files=['config_effects.h', 'cgShader.h', 'cgShaderAttrib.h', 'cgShaderContext.h', 'lensFlareNode.h', 'effects_composite1.cxx'])
  2667. CompileC(ipath=IPATH, opts=OPTS, src='libeffects_igate.cxx', obj='libeffects_igate.obj')
  2668. #
  2669. # DIRECTORY: panda/metalibs/pandafx/
  2670. #
  2671. IPATH=['panda/metalibs/pandafx', 'panda/src/distort']
  2672. OPTS=['BUILDING_PANDAFX', 'NSPR', 'NVIDIACG']
  2673. CompileC(ipath=IPATH, opts=OPTS, src='pandafx.cxx', obj='pandafx_pandafx.obj')
  2674. InterrogateModule(outc='libpandafx_module.cxx', module='pandafx', library='libpandafx',
  2675. files=['libdistort.in', 'libeffects.in'])
  2676. CompileC(ipath=IPATH, opts=OPTS, src='libpandafx_module.cxx', obj='libpandafx_module.obj')
  2677. CompileLink(dll='libpandafx.dll', opts=['ADVAPI', 'NSPR', 'NVIDIACG'], obj=[
  2678. 'pandafx_pandafx.obj',
  2679. 'libpandafx_module.obj',
  2680. 'distort_composite1.obj',
  2681. 'libdistort_igate.obj',
  2682. 'effects_composite1.obj',
  2683. 'libeffects_igate.obj',
  2684. 'libpanda.dll',
  2685. 'libpandaexpress.dll',
  2686. 'libdtoolconfig.dll',
  2687. 'libdtool.dll',
  2688. ])
  2689. #
  2690. # DIRECTORY: panda/src/glstuff/
  2691. #
  2692. IPATH=['panda/src/glstuff']
  2693. OPTS=['NSPR', 'NVIDIACG', 'CGGL']
  2694. CompileC(ipath=IPATH, opts=OPTS, src='glpure.cxx', obj='glstuff_glpure.obj')
  2695. CompileLink(dll='libglstuff.dll', opts=['ADVAPI', 'GLUT', 'NSPR', 'NVIDIACG', 'CGGL'], obj=[
  2696. 'glstuff_glpure.obj',
  2697. 'libpanda.dll',
  2698. 'libpandafx.dll',
  2699. 'libpandaexpress.dll',
  2700. 'libdtoolconfig.dll',
  2701. 'libdtool.dll',
  2702. ])
  2703. #
  2704. # DIRECTORY: panda/src/windisplay/
  2705. #
  2706. if (sys.platform == "win32" or sys.platform == "cygwin"):
  2707. IPATH=['panda/src/windisplay']
  2708. OPTS=['BUILDING_PANDAWIN', 'NSPR']
  2709. CompileC(ipath=IPATH, opts=OPTS, src='winGraphicsWindow.cxx', obj='windisplay_winGraphicsWindow.obj')
  2710. CompileC(ipath=IPATH, opts=OPTS, src='config_windisplay.cxx', obj='windisplay_config_windisplay.obj')
  2711. CompileC(ipath=IPATH, opts=OPTS, src='winGraphicsPipe.cxx', obj='windisplay_winGraphicsPipe.obj')
  2712. CompileLink(opts=['WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NSPR'],
  2713. dll='libwindisplay.dll', obj=[
  2714. 'windisplay_winGraphicsWindow.obj',
  2715. 'windisplay_config_windisplay.obj',
  2716. 'windisplay_winGraphicsPipe.obj',
  2717. 'libpanda.dll',
  2718. 'libpandaexpress.dll',
  2719. 'libdtoolconfig.dll',
  2720. 'libdtool.dll',
  2721. ])
  2722. #
  2723. # DIRECTORY: panda/src/glxdisplay/
  2724. #
  2725. if (sys.platform != "win32" and sys.platform != "cygwin"):
  2726. IPATH=['panda/src/glxdisplay', 'panda/src/gobj']
  2727. OPTS=['BUILDING_PANDAGLUT', 'NSPR', 'GLUT', 'NVIDIACG', 'CGGL']
  2728. CompileC(ipath=IPATH, opts=OPTS, src='glxdisplay_composite1.cxx', obj='glxdisplay_composite1.obj')
  2729. Interrogate(ipath=IPATH, opts=OPTS, outd='libglxdisplay.in', outc='libglxdisplay_igate.cxx',
  2730. src='panda/src/glxdisplay', module='pandagl', library='libglxdisplay', files=['glxGraphicsPipe.h'])
  2731. CompileC(ipath=IPATH, opts=OPTS, src='libglxdisplay_igate.cxx', obj='libglxdisplay_igate.obj')
  2732. IPATH=['panda/metalibs/pandagl']
  2733. OPTS=['BUILDING_PANDAGL', 'NSPR', 'NVIDIACG', 'CGGL']
  2734. CompileC(ipath=IPATH, opts=OPTS, src='pandagl.cxx', obj='pandagl_pandagl.obj')
  2735. CompileLink(opts=['GLUT', 'NVIDIACG', 'CGGL', 'NSPR'], dll='libpandagl.dll', obj=[
  2736. 'pandagl_pandagl.obj',
  2737. 'glgsg_config_glgsg.obj',
  2738. 'glgsg_glgsg.obj',
  2739. 'glxdisplay_composite1.obj',
  2740. 'libglxdisplay_igate.obj',
  2741. 'libpanda.dll',
  2742. 'libpandaexpress.dll',
  2743. 'libglstuff.dll',
  2744. 'libpandafx.dll',
  2745. 'libdtoolconfig.dll',
  2746. 'libdtool.dll',
  2747. ])
  2748. #
  2749. # DIRECTORY: panda/src/wgldisplay/
  2750. #
  2751. if (sys.platform == "win32" or sys.platform == "cygwin"):
  2752. IPATH=['panda/src/wgldisplay', 'panda/src/glstuff', 'panda/src/gobj']
  2753. OPTS=['BUILDING_PANDAGL', 'NSPR', 'NVIDIACG', 'CGGL']
  2754. CompileC(ipath=IPATH, opts=OPTS, src='wgldisplay_composite1.cxx', obj='wgldisplay_composite1.obj')
  2755. IPATH=['panda/metalibs/pandagl']
  2756. OPTS=['BUILDING_PANDAGL', 'NSPR', 'NVIDIACG', 'CGGL']
  2757. CompileC(ipath=IPATH, opts=OPTS, src='pandagl.cxx', obj='pandagl_pandagl.obj')
  2758. CompileLink(opts=['WINGDI', 'GLUT', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NSPR', 'NVIDIACG', 'CGGL'],
  2759. dll='libpandagl.dll', obj=[
  2760. 'pandagl_pandagl.obj',
  2761. 'glgsg_config_glgsg.obj',
  2762. 'glgsg_glgsg.obj',
  2763. 'wgldisplay_composite1.obj',
  2764. 'libwindisplay.dll',
  2765. 'libpanda.dll',
  2766. 'libpandaexpress.dll',
  2767. 'libglstuff.dll',
  2768. 'libpandafx.dll',
  2769. 'libdtoolconfig.dll',
  2770. 'libdtool.dll',
  2771. ])
  2772. #
  2773. # DIRECTORY: panda/metalibs/pandadx7/
  2774. #
  2775. if (sys.platform == "win32" or sys.platform == "cygwin"):
  2776. IPATH=['panda/src/dxgsg7']
  2777. OPTS=['BUILDING_PANDADX', 'DXSDK', 'NSPR']
  2778. CompileC(ipath=IPATH, opts=OPTS, src='dxGraphicsStateGuardian7.cxx', obj='dxgsg7_dxGraphicsStateGuardian7.obj')
  2779. CompileC(ipath=IPATH, opts=OPTS, src='dxgsg7_composite1.cxx', obj='dxgsg7_composite1.obj')
  2780. IPATH=['panda/metalibs/pandadx7']
  2781. OPTS=['BUILDING_PANDADX', 'DXSDK', 'NSPR']
  2782. CompileC(ipath=IPATH, opts=OPTS, src='pandadx7.cxx', obj='pandadx7_pandadx7.obj')
  2783. CompileLink(dll='libpandadx7.dll', opts=['ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DXDRAW', 'DXGUID', 'D3D8', 'NSPR'], obj=[
  2784. 'pandadx7_pandadx7.obj',
  2785. 'dxgsg7_dxGraphicsStateGuardian7.obj',
  2786. 'dxgsg7_composite1.obj',
  2787. 'libpanda.dll',
  2788. 'libpandaexpress.dll',
  2789. 'libwindisplay.dll',
  2790. 'libdtoolconfig.dll',
  2791. 'libdtool.dll',
  2792. ])
  2793. #
  2794. # DIRECTORY: panda/metalibs/pandadx8/
  2795. #
  2796. if (sys.platform == "win32" or sys.platform == "cygwin"):
  2797. IPATH=['panda/src/dxgsg8']
  2798. OPTS=['BUILDING_PANDADX', 'DXSDK', 'NSPR']
  2799. CompileC(ipath=IPATH, opts=OPTS, src='dxGraphicsStateGuardian8.cxx', obj='dxgsg8_dxGraphicsStateGuardian8.obj')
  2800. CompileC(ipath=IPATH, opts=OPTS, src='dxgsg8_composite1.cxx', obj='dxgsg8_composite1.obj')
  2801. IPATH=['panda/metalibs/pandadx8']
  2802. OPTS=['BUILDING_PANDADX', 'DXSDK', 'NSPR']
  2803. CompileC(ipath=IPATH, opts=OPTS, src='pandadx8.cxx', obj='pandadx8_pandadx8.obj')
  2804. CompileLink(dll='libpandadx8.dll',
  2805. opts=['ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DXDRAW', 'DXGUID', 'D3D8', 'NSPR'], obj=[
  2806. 'pandadx8_pandadx8.obj',
  2807. 'dxgsg8_dxGraphicsStateGuardian8.obj',
  2808. 'dxgsg8_composite1.obj',
  2809. 'libpanda.dll',
  2810. 'libpandaexpress.dll',
  2811. 'libwindisplay.dll',
  2812. 'libdtoolconfig.dll',
  2813. 'libdtool.dll',
  2814. ])
  2815. #
  2816. # DIRECTORY: panda/metalibs/pandadx9/
  2817. #
  2818. if (sys.platform == "win32" or sys.platform == "cygwin"):
  2819. IPATH=['panda/src/dxgsg9']
  2820. OPTS=['BUILDING_PANDADX', 'DXSDK', 'NSPR']
  2821. CompileC(ipath=IPATH, opts=OPTS, src='dxGraphicsStateGuardian9.cxx', obj='dxgsg9_dxGraphicsStateGuardian9.obj')
  2822. CompileC(ipath=IPATH, opts=OPTS, src='dxgsg9_composite1.cxx', obj='dxgsg9_composite1.obj')
  2823. IPATH=['panda/metalibs/pandadx9']
  2824. OPTS=['BUILDING_PANDADX', 'DXSDK', 'NSPR']
  2825. CompileC(ipath=IPATH, opts=OPTS, src='pandadx9.cxx', obj='pandadx9_pandadx9.obj')
  2826. CompileLink(dll='libpandadx9.dll',
  2827. opts=['ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DXDRAW', 'DXGUID', 'D3D9', 'NSPR'], obj=[
  2828. 'pandadx9_pandadx9.obj',
  2829. 'dxgsg9_dxGraphicsStateGuardian9.obj',
  2830. 'dxgsg9_composite1.obj',
  2831. 'libpanda.dll',
  2832. 'libpandaexpress.dll',
  2833. 'libwindisplay.dll',
  2834. 'libdtoolconfig.dll',
  2835. 'libdtool.dll',
  2836. ])
  2837. #
  2838. # DIRECTORY: panda/src/egg/
  2839. #
  2840. IPATH=['panda/src/egg']
  2841. CompileBison(pre='eggyy', dstc='parser.cxx', dsth='parser.h', src='panda/src/egg/parser.yxx')
  2842. CompileFlex(pre='eggyy', dst='lexer.cxx', src='panda/src/egg/lexer.lxx', dashi=1)
  2843. OPTS=['BUILDING_PANDAEGG', 'NSPR']
  2844. CompileC(ipath=IPATH, opts=OPTS, src='egg_composite1.cxx', obj='egg_composite1.obj')
  2845. CompileC(ipath=IPATH, opts=OPTS, src='egg_composite2.cxx', obj='egg_composite2.obj')
  2846. CompileC(ipath=IPATH, opts=OPTS, src='parser.cxx', obj='egg_parser.obj')
  2847. CompileC(ipath=IPATH, opts=OPTS, src='lexer.cxx', obj='egg_lexer.obj')
  2848. Interrogate(ipath=IPATH, opts=OPTS, outd='libegg.in', outc='libegg_igate.cxx',
  2849. src='panda/src/egg', module='pandaegg', library='libegg', files=[
  2850. 'config_egg.h', 'eggAnimData.h', 'eggAttributes.h', 'eggBin.h', 'eggBinMaker.h', 'eggComment.h',
  2851. 'eggCoordinateSystem.h', 'eggCurve.h', 'eggData.h', 'eggExternalReference.h', 'eggFilenameNode.h',
  2852. 'eggGroup.h', 'eggGroupNode.h', 'eggGroupUniquifier.h', 'eggLine.h', 'eggMaterial.h',
  2853. 'eggMaterialCollection.h', 'eggMiscFuncs.h', 'eggMorph.h', 'eggMorphList.h', 'eggNamedObject.h',
  2854. 'eggNameUniquifier.h', 'eggNode.h', 'eggNurbsCurve.h', 'eggNurbsSurface.h', 'eggObject.h',
  2855. 'eggParameters.h', 'eggPoint.h', 'eggPolygon.h', 'eggPolysetMaker.h', 'eggPoolUniquifier.h',
  2856. 'eggPrimitive.h', 'eggRenderMode.h', 'eggSAnimData.h', 'eggSurface.h', 'eggSwitchCondition.h',
  2857. 'eggTable.h', 'eggTexture.h', 'eggTextureCollection.h', 'eggTransform3d.h', 'eggUserData.h',
  2858. 'eggUtilities.h', 'eggVertex.h', 'eggVertexPool.h', 'eggVertexUV.h', 'eggXfmAnimData.h',
  2859. 'eggXfmSAnim.h', 'parserDefs.h', 'lexerDefs.h', 'pt_EggMaterial.h', 'vector_PT_EggMaterial.h',
  2860. 'pt_EggTexture.h', 'vector_PT_EggTexture.h', 'pt_EggVertex.h', 'vector_PT_EggVertex.h',
  2861. 'egg_composite1.cxx', 'egg_composite2.cxx'])
  2862. CompileC(ipath=IPATH, opts=OPTS, src='libegg_igate.cxx', obj='libegg_igate.obj')
  2863. #
  2864. # DIRECTORY: panda/src/egg2pg/
  2865. #
  2866. IPATH=['panda/src/egg2pg']
  2867. OPTS=['BUILDING_PANDAEGG', 'NSPR']
  2868. CompileC(ipath=IPATH, opts=OPTS, src='egg2pg_composite1.cxx', obj='egg2pg_composite1.obj')
  2869. CompileC(ipath=IPATH, opts=OPTS, src='egg2pg_composite2.cxx', obj='egg2pg_composite2.obj')
  2870. Interrogate(ipath=IPATH, opts=OPTS, outd='libegg2pg.in', outc='libegg2pg_igate.cxx',
  2871. src='panda/src/egg2pg', module='pandaegg', library='libegg2pg', files=['load_egg_file.h'])
  2872. CompileC(ipath=IPATH, opts=OPTS, src='libegg2pg_igate.cxx', obj='libegg2pg_igate.obj')
  2873. #
  2874. # DIRECTORY: panda/src/framework/
  2875. #
  2876. IPATH=['panda/src/framework']
  2877. OPTS=['BUILDING_FRAMEWORK', 'NSPR']
  2878. CompileC(ipath=IPATH, opts=OPTS, src='config_framework.cxx', obj='framework_config_framework.obj')
  2879. CompileC(ipath=IPATH, opts=OPTS, src='pandaFramework.cxx', obj='framework_pandaFramework.obj')
  2880. CompileC(ipath=IPATH, opts=OPTS, src='windowFramework.cxx', obj='framework_windowFramework.obj')
  2881. CompileLink(dll='libframework.dll', opts=['ADVAPI', 'NSPR'], obj=[
  2882. 'framework_config_framework.obj',
  2883. 'framework_pandaFramework.obj',
  2884. 'framework_windowFramework.obj',
  2885. 'libpanda.dll',
  2886. 'libpandaexpress.dll',
  2887. 'libdtoolconfig.dll',
  2888. 'libdtool.dll',
  2889. ])
  2890. #
  2891. # DIRECTORY: panda/metalibs/pandaegg/
  2892. #
  2893. IPATH=['panda/metalibs/pandaegg', 'panda/src/egg']
  2894. OPTS=['BUILDING_PANDAEGG', 'NSPR']
  2895. CompileC(ipath=IPATH, opts=OPTS, src='pandaegg.cxx', obj='pandaegg_pandaegg.obj')
  2896. InterrogateModule(outc='libpandaegg_module.cxx', module='pandaegg', library='libpandaegg',
  2897. files=['libegg2pg.in', 'libegg.in'])
  2898. CompileC(ipath=IPATH, opts=OPTS, src='libpandaegg_module.cxx', obj='libpandaegg_module.obj')
  2899. CompileLink(dll='libpandaegg.dll', opts=['ADVAPI', 'NSPR'], obj=[
  2900. 'pandaegg_pandaegg.obj',
  2901. 'libpandaegg_module.obj',
  2902. 'egg2pg_composite1.obj',
  2903. 'egg2pg_composite2.obj',
  2904. 'libegg2pg_igate.obj',
  2905. 'egg_composite1.obj',
  2906. 'egg_composite2.obj',
  2907. 'egg_parser.obj',
  2908. 'egg_lexer.obj',
  2909. 'libegg_igate.obj',
  2910. 'builder_composite1.obj',
  2911. 'builder_composite2.obj',
  2912. 'libpanda.dll',
  2913. 'libpandaexpress.dll',
  2914. 'libdtoolconfig.dll',
  2915. 'libdtool.dll',
  2916. ])
  2917. #
  2918. # DIRECTORY: panda/src/physics/
  2919. #
  2920. IPATH=['panda/src/physics']
  2921. OPTS=['BUILDING_PANDAPHYSICS', 'NSPR']
  2922. CompileC(ipath=IPATH, opts=OPTS, src='physics_composite1.cxx', obj='physics_composite1.obj')
  2923. CompileC(ipath=IPATH, opts=OPTS, src='physics_composite2.cxx', obj='physics_composite2.obj')
  2924. Interrogate(ipath=IPATH, opts=OPTS, outd='libphysics.in', outc='libphysics_igate.cxx',
  2925. src='panda/src/physics', module='pandaphysics', library='libphysics',
  2926. files=['actorNode.h', 'angularEulerIntegrator.h', 'angularForce.h', 'angularIntegrator.h', 'angularVectorForce.h', 'baseForce.h', 'baseIntegrator.h', 'config_physics.h', 'forceNode.h', 'linearCylinderVortexForce.h', 'linearDistanceForce.h', 'linearEulerIntegrator.h', 'linearForce.h', 'linearFrictionForce.h', 'linearIntegrator.h', 'linearJitterForce.h', 'linearNoiseForce.h', 'linearRandomForce.h', 'linearSinkForce.h', 'linearSourceForce.h', 'linearUserDefinedForce.h', 'linearVectorForce.h', 'physical.h', 'physicalNode.h', 'physicsCollisionHandler.h', 'physicsManager.h', 'physicsObject.h', 'physics_composite1.cxx', 'physics_composite2.cxx'])
  2927. CompileC(ipath=IPATH, opts=OPTS, src='libphysics_igate.cxx', obj='libphysics_igate.obj')
  2928. #
  2929. # DIRECTORY: panda/src/particlesystem/
  2930. #
  2931. IPATH=['panda/src/particlesystem']
  2932. OPTS=['BUILDING_PANDAPHYSICS', 'NSPR']
  2933. CompileC(ipath=IPATH, opts=OPTS, src='particlesystem_composite1.cxx', obj='particlesystem_composite1.obj')
  2934. CompileC(ipath=IPATH, opts=OPTS, src='particlesystem_composite2.cxx', obj='particlesystem_composite2.obj')
  2935. Interrogate(ipath=IPATH, opts=OPTS, outd='libparticlesystem.in', outc='libparticlesystem_igate.cxx',
  2936. src='panda/src/particlesystem', module='pandaphysics', library='libparticlesystem',
  2937. files=['baseParticle.h', 'baseParticleEmitter.h', 'baseParticleFactory.h', 'baseParticleRenderer.h', 'boxEmitter.h', 'config_particlesystem.h', 'discEmitter.h', 'geomParticleRenderer.h', 'lineEmitter.h', 'lineParticleRenderer.h', 'particleSystem.h', 'particleSystemManager.h', 'pointEmitter.h', 'pointParticle.h', 'pointParticleFactory.h', 'pointParticleRenderer.h', 'rectangleEmitter.h', 'ringEmitter.h', 'sparkleParticleRenderer.h', 'sphereSurfaceEmitter.h', 'sphereVolumeEmitter.h', 'spriteParticleRenderer.h', 'tangentRingEmitter.h', 'zSpinParticle.h', 'zSpinParticleFactory.h', 'particleCommonFuncs.h', 'particlesystem_composite1.cxx', 'particlesystem_composite2.cxx'])
  2938. CompileC(ipath=IPATH, opts=OPTS, src='libparticlesystem_igate.cxx', obj='libparticlesystem_igate.obj')
  2939. #
  2940. # DIRECTORY: panda/metalibs/pandaphysics/
  2941. #
  2942. IPATH=['panda/metalibs/pandaphysics']
  2943. OPTS=['BUILDING_PANDAPHYSICS', 'NSPR']
  2944. CompileC(ipath=IPATH, opts=OPTS, src='pandaphysics.cxx', obj='pandaphysics_pandaphysics.obj')
  2945. InterrogateModule(outc='libpandaphysics_module.cxx', module='pandaphysics', library='libpandaphysics',
  2946. files=['libphysics.in', 'libparticlesystem.in'])
  2947. CompileC(ipath=IPATH, opts=OPTS, src='libpandaphysics_module.cxx', obj='libpandaphysics_module.obj')
  2948. CompileLink(dll='libpandaphysics.dll', opts=['ADVAPI', 'NSPR'], obj=[
  2949. 'pandaphysics_pandaphysics.obj',
  2950. 'libpandaphysics_module.obj',
  2951. 'physics_composite1.obj',
  2952. 'physics_composite2.obj',
  2953. 'libphysics_igate.obj',
  2954. 'particlesystem_composite1.obj',
  2955. 'particlesystem_composite2.obj',
  2956. 'libparticlesystem_igate.obj',
  2957. 'libpanda.dll',
  2958. 'libpandaexpress.dll',
  2959. 'libdtoolconfig.dll',
  2960. 'libdtool.dll',
  2961. ])
  2962. #
  2963. # DIRECTORY: panda/src/testbed/
  2964. #
  2965. IPATH=['panda/src/testbed']
  2966. OPTS=['NSPR']
  2967. CompileC(ipath=IPATH, opts=OPTS, src='pview.cxx', obj='pview_pview.obj')
  2968. CompileLink(dll='pview.exe', opts=['ADVAPI', 'NSPR'], obj=[
  2969. 'pview_pview.obj',
  2970. 'libframework.dll',
  2971. 'libpanda.dll',
  2972. 'libpandafx.dll',
  2973. 'libpandaexpress.dll',
  2974. 'libdtoolconfig.dll',
  2975. 'libdtool.dll',
  2976. 'libpystub.dll',
  2977. ])
  2978. #
  2979. # DIRECTORY: direct/src/directbase/
  2980. #
  2981. IPATH=['direct/src/directbase']
  2982. OPTS=['BUILDING_DIRECT', 'NSPR']
  2983. CompileC(ipath=IPATH, opts=OPTS, src='directbase.cxx', obj='directbase_directbase.obj')
  2984. #
  2985. # DIRECTORY: direct/src/dcparser/
  2986. #
  2987. CompileBison(pre='dcyy', dstc='dcParser.cxx', dsth='dcParser.h', src='direct/src/dcparser/dcParser.yxx')
  2988. CompileFlex(pre='dcyy', dst='dcLexer.cxx', src='direct/src/dcparser/dcLexer.lxx', dashi=0)
  2989. IPATH=['direct/src/dcparser']
  2990. OPTS=['WITHINPANDA', 'BUILDING_DIRECT', 'NSPR']
  2991. CompileC(ipath=IPATH, opts=OPTS, src='dcparser_composite1.cxx', obj='dcparser_composite1.obj')
  2992. CompileC(ipath=IPATH, opts=OPTS, src='dcparser_composite2.cxx', obj='dcparser_composite2.obj')
  2993. CompileC(ipath=IPATH, opts=OPTS, src='dcParser.cxx', obj='dcparser_dcParser.obj')
  2994. CompileC(ipath=IPATH, opts=OPTS, src='dcLexer.cxx', obj='dcparser_dcLexer.obj')
  2995. Interrogate(ipath=IPATH, opts=OPTS, outd='libdcparser.in', outc='libdcparser_igate.cxx',
  2996. src='direct/src/dcparser', module='direct', library='libdcparser',
  2997. files=['dcAtomicField.h', 'dcClass.h', 'dcDeclaration.h', 'dcField.h', 'dcFile.h',
  2998. 'dcLexerDefs.h', 'dcMolecularField.h', 'dcParserDefs.h', 'dcSubatomicType.h',
  2999. 'dcPackData.h', 'dcPacker.h', 'dcPackerCatalog.h', 'dcPackerInterface.h',
  3000. 'dcParameter.h', 'dcClassParameter.h', 'dcArrayParameter.h', 'dcSimpleParameter.h',
  3001. 'dcSwitchParameter.h', 'dcNumericRange.h', 'dcSwitch.h', 'dcTypedef.h', 'dcPython.h',
  3002. 'dcbase.h', 'dcindent.h', 'hashGenerator.h', 'primeNumberGenerator.h',
  3003. 'dcparser_composite1.cxx', 'dcparser_composite2.cxx'])
  3004. CompileC(ipath=IPATH, opts=OPTS, src='libdcparser_igate.cxx', obj='libdcparser_igate.obj')
  3005. #
  3006. # DIRECTORY: direct/src/deadrec/
  3007. #
  3008. IPATH=['direct/src/deadrec']
  3009. OPTS=['BUILDING_DIRECT', 'NSPR']
  3010. CompileC(ipath=IPATH, opts=OPTS, src='deadrec_composite1.cxx', obj='deadrec_composite1.obj')
  3011. Interrogate(ipath=IPATH, opts=OPTS, outd='libdeadrec.in', outc='libdeadrec_igate.cxx',
  3012. src='direct/src/deadrec', module='direct', library='libdeadrec',
  3013. files=['smoothMover.h', 'deadrec_composite1.cxx'])
  3014. CompileC(ipath=IPATH, opts=OPTS, src='libdeadrec_igate.cxx', obj='libdeadrec_igate.obj')
  3015. #
  3016. # DIRECTORY: direct/src/distributed/
  3017. #
  3018. IPATH=['direct/src/distributed', 'direct/src/dcparser']
  3019. OPTS=['WITHINPANDA', 'BUILDING_DIRECT', 'SSL', 'NSPR']
  3020. CompileC(ipath=IPATH, opts=OPTS, src='config_distributed.cxx', obj='distributed_config_distributed.obj')
  3021. CompileC(ipath=IPATH, opts=OPTS, src='cConnectionRepository.cxx', obj='distributed_cConnectionRepository.obj')
  3022. CompileC(ipath=IPATH, opts=OPTS, src='cDistributedSmoothNodeBase.cxx', obj='distributed_cDistributedSmoothNodeBase.obj')
  3023. Interrogate(ipath=IPATH, opts=OPTS, outd='libdistributed.in', outc='libdistributed_igate.cxx',
  3024. src='direct/src/distributed', module='direct', library='libdistributed',
  3025. files=['config_distributed.cxx', 'config_distributed.h', 'cConnectionRepository.cxx',
  3026. 'cConnectionRepository.h', 'cDistributedSmoothNodeBase.cxx', 'cDistributedSmoothNodeBase.h'])
  3027. CompileC(ipath=IPATH, opts=OPTS, src='libdistributed_igate.cxx', obj='libdistributed_igate.obj')
  3028. #
  3029. # DIRECTORY: direct/src/interval/
  3030. #
  3031. IPATH=['direct/src/interval']
  3032. OPTS=['BUILDING_DIRECT', 'NSPR']
  3033. #CompileC(ipath=IPATH, opts=OPTS, src='config_interval.cxx', obj='interval_config_interval.obj')
  3034. #CompileC(ipath=IPATH, opts=OPTS, src='cInterval.cxx', obj='interval_cInterval.obj')
  3035. #CompileC(ipath=IPATH, opts=OPTS, src='cIntervalManager.cxx', obj='interval_cIntervalManager.obj')
  3036. #CompileC(ipath=IPATH, opts=OPTS, src='cLerpInterval.cxx', obj='interval_cLerpInterval.obj')
  3037. #CompileC(ipath=IPATH, opts=OPTS, src='cLerpNodePathInterval.cxx', obj='interval_cLerpNodePathInterval.obj')
  3038. #CompileC(ipath=IPATH, opts=OPTS, src='cLerpAnimEffectInterval.cxx', obj='interval_cLerpAnimEffectInterval.obj')
  3039. #CompileC(ipath=IPATH, opts=OPTS, src='cMetaInterval.cxx', obj='interval_cMetaInterval.obj')
  3040. #CompileC(ipath=IPATH, opts=OPTS, src='hideInterval.cxx', obj='interval_hideInterval.obj')
  3041. #CompileC(ipath=IPATH, opts=OPTS, src='showInterval.cxx', obj='interval_showInterval.obj')
  3042. #CompileC(ipath=IPATH, opts=OPTS, src='waitInterval.cxx', obj='interval_waitInterval.obj')
  3043. CompileC(ipath=IPATH, opts=OPTS, src='interval_composite1.cxx', obj='interval_composite1.obj')
  3044. Interrogate(ipath=IPATH, opts=OPTS, outd='libinterval.in', outc='libinterval_igate.cxx',
  3045. src='direct/src/interval', module='direct', library='libinterval',
  3046. files=['config_interval.cxx', 'config_interval.h', 'cInterval.cxx', 'cInterval.h',
  3047. 'cIntervalManager.cxx', 'cIntervalManager.h', 'cLerpInterval.cxx', 'cLerpInterval.h',
  3048. 'cLerpNodePathInterval.cxx', 'cLerpNodePathInterval.h', 'cLerpAnimEffectInterval.cxx',
  3049. 'cLerpAnimEffectInterval.h', 'cMetaInterval.cxx', 'cMetaInterval.h', 'hideInterval.cxx',
  3050. 'hideInterval.h', 'showInterval.cxx', 'showInterval.h', 'waitInterval.cxx', 'waitInterval.h',
  3051. 'lerp_helpers.h'])
  3052. CompileC(ipath=IPATH, opts=OPTS, src='libinterval_igate.cxx', obj='libinterval_igate.obj')
  3053. #
  3054. # DIRECTORY: direct/src/showbase/
  3055. #
  3056. IPATH=['direct/src/showbase']
  3057. OPTS=['BUILDING_DIRECT', 'NSPR']
  3058. CompileC(ipath=IPATH, opts=OPTS, src='showBase.cxx', obj='showbase_showBase.obj')
  3059. CompileC(ipath=IPATH, opts=OPTS, src='mersenne.cxx', obj='showbase_mersenne.obj')
  3060. Interrogate(ipath=IPATH, opts=OPTS, outd='libshowbase.in', outc='libshowbase_igate.cxx',
  3061. src='direct/src/showbase', module='direct', library='libshowbase',
  3062. files=['showBase.cxx', 'showBase.h', 'mersenne.cxx', 'mersenne.h'])
  3063. CompileC(ipath=IPATH, opts=OPTS, src='libshowbase_igate.cxx', obj='libshowbase_igate.obj')
  3064. #
  3065. # DIRECTORY: direct/metalibs/direct/
  3066. #
  3067. IPATH=['direct/metalibs/direct']
  3068. OPTS=['BUILDING_DIRECT', 'NSPR']
  3069. CompileC(ipath=IPATH, opts=OPTS, src='direct.cxx', obj='direct_direct.obj')
  3070. InterrogateModule(outc='libdirect_module.cxx', module='direct', library='libdirect',
  3071. files=['libdcparser.in', 'libshowbase.in', 'libdeadrec.in', 'libinterval.in', 'libdistributed.in'])
  3072. CompileC(ipath=IPATH, opts=OPTS, src='libdirect_module.cxx', obj='libdirect_module.obj')
  3073. CompileLink(dll='libdirect.dll', opts=['ADVAPI', 'NSPR', 'SSL'], obj=[
  3074. 'direct_direct.obj',
  3075. 'libdirect_module.obj',
  3076. 'directbase_directbase.obj',
  3077. 'dcparser_composite1.obj',
  3078. 'dcparser_composite2.obj',
  3079. 'dcparser_dcParser.obj',
  3080. 'dcparser_dcLexer.obj',
  3081. 'libdcparser_igate.obj',
  3082. 'showbase_showBase.obj',
  3083. 'showbase_mersenne.obj',
  3084. 'libshowbase_igate.obj',
  3085. 'deadrec_composite1.obj',
  3086. 'libdeadrec_igate.obj',
  3087. 'interval_composite1.obj',
  3088. 'libinterval_igate.obj',
  3089. 'distributed_config_distributed.obj',
  3090. 'distributed_cConnectionRepository.obj',
  3091. 'distributed_cDistributedSmoothNodeBase.obj',
  3092. 'libdistributed_igate.obj',
  3093. 'libpanda.dll',
  3094. 'libpandaexpress.dll',
  3095. 'libdtoolconfig.dll',
  3096. 'libdtool.dll',
  3097. ])
  3098. #
  3099. # DIRECTORY: direct/src/dcparse/
  3100. #
  3101. IPATH=['direct/src/dcparse', 'direct/src/dcparser']
  3102. OPTS=['WITHINPANDA', 'NSPR']
  3103. CompileC(ipath=IPATH, opts=OPTS, src='dcparse.cxx', obj='dcparse_dcparse.obj')
  3104. CompileLink(dll='dcparse.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3105. 'dcparse_dcparse.obj',
  3106. 'libdirect.dll',
  3107. 'libpandaexpress.dll',
  3108. 'libdtoolconfig.dll',
  3109. 'libdtool.dll',
  3110. 'libpystub.dll',
  3111. ])
  3112. #
  3113. # DIRECTORY: direct/src/heapq/
  3114. #
  3115. IPATH=['direct/src/heapq']
  3116. OPTS=['NSPR']
  3117. CompileC(ipath=IPATH, opts=OPTS, src='heapq.cxx', obj='heapq_heapq.obj')
  3118. CompileLink(dll='libheapq.dll', opts=['ADVAPI', 'NSPR'], obj=[
  3119. 'heapq_heapq.obj',
  3120. 'libpandaexpress.dll',
  3121. 'libdtoolconfig.dll',
  3122. 'libdtool.dll',
  3123. ])
  3124. #
  3125. # DIRECTORY: pandatool/src/pandatoolbase/
  3126. #
  3127. IPATH=['pandatool/src/pandatoolbase']
  3128. OPTS=['NSPR']
  3129. CompileC(ipath=IPATH, opts=OPTS, src='pandatoolbase_composite1.cxx', obj='pandatoolbase_composite1.obj')
  3130. CompileLIB(lib='libpandatoolbase.lib', obj=['pandatoolbase_composite1.obj'])
  3131. #
  3132. # DIRECTORY: pandatool/src/converter/
  3133. #
  3134. IPATH=['pandatool/src/converter']
  3135. OPTS=['NSPR']
  3136. CompileC(ipath=IPATH, opts=OPTS, src='somethingToEggConverter.cxx', obj='converter_somethingToEggConverter.obj')
  3137. CompileLIB(lib='libconverter.lib', obj=['converter_somethingToEggConverter.obj'])
  3138. #
  3139. # DIRECTORY: pandatool/src/progbase/
  3140. #
  3141. IPATH=['pandatool/src/progbase']
  3142. OPTS=['NSPR']
  3143. CompileC(ipath=IPATH, opts=OPTS, src='progbase_composite1.cxx', obj='progbase_composite1.obj')
  3144. CompileLIB(lib='libprogbase.lib', obj=['progbase_composite1.obj'])
  3145. #
  3146. # DIRECTORY: pandatool/src/eggbase/
  3147. #
  3148. IPATH=['pandatool/src/eggbase']
  3149. OPTS=['NSPR']
  3150. CompileC(ipath=IPATH, opts=OPTS, src='eggbase_composite1.cxx', obj='eggbase_composite1.obj')
  3151. CompileLIB(lib='libeggbase.lib', obj=['eggbase_composite1.obj'])
  3152. #
  3153. # DIRECTORY: pandatool/src/bam/
  3154. #
  3155. IPATH=['pandatool/src/bam']
  3156. OPTS=['NSPR']
  3157. CompileC(ipath=IPATH, opts=OPTS, src='bamInfo.cxx', obj='bam-info_bamInfo.obj')
  3158. CompileLink(dll='bam-info.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3159. 'bam-info_bamInfo.obj',
  3160. 'libprogbase.lib',
  3161. 'libpandatoolbase.lib',
  3162. 'libpandaegg.dll',
  3163. 'libpanda.dll',
  3164. 'libpandaexpress.dll',
  3165. 'libdtoolconfig.dll',
  3166. 'libdtool.dll',
  3167. 'libpystub.dll',
  3168. ])
  3169. CompileC(ipath=IPATH, opts=OPTS, src='bamToEgg.cxx', obj='bam2egg_bamToEgg.obj')
  3170. CompileLink(dll='bam2egg.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3171. 'bam2egg_bamToEgg.obj',
  3172. 'libconverter.lib',
  3173. 'libeggbase.lib',
  3174. 'libprogbase.lib',
  3175. 'libpandatoolbase.lib',
  3176. 'libpandaegg.dll',
  3177. 'libpanda.dll',
  3178. 'libpandaexpress.dll',
  3179. 'libdtoolconfig.dll',
  3180. 'libdtool.dll',
  3181. 'libpystub.dll',
  3182. ])
  3183. CompileC(ipath=IPATH, opts=OPTS, src='eggToBam.cxx', obj='egg2bam_eggToBam.obj')
  3184. CompileLink(dll='egg2bam.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3185. 'egg2bam_eggToBam.obj',
  3186. 'libeggbase.lib',
  3187. 'libprogbase.lib',
  3188. 'libconverter.lib',
  3189. 'libpandatoolbase.lib',
  3190. 'libpandaegg.dll',
  3191. 'libpanda.dll',
  3192. 'libpandaexpress.dll',
  3193. 'libdtoolconfig.dll',
  3194. 'libdtool.dll',
  3195. 'libpystub.dll',
  3196. ])
  3197. #
  3198. # DIRECTORY: pandatool/src/cvscopy/
  3199. #
  3200. IPATH=['pandatool/src/cvscopy']
  3201. OPTS=['NSPR']
  3202. CompileC(ipath=IPATH, opts=OPTS, src='cvscopy_composite1.cxx', obj='cvscopy_composite1.obj')
  3203. CompileLIB(lib='libcvscopy.lib', obj=['cvscopy_composite1.obj'])
  3204. #
  3205. # DIRECTORY: pandatool/src/dxf/
  3206. #
  3207. IPATH=['pandatool/src/dxf']
  3208. OPTS=['NSPR']
  3209. CompileC(ipath=IPATH, opts=OPTS, src='dxf_composite1.cxx', obj='dxf_composite1.obj')
  3210. CompileLIB(lib='libdxf.lib', obj=['dxf_composite1.obj'])
  3211. #
  3212. # DIRECTORY: pandatool/src/dxfegg/
  3213. #
  3214. IPATH=['pandatool/src/dxfegg']
  3215. OPTS=['NSPR']
  3216. CompileC(ipath=IPATH, opts=OPTS, src='dxfToEggConverter.cxx', obj='dxfegg_dxfToEggConverter.obj')
  3217. CompileC(ipath=IPATH, opts=OPTS, src='dxfToEggLayer.cxx', obj='dxfegg_dxfToEggLayer.obj')
  3218. CompileLIB(lib='libdxfegg.lib', obj=[
  3219. 'dxfegg_dxfToEggConverter.obj',
  3220. 'dxfegg_dxfToEggLayer.obj',
  3221. ])
  3222. #
  3223. # DIRECTORY: pandatool/src/dxfprogs/
  3224. #
  3225. IPATH=['pandatool/src/dxfprogs']
  3226. OPTS=['NSPR']
  3227. CompileC(ipath=IPATH, opts=OPTS, src='dxfPoints.cxx', obj='dxf-points_dxfPoints.obj')
  3228. CompileLink(dll='dxf-points.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3229. 'dxf-points_dxfPoints.obj',
  3230. 'libprogbase.lib',
  3231. 'libdxf.lib',
  3232. 'libpandatoolbase.lib',
  3233. 'libpanda.dll',
  3234. 'libpandaexpress.dll',
  3235. 'libdtoolconfig.dll',
  3236. 'libdtool.dll',
  3237. 'libpystub.dll',
  3238. ])
  3239. CompileC(ipath=IPATH, opts=OPTS, src='dxfToEgg.cxx', obj='dxf2egg_dxfToEgg.obj')
  3240. CompileLink(dll='dxf2egg.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3241. 'dxf2egg_dxfToEgg.obj',
  3242. 'libdxfegg.lib',
  3243. 'libdxf.lib',
  3244. 'libeggbase.lib',
  3245. 'libprogbase.lib',
  3246. 'libpandatoolbase.lib',
  3247. 'libconverter.lib',
  3248. 'libpandaegg.dll',
  3249. 'libpanda.dll',
  3250. 'libpandaexpress.dll',
  3251. 'libdtoolconfig.dll',
  3252. 'libdtool.dll',
  3253. 'libpystub.dll',
  3254. ])
  3255. CompileC(ipath=IPATH, opts=OPTS, src='eggToDXF.cxx', obj='egg2dxf_eggToDXF.obj')
  3256. CompileC(ipath=IPATH, opts=OPTS, src='eggToDXFLayer.cxx', obj='egg2dxf_eggToDXFLayer.obj')
  3257. CompileLink(dll='egg2dxf.exe', opts=['ADVAPI', 'NSPR', 'FFTW'], obj=[
  3258. 'egg2dxf_eggToDXF.obj',
  3259. 'egg2dxf_eggToDXFLayer.obj',
  3260. 'libdxf.lib',
  3261. 'libeggbase.lib',
  3262. 'libprogbase.lib',
  3263. 'libpandatoolbase.lib',
  3264. 'libconverter.lib',
  3265. 'libpandaegg.dll',
  3266. 'libpanda.dll',
  3267. 'libpandaexpress.dll',
  3268. 'libdtoolconfig.dll',
  3269. 'libdtool.dll',
  3270. 'libpystub.dll',
  3271. ])
  3272. #
  3273. # DIRECTORY: pandatool/src/palettizer/
  3274. #
  3275. IPATH=['pandatool/src/palettizer']
  3276. OPTS=['NSPR']
  3277. CompileC(ipath=IPATH, opts=OPTS, src='palettizer_composite1.cxx', obj='palettizer_composite1.obj')
  3278. CompileLIB(lib='libpalettizer.lib', obj=['palettizer_composite1.obj'])
  3279. #
  3280. # DIRECTORY: pandatool/src/egg-mkfont/
  3281. #
  3282. if OMIT.count("FREETYPE")==0:
  3283. IPATH=['pandatool/src/egg-mkfont', 'pandatool/src/palettizer']
  3284. OPTS=['NSPR', 'FREETYPE']
  3285. CompileC(ipath=IPATH, opts=OPTS, src='eggMakeFont.cxx', obj='egg-mkfont_eggMakeFont.obj')
  3286. CompileC(ipath=IPATH, opts=OPTS, src='rangeDescription.cxx', obj='egg-mkfont_rangeDescription.obj')
  3287. CompileC(ipath=IPATH, opts=OPTS, src='rangeIterator.cxx', obj='egg-mkfont_rangeIterator.obj')
  3288. CompileLink(dll='egg-mkfont.exe', opts=['ADVAPI', 'NSPR', 'FREETYPE'], obj=[
  3289. 'egg-mkfont_eggMakeFont.obj',
  3290. 'egg-mkfont_rangeDescription.obj',
  3291. 'egg-mkfont_rangeIterator.obj',
  3292. 'libpalettizer.lib',
  3293. 'libeggbase.lib',
  3294. 'libprogbase.lib',
  3295. 'libpandatoolbase.lib',
  3296. 'libconverter.lib',
  3297. 'libpandaegg.dll',
  3298. 'libpanda.dll',
  3299. 'libpandaexpress.dll',
  3300. 'libdtoolconfig.dll',
  3301. 'libdtool.dll',
  3302. 'libpystub.dll',
  3303. ])
  3304. #
  3305. # DIRECTORY: pandatool/src/eggcharbase/
  3306. #
  3307. IPATH=['pandatool/src/eggcharbase']
  3308. OPTS=['ZLIB', 'NSPR']
  3309. CompileC(ipath=IPATH, opts=OPTS, src='eggcharbase_composite1.cxx', obj='eggcharbase_composite1.obj')
  3310. CompileLIB(lib='libeggcharbase.lib', obj=['eggcharbase_composite1.obj'])
  3311. #
  3312. # DIRECTORY: pandatool/src/egg-optchar/
  3313. #
  3314. IPATH=['pandatool/src/egg-optchar']
  3315. OPTS=['NSPR']
  3316. CompileC(ipath=IPATH, opts=OPTS, src='config_egg_optchar.cxx', obj='egg-optchar_config_egg_optchar.obj')
  3317. CompileC(ipath=IPATH, opts=OPTS, src='eggOptchar.cxx', obj='egg-optchar_eggOptchar.obj')
  3318. CompileC(ipath=IPATH, opts=OPTS, src='eggOptcharUserData.cxx', obj='egg-optchar_eggOptcharUserData.obj')
  3319. CompileC(ipath=IPATH, opts=OPTS, src='vertexMembership.cxx', obj='egg-optchar_vertexMembership.obj')
  3320. CompileLink(dll='egg-optchar.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3321. 'egg-optchar_config_egg_optchar.obj',
  3322. 'egg-optchar_eggOptchar.obj',
  3323. 'egg-optchar_eggOptcharUserData.obj',
  3324. 'egg-optchar_vertexMembership.obj',
  3325. 'libeggcharbase.lib',
  3326. 'libconverter.lib',
  3327. 'libeggbase.lib',
  3328. 'libprogbase.lib',
  3329. 'libpandatoolbase.lib',
  3330. 'libpandaegg.dll',
  3331. 'libpanda.dll',
  3332. 'libpandaexpress.dll',
  3333. 'libdtoolconfig.dll',
  3334. 'libdtool.dll',
  3335. 'libpystub.dll',
  3336. ])
  3337. #
  3338. # DIRECTORY: pandatool/src/egg-palettize/
  3339. #
  3340. IPATH=['pandatool/src/egg-palettize', 'pandatool/src/palettizer']
  3341. OPTS=['NSPR']
  3342. CompileC(ipath=IPATH, opts=OPTS, src='eggPalettize.cxx', obj='egg-palettize_eggPalettize.obj')
  3343. CompileLink(dll='egg-palettize.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3344. 'egg-palettize_eggPalettize.obj',
  3345. 'libpalettizer.lib',
  3346. 'libeggbase.lib',
  3347. 'libprogbase.lib',
  3348. 'libpandatoolbase.lib',
  3349. 'libconverter.lib',
  3350. 'libpandaegg.dll',
  3351. 'libpanda.dll',
  3352. 'libpandaexpress.dll',
  3353. 'libdtoolconfig.dll',
  3354. 'libdtool.dll',
  3355. 'libpystub.dll',
  3356. ])
  3357. #
  3358. # DIRECTORY: pandatool/src/egg-qtess/
  3359. #
  3360. IPATH=['pandatool/src/egg-qtess']
  3361. OPTS=['NSPR']
  3362. CompileC(ipath=IPATH, opts=OPTS, src='egg-qtess_composite1.cxx', obj='egg-qtess_composite1.obj')
  3363. CompileLink(dll='egg-qtess.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3364. 'egg-qtess_composite1.obj',
  3365. 'libeggbase.lib',
  3366. 'libprogbase.lib',
  3367. 'libconverter.lib',
  3368. 'libpandatoolbase.lib',
  3369. 'libpandaegg.dll',
  3370. 'libpanda.dll',
  3371. 'libpandaexpress.dll',
  3372. 'libdtoolconfig.dll',
  3373. 'libdtool.dll',
  3374. 'libpystub.dll',
  3375. ])
  3376. #
  3377. # DIRECTORY: pandatool/src/eggprogs/
  3378. #
  3379. IPATH=['pandatool/src/eggprogs']
  3380. OPTS=['NSPR']
  3381. CompileC(ipath=IPATH, opts=OPTS, src='eggCrop.cxx', obj='egg-crop_eggCrop.obj')
  3382. CompileLink(dll='egg-crop.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3383. 'egg-crop_eggCrop.obj',
  3384. 'libconverter.lib',
  3385. 'libeggbase.lib',
  3386. 'libprogbase.lib',
  3387. 'libpandatoolbase.lib',
  3388. 'libpandaegg.dll',
  3389. 'libpanda.dll',
  3390. 'libpandaexpress.dll',
  3391. 'libdtoolconfig.dll',
  3392. 'libdtool.dll',
  3393. 'libpystub.dll',
  3394. ])
  3395. CompileC(ipath=IPATH, opts=OPTS, src='eggMakeTube.cxx', obj='egg-make-tube_eggMakeTube.obj')
  3396. CompileLink(dll='egg-make-tube.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3397. 'egg-make-tube_eggMakeTube.obj',
  3398. 'libconverter.lib',
  3399. 'libeggbase.lib',
  3400. 'libprogbase.lib',
  3401. 'libpandatoolbase.lib',
  3402. 'libpandaegg.dll',
  3403. 'libpanda.dll',
  3404. 'libpandaexpress.dll',
  3405. 'libdtoolconfig.dll',
  3406. 'libdtool.dll',
  3407. 'libpystub.dll',
  3408. ])
  3409. CompileC(ipath=IPATH, opts=OPTS, src='eggTextureCards.cxx', obj='egg-texture-cards_eggTextureCards.obj')
  3410. CompileLink(dll='egg-texture-cards.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3411. 'egg-texture-cards_eggTextureCards.obj',
  3412. 'libconverter.lib',
  3413. 'libeggbase.lib',
  3414. 'libprogbase.lib',
  3415. 'libpandatoolbase.lib',
  3416. 'libpandaegg.dll',
  3417. 'libpanda.dll',
  3418. 'libpandaexpress.dll',
  3419. 'libdtoolconfig.dll',
  3420. 'libdtool.dll',
  3421. 'libpystub.dll',
  3422. ])
  3423. CompileC(ipath=IPATH, opts=OPTS, src='eggTopstrip.cxx', obj='egg-topstrip_eggTopstrip.obj')
  3424. CompileLink(dll='egg-topstrip.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3425. 'egg-topstrip_eggTopstrip.obj',
  3426. 'libeggcharbase.lib',
  3427. 'libconverter.lib',
  3428. 'libeggbase.lib',
  3429. 'libprogbase.lib',
  3430. 'libpandatoolbase.lib',
  3431. 'libpandaegg.dll',
  3432. 'libpanda.dll',
  3433. 'libpandaexpress.dll',
  3434. 'libdtoolconfig.dll',
  3435. 'libdtool.dll',
  3436. 'libpystub.dll',
  3437. ])
  3438. CompileC(ipath=IPATH, opts=OPTS, src='eggTrans.cxx', obj='egg-trans_eggTrans.obj')
  3439. CompileLink(dll='egg-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3440. 'egg-trans_eggTrans.obj',
  3441. 'libconverter.lib',
  3442. 'libeggbase.lib',
  3443. 'libprogbase.lib',
  3444. 'libpandatoolbase.lib',
  3445. 'libpandaegg.dll',
  3446. 'libpanda.dll',
  3447. 'libpandaexpress.dll',
  3448. 'libdtoolconfig.dll',
  3449. 'libdtool.dll',
  3450. 'libpystub.dll',
  3451. ])
  3452. CompileC(ipath=IPATH, opts=OPTS, src='eggToC.cxx', obj='egg2c_eggToC.obj')
  3453. CompileLink(dll='egg2c.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3454. 'egg2c_eggToC.obj',
  3455. 'libconverter.lib',
  3456. 'libeggbase.lib',
  3457. 'libprogbase.lib',
  3458. 'libpandatoolbase.lib',
  3459. 'libpandaegg.dll',
  3460. 'libpanda.dll',
  3461. 'libpandaexpress.dll',
  3462. 'libdtoolconfig.dll',
  3463. 'libdtool.dll',
  3464. 'libpystub.dll',
  3465. ])
  3466. #
  3467. # DIRECTORY: pandatool/src/flt/
  3468. #
  3469. IPATH=['pandatool/src/flt']
  3470. OPTS=['NSPR']
  3471. CompileC(ipath=IPATH, opts=OPTS, src='fltVectorRecord.cxx', obj='flt_fltVectorRecord.obj')
  3472. CompileC(ipath=IPATH, opts=OPTS, src='flt_composite1.cxx', obj='flt_composite1.obj')
  3473. CompileLIB(lib='libflt.lib', obj=['flt_fltVectorRecord.obj', 'flt_composite1.obj'])
  3474. #
  3475. # DIRECTORY: pandatool/src/fltegg/
  3476. #
  3477. IPATH=['pandatool/src/fltegg']
  3478. OPTS=['NSPR']
  3479. CompileC(ipath=IPATH, opts=OPTS, src='fltToEggConverter.cxx', obj='fltegg_fltToEggConverter.obj')
  3480. CompileC(ipath=IPATH, opts=OPTS, src='fltToEggLevelState.cxx', obj='fltegg_fltToEggLevelState.obj')
  3481. CompileLIB(lib='libfltegg.lib', obj=['fltegg_fltToEggConverter.obj', 'fltegg_fltToEggLevelState.obj'])
  3482. #
  3483. # DIRECTORY: pandatool/src/fltprogs/
  3484. #
  3485. IPATH=['pandatool/src/fltprogs', 'pandatool/src/flt', 'pandatool/src/cvscopy']
  3486. OPTS=['NSPR']
  3487. CompileC(ipath=IPATH, opts=OPTS, src='eggToFlt.cxx', obj='egg2flt_eggToFlt.obj')
  3488. CompileLink(dll='egg2flt.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3489. 'egg2flt_eggToFlt.obj',
  3490. 'libflt.lib',
  3491. 'libeggbase.lib',
  3492. 'libprogbase.lib',
  3493. 'libconverter.lib',
  3494. 'libpandatoolbase.lib',
  3495. 'libpandaegg.dll',
  3496. 'libpanda.dll',
  3497. 'libpandaexpress.dll',
  3498. 'libdtoolconfig.dll',
  3499. 'libdtool.dll',
  3500. 'libpystub.dll',
  3501. ])
  3502. CompileC(ipath=IPATH, opts=OPTS, src='fltInfo.cxx', obj='flt-info_fltInfo.obj')
  3503. CompileLink(dll='flt-info.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3504. 'flt-info_fltInfo.obj',
  3505. 'libprogbase.lib',
  3506. 'libflt.lib',
  3507. 'libpandatoolbase.lib',
  3508. 'libconverter.lib',
  3509. 'libpandaegg.dll',
  3510. 'libpanda.dll',
  3511. 'libpandaexpress.dll',
  3512. 'libdtoolconfig.dll',
  3513. 'libdtool.dll',
  3514. 'libpystub.dll',
  3515. ])
  3516. CompileC(ipath=IPATH, opts=OPTS, src='fltTrans.cxx', obj='flt-trans_fltTrans.obj')
  3517. CompileLink(dll='flt-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3518. 'flt-trans_fltTrans.obj',
  3519. 'libprogbase.lib',
  3520. 'libflt.lib',
  3521. 'libpandatoolbase.lib',
  3522. 'libconverter.lib',
  3523. 'libpandaegg.dll',
  3524. 'libpanda.dll',
  3525. 'libpandaexpress.dll',
  3526. 'libdtoolconfig.dll',
  3527. 'libdtool.dll',
  3528. 'libpystub.dll',
  3529. ])
  3530. CompileC(ipath=IPATH, opts=OPTS, src='fltToEgg.cxx', obj='flt2egg_fltToEgg.obj')
  3531. CompileLink(dll='flt2egg.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3532. 'flt2egg_fltToEgg.obj',
  3533. 'libflt.lib',
  3534. 'libfltegg.lib',
  3535. 'libeggbase.lib',
  3536. 'libprogbase.lib',
  3537. 'libconverter.lib',
  3538. 'libpandatoolbase.lib',
  3539. 'libpandaegg.dll',
  3540. 'libpanda.dll',
  3541. 'libpandaexpress.dll',
  3542. 'libdtoolconfig.dll',
  3543. 'libdtool.dll',
  3544. 'libpystub.dll',
  3545. ])
  3546. CompileC(ipath=IPATH, opts=OPTS, src='fltCopy.cxx', obj='fltcopy_fltCopy.obj')
  3547. CompileLink(dll='fltcopy.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3548. 'fltcopy_fltCopy.obj',
  3549. 'libcvscopy.lib',
  3550. 'libflt.lib',
  3551. 'libprogbase.lib',
  3552. 'libpandatoolbase.lib',
  3553. 'libconverter.lib',
  3554. 'libpandaegg.dll',
  3555. 'libpanda.dll',
  3556. 'libpandaexpress.dll',
  3557. 'libdtoolconfig.dll',
  3558. 'libdtool.dll',
  3559. 'libpystub.dll',
  3560. ])
  3561. #
  3562. # DIRECTORY: pandatool/src/imagebase/
  3563. #
  3564. IPATH=['pandatool/src/imagebase']
  3565. OPTS=['NSPR']
  3566. CompileC(ipath=IPATH, opts=OPTS, src='imagebase_composite1.cxx', obj='imagebase_composite1.obj')
  3567. CompileLIB(lib='libimagebase.lib', obj=['imagebase_composite1.obj'])
  3568. #
  3569. # DIRECTORY: pandatool/src/imageprogs/
  3570. #
  3571. IPATH=['pandatool/src/imageprogs']
  3572. OPTS=['NSPR']
  3573. CompileC(ipath=IPATH, opts=OPTS, src='imageInfo.cxx', obj='image-info_imageInfo.obj')
  3574. CompileLink(dll='image-info.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3575. 'image-info_imageInfo.obj',
  3576. 'libimagebase.lib',
  3577. 'libprogbase.lib',
  3578. 'libpandatoolbase.lib',
  3579. 'libpandaegg.dll',
  3580. 'libpanda.dll',
  3581. 'libpandaexpress.dll',
  3582. 'libdtoolconfig.dll',
  3583. 'libdtool.dll',
  3584. 'libpystub.dll',
  3585. ])
  3586. CompileC(ipath=IPATH, opts=OPTS, src='imageResize.cxx', obj='image-resize_imageResize.obj')
  3587. CompileLink(dll='image-resize.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3588. 'image-resize_imageResize.obj',
  3589. 'libimagebase.lib',
  3590. 'libprogbase.lib',
  3591. 'libpandatoolbase.lib',
  3592. 'libpandaegg.dll',
  3593. 'libpanda.dll',
  3594. 'libpandaexpress.dll',
  3595. 'libdtoolconfig.dll',
  3596. 'libdtool.dll',
  3597. 'libpystub.dll',
  3598. ])
  3599. CompileC(ipath=IPATH, opts=OPTS, src='imageTrans.cxx', obj='image-trans_imageTrans.obj')
  3600. CompileLink(dll='image-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3601. 'image-trans_imageTrans.obj',
  3602. 'libimagebase.lib',
  3603. 'libprogbase.lib',
  3604. 'libpandatoolbase.lib',
  3605. 'libpandaegg.dll',
  3606. 'libpanda.dll',
  3607. 'libpandaexpress.dll',
  3608. 'libdtoolconfig.dll',
  3609. 'libdtool.dll',
  3610. 'libpystub.dll',
  3611. ])
  3612. #
  3613. # DIRECTORY: pandatool/src/lwo/
  3614. #
  3615. IPATH=['pandatool/src/lwo']
  3616. OPTS=['NSPR']
  3617. CompileC(ipath=IPATH, opts=OPTS, src='lwo_composite1.cxx', obj='lwo_composite1.obj')
  3618. CompileLIB(lib='liblwo.lib', obj=['lwo_composite1.obj'])
  3619. #
  3620. # DIRECTORY: pandatool/src/lwoegg/
  3621. #
  3622. IPATH=['pandatool/src/lwoegg']
  3623. OPTS=['NSPR']
  3624. CompileC(ipath=IPATH, opts=OPTS, src='lwoegg_composite1.cxx', obj='lwoegg_composite1.obj')
  3625. CompileLIB(lib='liblwoegg.lib', obj=['lwoegg_composite1.obj'])
  3626. #
  3627. # DIRECTORY: pandatool/src/lwoprogs/
  3628. #
  3629. IPATH=['pandatool/src/lwoprogs', 'pandatool/src/lwo']
  3630. OPTS=['NSPR']
  3631. CompileC(ipath=IPATH, opts=OPTS, src='lwoScan.cxx', obj='lwo-scan_lwoScan.obj')
  3632. CompileLink(dll='lwo-scan.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3633. 'lwo-scan_lwoScan.obj',
  3634. 'liblwo.lib',
  3635. 'libprogbase.lib',
  3636. 'libpandatoolbase.lib',
  3637. 'libpandaegg.dll',
  3638. 'libpanda.dll',
  3639. 'libpandaexpress.dll',
  3640. 'libdtoolconfig.dll',
  3641. 'libdtool.dll',
  3642. 'libpystub.dll',
  3643. ])
  3644. CompileC(ipath=IPATH, opts=OPTS, src='lwoToEgg.cxx', obj='lwo2egg_lwoToEgg.obj')
  3645. CompileLink(dll='lwo2egg.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3646. 'lwo2egg_lwoToEgg.obj',
  3647. 'liblwo.lib',
  3648. 'liblwoegg.lib',
  3649. 'libeggbase.lib',
  3650. 'libprogbase.lib',
  3651. 'libpandatoolbase.lib',
  3652. 'libconverter.lib',
  3653. 'libpandaegg.dll',
  3654. 'libpanda.dll',
  3655. 'libpandaexpress.dll',
  3656. 'libdtoolconfig.dll',
  3657. 'libdtool.dll',
  3658. 'libpystub.dll',
  3659. ])
  3660. #
  3661. # DIRECTORY: pandatool/src/maya/
  3662. #
  3663. for VER in ["5","6","65"]:
  3664. if (OMIT.count("MAYA"+VER)==0):
  3665. IPATH=['pandatool/src/maya']
  3666. OPTS=['MAYA'+VER, 'NSPR']
  3667. CompileC(ipath=IPATH, opts=OPTS, src='maya_composite1.cxx', obj='maya'+VER+'_composite1.obj')
  3668. CompileLIB(lib='libmaya'+VER+'.lib', obj=[ 'maya'+VER+'_composite1.obj' ])
  3669. #
  3670. # DIRECTORY: pandatool/src/mayaegg/
  3671. #
  3672. for VER in ["5","6","65"]:
  3673. if (OMIT.count("MAYA"+VER)==0):
  3674. IPATH=['pandatool/src/mayaegg', 'pandatool/src/maya']
  3675. OPTS=['MAYA'+VER, 'NSPR']
  3676. CompileC(ipath=IPATH, opts=OPTS, src='mayaegg_composite1.cxx', obj='mayaegg'+VER+'_composite1.obj')
  3677. CompileLIB(lib='libmayaegg'+VER+'.lib', obj=[ 'mayaegg'+VER+'_composite1.obj' ])
  3678. #
  3679. # DIRECTORY: pandatool/src/maxegg/
  3680. #
  3681. for VER in ["5", "6", "7"]:
  3682. if (OMIT.count("MAX"+VER)==0):
  3683. IPATH=['pandatool/src/maxegg']
  3684. OPTS=['MAX'+VER, 'NSPR', "WINCOMCTL", "WINCOMDLG", "WINUSER", "MAXEGGDEF"]
  3685. CompileRES(ipath=IPATH, opts=OPTS, src='MaxEgg.rc', obj='maxegg'+VER+'_MaxEgg.res')
  3686. CompileC(ipath=IPATH, opts=OPTS, src='maxegg_composite1.cxx',obj='maxegg'+VER+'_composite1.obj')
  3687. CompileLink(opts=OPTS, dll='maxegg'+VER+'.dlo', obj=[
  3688. 'maxegg'+VER+'_composite1.obj',
  3689. 'maxegg'+VER+'_MaxEgg.res',
  3690. 'libeggbase.lib',
  3691. 'libprogbase.lib',
  3692. 'libpandatoolbase.lib',
  3693. 'libconverter.lib',
  3694. 'libpandaegg.dll',
  3695. 'libpanda.dll',
  3696. 'libpandaexpress.dll',
  3697. 'libdtoolconfig.dll',
  3698. 'libdtool.dll',
  3699. 'libpystub.dll'
  3700. ])
  3701. #
  3702. # DIRECTORY: pandatool/src/vrml/
  3703. #
  3704. CompileBison(pre='vrmlyy', dstc='vrmlParser.cxx', dsth='vrmlParser.h', src='pandatool/src/vrml/vrmlParser.yxx')
  3705. CompileFlex(pre='vrmlyy', dst='vrmlLexer.cxx', src='pandatool/src/vrml/vrmlLexer.lxx', dashi=0)
  3706. IPATH=['pandatool/src/vrml']
  3707. OPTS=['ZLIB', 'NSPR']
  3708. CompileC(ipath=IPATH, opts=OPTS, src='parse_vrml.cxx', obj='pvrml_parse_vrml.obj')
  3709. CompileC(ipath=IPATH, opts=OPTS, src='standard_nodes.cxx', obj='pvrml_standard_nodes.obj')
  3710. CompileC(ipath=IPATH, opts=OPTS, src='vrmlNode.cxx', obj='pvrml_vrmlNode.obj')
  3711. CompileC(ipath=IPATH, opts=OPTS, src='vrmlNodeType.cxx', obj='pvrml_vrmlNodeType.obj')
  3712. CompileC(ipath=IPATH, opts=OPTS, src='vrmlParser.cxx', obj='pvrml_vrmlParser.obj')
  3713. CompileC(ipath=IPATH, opts=OPTS, src='vrmlLexer.cxx', obj='pvrml_vrmlLexer.obj')
  3714. CompileLIB(lib='libpvrml.lib', obj=[
  3715. 'pvrml_parse_vrml.obj',
  3716. 'pvrml_standard_nodes.obj',
  3717. 'pvrml_vrmlNode.obj',
  3718. 'pvrml_vrmlNodeType.obj',
  3719. 'pvrml_vrmlParser.obj',
  3720. 'pvrml_vrmlLexer.obj',
  3721. ])
  3722. #
  3723. # DIRECTORY: pandatool/src/vrmlegg/
  3724. #
  3725. IPATH=['pandatool/src/vrmlegg', 'pandatool/src/vrml']
  3726. OPTS=['NSPR']
  3727. CompileC(ipath=IPATH, opts=OPTS, src='indexedFaceSet.cxx', obj='vrmlegg_indexedFaceSet.obj')
  3728. CompileC(ipath=IPATH, opts=OPTS, src='vrmlAppearance.cxx', obj='vrmlegg_vrmlAppearance.obj')
  3729. CompileC(ipath=IPATH, opts=OPTS, src='vrmlToEggConverter.cxx', obj='vrmlegg_vrmlToEggConverter.obj')
  3730. CompileLIB(lib='libvrmlegg.lib', obj=[
  3731. 'vrmlegg_indexedFaceSet.obj',
  3732. 'vrmlegg_vrmlAppearance.obj',
  3733. 'vrmlegg_vrmlToEggConverter.obj',
  3734. ])
  3735. #
  3736. # DIRECTORY: pandatool/src/xfile/
  3737. #
  3738. CompileBison(pre='xyy', dstc='xParser.cxx', dsth='xParser.h', src='pandatool/src/xfile/xParser.yxx')
  3739. CompileFlex(pre='xyy', dst='xLexer.cxx', src='pandatool/src/xfile/xLexer.lxx', dashi=1)
  3740. IPATH=['pandatool/src/xfile']
  3741. OPTS=['ZLIB', 'NSPR']
  3742. CompileC(ipath=IPATH, opts=OPTS, src='xfile_composite1.cxx', obj='xfile_composite1.obj')
  3743. CompileC(ipath=IPATH, opts=OPTS, src='xParser.cxx', obj='xfile_xParser.obj')
  3744. CompileC(ipath=IPATH, opts=OPTS, src='xLexer.cxx', obj='xfile_xLexer.obj')
  3745. CompileLIB(lib='libxfile.lib', obj=[
  3746. 'xfile_composite1.obj',
  3747. 'xfile_xParser.obj',
  3748. 'xfile_xLexer.obj',
  3749. ])
  3750. #
  3751. # DIRECTORY: pandatool/src/xfileegg/
  3752. #
  3753. IPATH=['pandatool/src/xfileegg', 'pandatool/src/xfile']
  3754. OPTS=['NSPR']
  3755. CompileC(ipath=IPATH, opts=OPTS, src='xfileegg_composite1.cxx', obj='xfileegg_composite1.obj')
  3756. CompileLIB(lib='libxfileegg.lib', obj=[
  3757. 'xfileegg_composite1.obj',
  3758. ])
  3759. #
  3760. # DIRECTORY: pandatool/src/ptloader/
  3761. #
  3762. IPATH=['pandatool/src/ptloader', 'pandatool/src/flt', 'pandatool/src/lwo', 'pandatool/src/xfile', 'pandatool/src/xfileegg']
  3763. OPTS=['BUILDING_PTLOADER', 'NSPR']
  3764. CompileC(ipath=IPATH, opts=OPTS, src='config_ptloader.cxx', obj='ptloader_config_ptloader.obj')
  3765. CompileC(ipath=IPATH, opts=OPTS, src='loaderFileTypePandatool.cxx', obj='ptloader_loaderFileTypePandatool.obj')
  3766. CompileLink(dll='libptloader.dll', opts=['ADVAPI', 'NSPR'], obj=[
  3767. 'ptloader_config_ptloader.obj',
  3768. 'ptloader_loaderFileTypePandatool.obj',
  3769. 'libfltegg.lib',
  3770. 'libflt.lib',
  3771. 'liblwoegg.lib',
  3772. 'liblwo.lib',
  3773. 'libdxfegg.lib',
  3774. 'libdxf.lib',
  3775. 'libvrmlegg.lib',
  3776. 'libpvrml.lib',
  3777. 'libxfileegg.lib',
  3778. 'libxfile.lib',
  3779. 'libconverter.lib',
  3780. 'libpandatoolbase.lib',
  3781. 'libeggbase.lib',
  3782. 'libprogbase.lib',
  3783. 'libpandaegg.dll',
  3784. 'libpanda.dll',
  3785. 'libpandaexpress.dll',
  3786. 'libdtoolconfig.dll',
  3787. 'libdtool.dll',
  3788. ])
  3789. #
  3790. # DIRECTORY: pandatool/src/mayaprogs/
  3791. #
  3792. for VER in ["5","6","65"]:
  3793. if (OMIT.count('MAYA'+VER)==0):
  3794. IPATH=['pandatool/src/mayaprogs', 'pandatool/src/maya', 'pandatool/src/mayaegg',
  3795. 'pandatool/src/cvscopy']
  3796. OPTS=['BUILDING_MISC', 'MAYA'+VER, 'NSPR']
  3797. CompileC(ipath=IPATH, opts=OPTS, src='config_mayaloader.cxx', obj='mayaloader'+VER+'_config_mayaloader.obj')
  3798. CompileLink(dll='libmayaloader'+VER+'.dll', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3799. 'mayaloader'+VER+'_config_mayaloader.obj',
  3800. 'libmayaegg'+VER+'.lib',
  3801. 'libptloader.lib',
  3802. 'libconverter.lib',
  3803. 'libpandatoolbase.lib',
  3804. 'libmaya'+VER+'.lib',
  3805. 'libfltegg.lib',
  3806. 'libflt.lib',
  3807. 'liblwoegg.lib',
  3808. 'liblwo.lib',
  3809. 'libdxfegg.lib',
  3810. 'libdxf.lib',
  3811. 'libvrmlegg.lib',
  3812. 'libpvrml.lib',
  3813. 'libxfileegg.lib',
  3814. 'libxfile.lib',
  3815. 'libeggbase.lib',
  3816. 'libprogbase.lib',
  3817. 'libpandaegg.dll',
  3818. 'libpanda.dll',
  3819. 'libpandaexpress.dll',
  3820. 'libdtoolconfig.dll',
  3821. 'libdtool.dll',
  3822. ])
  3823. CompileC(ipath=IPATH, opts=OPTS, src='mayaPview.cxx', obj='mayapview'+VER+'_mayaPview.obj')
  3824. CompileLink(dll='libmayapview'+VER+'.mll', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3825. 'mayapview'+VER+'_mayaPview.obj',
  3826. 'libmayaegg'+VER+'.lib',
  3827. 'libmaya'+VER+'.lib',
  3828. 'libconverter.lib',
  3829. 'libpandatoolbase.lib',
  3830. 'libpandaegg.dll',
  3831. 'libframework.dll',
  3832. 'libpanda.dll',
  3833. 'libpandaexpress.dll',
  3834. 'libdtoolconfig.dll',
  3835. 'libdtool.dll',
  3836. 'libpystub.dll',
  3837. ])
  3838. IPATH=['pandatool/src/mayaprogs', 'pandatool/src/maya', 'pandatool/src/mayaegg',
  3839. 'pandatool/src/cvscopy']
  3840. OPTS=['MAYA'+VER, 'NSPR']
  3841. CompileC(ipath=IPATH, opts=OPTS, src='mayaSavePview.cxx', obj='mayasavepview'+VER+'_mayaSavePview.obj')
  3842. CompileLink(dll='libmayasavepview'+VER+'.mll', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3843. 'mayasavepview'+VER+'_mayaSavePview.obj',
  3844. ])
  3845. CompileC(ipath=IPATH, opts=OPTS, src='mayaToEgg.cxx', obj='maya2egg'+VER+'_mayaToEgg.obj')
  3846. CompileLink(dll='maya2egg'+VER+'.exe', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3847. 'maya2egg'+VER+'_mayaToEgg.obj',
  3848. 'libmayaegg'+VER+'.lib',
  3849. 'libmaya'+VER+'.lib',
  3850. 'libeggbase.lib',
  3851. 'libprogbase.lib',
  3852. 'libconverter.lib',
  3853. 'libpandatoolbase.lib',
  3854. 'libpandaegg.dll',
  3855. 'libpanda.dll',
  3856. 'libpandaexpress.dll',
  3857. 'libdtoolconfig.dll',
  3858. 'libdtool.dll',
  3859. 'libpystub.dll',
  3860. ])
  3861. CompileC(ipath=IPATH, opts=OPTS, src='mayaCopy.cxx', obj='mayacopy'+VER+'_mayaCopy.obj')
  3862. CompileLink(dll='mayacopy'+VER+'.exe', opts=['ADVAPI', 'NSPR', 'MAYA'+VER], obj=[
  3863. 'mayacopy'+VER+'_mayaCopy.obj',
  3864. 'libcvscopy.lib',
  3865. 'libmaya'+VER+'.lib',
  3866. 'libprogbase.lib',
  3867. 'libpandatoolbase.lib',
  3868. 'libconverter.lib',
  3869. 'libpandaegg.dll',
  3870. 'libpanda.dll',
  3871. 'libpandaexpress.dll',
  3872. 'libdtoolconfig.dll',
  3873. 'libdtool.dll',
  3874. 'libpystub.dll',
  3875. ])
  3876. #
  3877. # DIRECTORY: pandatool/src/miscprogs/
  3878. #
  3879. IPATH=['pandatool/src/miscprogs']
  3880. OPTS=['NSPR']
  3881. CompileC(ipath=IPATH, opts=OPTS, src='binToC.cxx', obj='bin2c_binToC.obj')
  3882. CompileLink(dll='bin2c.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3883. 'bin2c_binToC.obj',
  3884. 'libprogbase.lib',
  3885. 'libpandatoolbase.lib',
  3886. 'libpanda.dll',
  3887. 'libpandaexpress.dll',
  3888. 'libdtoolconfig.dll',
  3889. 'libdtool.dll',
  3890. 'libpystub.dll',
  3891. ])
  3892. #
  3893. # DIRECTORY: pandatool/src/pstatserver/
  3894. #
  3895. if OMIT.count("NSPR")==0:
  3896. IPATH=['pandatool/src/pstatserver']
  3897. OPTS=['NSPR']
  3898. CompileC(ipath=IPATH, opts=OPTS, src='pstatserver_composite1.cxx', obj='pstatserver_composite1.obj')
  3899. CompileLIB(lib='libpstatserver.lib', obj=[ 'pstatserver_composite1.obj' ])
  3900. #
  3901. # DIRECTORY: pandatool/src/softprogs/
  3902. #
  3903. IPATH=['pandatool/src/softprogs']
  3904. OPTS=['NSPR']
  3905. CompileC(ipath=IPATH, opts=OPTS, src='softCVS.cxx', obj='softcvs_softCVS.obj')
  3906. CompileC(ipath=IPATH, opts=OPTS, src='softFilename.cxx', obj='softcvs_softFilename.obj')
  3907. CompileLink(opts=['ADVAPI', 'NSPR'], dll='softcvs.exe', obj=[
  3908. 'softcvs_softCVS.obj',
  3909. 'softcvs_softFilename.obj',
  3910. 'libprogbase.lib',
  3911. 'libpandatoolbase.lib',
  3912. 'libpandaegg.dll',
  3913. 'libpanda.dll',
  3914. 'libpandaexpress.dll',
  3915. 'libdtoolconfig.dll',
  3916. 'libdtool.dll',
  3917. 'libpystub.dll',
  3918. ])
  3919. #
  3920. # DIRECTORY: pandatool/src/text-stats/
  3921. #
  3922. if OMIT.count("NSPR")==0:
  3923. IPATH=['pandatool/src/text-stats']
  3924. OPTS=['NSPR']
  3925. CompileC(ipath=IPATH, opts=OPTS, src='textMonitor.cxx', obj='text-stats_textMonitor.obj')
  3926. CompileC(ipath=IPATH, opts=OPTS, src='textStats.cxx', obj='text-stats_textStats.obj')
  3927. CompileLink(opts=['ADVAPI', 'NSPR'], dll='text-stats.exe', obj=[
  3928. 'text-stats_textMonitor.obj',
  3929. 'text-stats_textStats.obj',
  3930. 'libprogbase.lib',
  3931. 'libpstatserver.lib',
  3932. 'libpandatoolbase.lib',
  3933. 'libpandaegg.dll',
  3934. 'libpanda.dll',
  3935. 'libpandaexpress.dll',
  3936. 'libdtoolconfig.dll',
  3937. 'libdtool.dll',
  3938. 'libpystub.dll',
  3939. ])
  3940. #
  3941. # DIRECTORY: pandatool/src/vrmlprogs/
  3942. #
  3943. IPATH=['pandatool/src/vrmlprogs', 'pandatool/src/vrml', 'pandatool/src/vrmlegg']
  3944. OPTS=['NSPR']
  3945. CompileC(ipath=IPATH, opts=OPTS, src='vrmlTrans.cxx', obj='vrml-trans_vrmlTrans.obj')
  3946. CompileLink(opts=['ADVAPI', 'NSPR'], dll='vrml-trans.exe', obj=[
  3947. 'vrml-trans_vrmlTrans.obj',
  3948. 'libprogbase.lib',
  3949. 'libpvrml.lib',
  3950. 'libpandatoolbase.lib',
  3951. 'libpanda.dll',
  3952. 'libpandaexpress.dll',
  3953. 'libdtoolconfig.dll',
  3954. 'libdtool.dll',
  3955. 'libpystub.dll',
  3956. ])
  3957. CompileC(ipath=IPATH, opts=OPTS, src='vrmlToEgg.cxx', obj='vrml2egg_vrmlToEgg.obj')
  3958. CompileLink(opts=['ADVAPI', 'NSPR'], dll='vrml2egg.exe', obj=[
  3959. 'vrml2egg_vrmlToEgg.obj',
  3960. 'libvrmlegg.lib',
  3961. 'libpvrml.lib',
  3962. 'libeggbase.lib',
  3963. 'libprogbase.lib',
  3964. 'libpandatoolbase.lib',
  3965. 'libconverter.lib',
  3966. 'libpandaegg.dll',
  3967. 'libpanda.dll',
  3968. 'libpandaexpress.dll',
  3969. 'libdtoolconfig.dll',
  3970. 'libdtool.dll',
  3971. 'libpystub.dll',
  3972. ])
  3973. #
  3974. # DIRECTORY: pandatool/src/win-stats/
  3975. #
  3976. if (OMIT.count("NSPR")==0) and (sys.platform == "win32" or sys.platform == "cygwin"):
  3977. IPATH=['pandatool/src/win-stats']
  3978. OPTS=['NSPR']
  3979. CompileC(ipath=IPATH, opts=OPTS, src='winstats_composite1.cxx', obj='pstats_composite1.obj')
  3980. CompileLink(opts=['WINSOCK', 'WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NSPR'],
  3981. dll='pstats.exe', obj=[
  3982. 'pstats_composite1.obj',
  3983. 'libprogbase.lib',
  3984. 'libpstatserver.lib',
  3985. 'libpandatoolbase.lib',
  3986. 'libpandaexpress.dll',
  3987. 'libpanda.dll',
  3988. 'libdtoolconfig.dll',
  3989. 'libdtool.dll',
  3990. 'libpystub.dll',
  3991. ])
  3992. #
  3993. # DIRECTORY: pandatool/src/xfileprogs/
  3994. #
  3995. IPATH=['pandatool/src/xfileprogs', 'pandatool/src/xfile', 'pandatool/src/xfileegg']
  3996. OPTS=['NSPR']
  3997. CompileC(ipath=IPATH, opts=OPTS, src='eggToX.cxx', obj='egg2x_eggToX.obj')
  3998. CompileLink(dll='egg2x.exe', opts=['ADVAPI', 'NSPR'], obj=[
  3999. 'egg2x_eggToX.obj',
  4000. 'libxfileegg.lib',
  4001. 'libxfile.lib',
  4002. 'libeggbase.lib',
  4003. 'libprogbase.lib',
  4004. 'libpandatoolbase.lib',
  4005. 'libconverter.lib',
  4006. 'libpandaegg.dll',
  4007. 'libpanda.dll',
  4008. 'libpandaexpress.dll',
  4009. 'libdtoolconfig.dll',
  4010. 'libdtool.dll',
  4011. 'libpystub.dll',
  4012. ])
  4013. CompileC(ipath=IPATH, opts=OPTS, src='xFileTrans.cxx', obj='x-trans_xFileTrans.obj')
  4014. CompileLink(dll='x-trans.exe', opts=['ADVAPI', 'NSPR'], obj=[
  4015. 'x-trans_xFileTrans.obj',
  4016. 'libprogbase.lib',
  4017. 'libxfile.lib',
  4018. 'libpandatoolbase.lib',
  4019. 'libpanda.dll',
  4020. 'libpandaexpress.dll',
  4021. 'libdtoolconfig.dll',
  4022. 'libdtool.dll',
  4023. 'libpystub.dll',
  4024. ])
  4025. CompileC(ipath=IPATH, opts=OPTS, src='xFileToEgg.cxx', obj='x2egg_xFileToEgg.obj')
  4026. CompileLink(opts=['ADVAPI', 'NSPR'], dll='x2egg.exe', obj=[
  4027. 'x2egg_xFileToEgg.obj',
  4028. 'libxfileegg.lib',
  4029. 'libxfile.lib',
  4030. 'libconverter.lib',
  4031. 'libeggbase.lib',
  4032. 'libprogbase.lib',
  4033. 'libpandatoolbase.lib',
  4034. 'libpandaegg.dll',
  4035. 'libpanda.dll',
  4036. 'libpandaexpress.dll',
  4037. 'libdtoolconfig.dll',
  4038. 'libdtool.dll',
  4039. 'libpystub.dll',
  4040. ])
  4041. #
  4042. # DIRECTORY: pandaapp/src/pandaappbase/
  4043. #
  4044. IPATH=['pandaapp/src/pandaappbase']
  4045. OPTS=['NSPR']
  4046. CompileC(ipath=IPATH, opts=OPTS, src='pandaappbase.cxx', obj='pandaappbase_pandaappbase.obj')
  4047. CompileLIB(lib='libpandaappbase.lib', obj=['pandaappbase_pandaappbase.obj'])
  4048. #
  4049. # DIRECTORY: pandaapp/src/httpbackup/
  4050. #
  4051. if OMIT.count("SSL")==0:
  4052. IPATH=['pandaapp/src/httpbackup', 'pandaapp/src/pandaappbase']
  4053. OPTS=['SSL', 'NSPR']
  4054. CompileC(ipath=IPATH, opts=OPTS, src='backupCatalog.cxx', obj='httpbackup_backupCatalog.obj')
  4055. CompileC(ipath=IPATH, opts=OPTS, src='httpBackup.cxx', obj='httpbackup_httpBackup.obj')
  4056. CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='httpbackup.exe', obj=[
  4057. 'httpbackup_backupCatalog.obj',
  4058. 'httpbackup_httpBackup.obj',
  4059. 'libpandaappbase.lib',
  4060. 'libpandaexpress.dll',
  4061. 'libpanda.dll',
  4062. 'libdtool.dll',
  4063. 'libdtoolconfig.dll',
  4064. 'libprogbase.lib',
  4065. 'libpandatoolbase.lib',
  4066. 'libpystub.dll',
  4067. ])
  4068. #
  4069. # DIRECTORY: pandaapp/src/indexify/
  4070. #
  4071. if OMIT.count("FREETYPE")==0:
  4072. IPATH=['pandaapp/src/indexify']
  4073. OPTS=['NSPR', 'FREETYPE']
  4074. CompileC(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='font-samples_default_font.obj')
  4075. CompileC(ipath=IPATH, opts=OPTS, src='fontSamples.cxx', obj='font-samples_fontSamples.obj')
  4076. CompileLink(opts=['ADVAPI', 'NSPR', 'FREETYPE'], dll='font-samples.exe', obj=[
  4077. 'font-samples_default_font.obj',
  4078. 'font-samples_fontSamples.obj',
  4079. 'libpanda.dll',
  4080. 'libpandaexpress.dll',
  4081. 'libdtool.dll',
  4082. 'libdtoolconfig.dll',
  4083. 'libprogbase.lib',
  4084. 'libpandatoolbase.lib',
  4085. 'libpystub.dll',
  4086. ])
  4087. CompileC(ipath=IPATH, opts=OPTS, src='default_index_icons.cxx', obj='indexify_default_index_icons.obj')
  4088. CompileC(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='indexify_default_font.obj')
  4089. CompileC(ipath=IPATH, opts=OPTS, src='indexImage.cxx', obj='indexify_indexImage.obj')
  4090. CompileC(ipath=IPATH, opts=OPTS, src='indexParameters.cxx', obj='indexify_indexParameters.obj')
  4091. CompileC(ipath=IPATH, opts=OPTS, src='indexify.cxx', obj='indexify_indexify.obj')
  4092. CompileC(ipath=IPATH, opts=OPTS, src='photo.cxx', obj='indexify_photo.obj')
  4093. CompileC(ipath=IPATH, opts=OPTS, src='rollDirectory.cxx', obj='indexify_rollDirectory.obj')
  4094. CompileLink(opts=['ADVAPI', 'NSPR', 'FREETYPE'], dll='indexify.exe', obj=[
  4095. 'indexify_default_index_icons.obj',
  4096. 'indexify_default_font.obj',
  4097. 'indexify_indexImage.obj',
  4098. 'indexify_indexParameters.obj',
  4099. 'indexify_indexify.obj',
  4100. 'indexify_photo.obj',
  4101. 'indexify_rollDirectory.obj',
  4102. 'libpanda.dll',
  4103. 'libpandaexpress.dll',
  4104. 'libdtool.dll',
  4105. 'libdtoolconfig.dll',
  4106. 'libprogbase.lib',
  4107. 'libpandatoolbase.lib',
  4108. 'libpystub.dll',
  4109. ])
  4110. #
  4111. # DIRECTORY: pandaapp/src/stitchbase/
  4112. #
  4113. CompileBison(pre='stitchyy', dstc='stitchParser.cxx', dsth='stitchParser.h', src='pandaapp/src/stitchbase/stitchParser.yxx')
  4114. CompileFlex(pre='stitchyy', dst='stitchLexer.cxx', src='pandaapp/src/stitchbase/stitchLexer.lxx', dashi=1)
  4115. IPATH=['pandaapp/src/stitchbase', 'pandaapp/src/pandaappbase']
  4116. OPTS=['NSPR']
  4117. CompileC(ipath=IPATH, opts=OPTS, src='stitchbase_composite1.cxx', obj='stitchbase_composite1.obj')
  4118. CompileC(ipath=IPATH, opts=OPTS, src='stitchbase_composite2.cxx', obj='stitchbase_composite2.obj')
  4119. CompileC(ipath=IPATH, opts=OPTS, src='stitchParser.cxx', obj='stitchbase_stitchParser.obj')
  4120. CompileC(ipath=IPATH, opts=OPTS, src='stitchLexer.cxx', obj='stitchbase_stitchLexer.obj')
  4121. CompileLIB(lib='libstitchbase.lib', obj=[
  4122. 'stitchbase_composite1.obj',
  4123. 'stitchbase_composite2.obj',
  4124. 'stitchbase_stitchParser.obj',
  4125. 'stitchbase_stitchLexer.obj',
  4126. ])
  4127. #
  4128. # DIRECTORY: pandaapp/src/stitch/
  4129. #
  4130. IPATH=['pandaapp/src/stitch', 'pandaapp/src/stitchbase', 'pandaapp/src/pandaappbase']
  4131. OPTS=['NSPR']
  4132. CompileC(ipath=IPATH, opts=OPTS, src='stitchCommandProgram.cxx', obj='stitch-command_stitchCommandProgram.obj')
  4133. CompileLink(opts=['ADVAPI', 'NSPR', 'FFTW'], dll='stitch-command.exe', obj=[
  4134. 'stitch-command_stitchCommandProgram.obj',
  4135. 'libstitchbase.lib',
  4136. 'libpandaappbase.lib',
  4137. 'libpanda.dll',
  4138. 'libpandaexpress.dll',
  4139. 'libdtoolconfig.dll',
  4140. 'libdtool.dll',
  4141. 'libprogbase.lib',
  4142. 'libpandatoolbase.lib',
  4143. 'libconverter.lib',
  4144. 'libpystub.dll',
  4145. ])
  4146. CompileC(ipath=IPATH, opts=OPTS, src='stitchImageProgram.cxx', obj='stitch-image_stitchImageProgram.obj')
  4147. CompileLink(opts=['ADVAPI', 'NSPR', 'FFTW'], dll='stitch-image.exe', obj=[
  4148. 'stitch-image_stitchImageProgram.obj',
  4149. 'libstitchbase.lib',
  4150. 'libpandaappbase.lib',
  4151. 'libpanda.dll',
  4152. 'libpandaexpress.dll',
  4153. 'libdtoolconfig.dll',
  4154. 'libdtool.dll',
  4155. 'libprogbase.lib',
  4156. 'libpandatoolbase.lib',
  4157. 'libconverter.lib',
  4158. 'libpystub.dll',
  4159. ])
  4160. ##########################################################################################
  4161. #
  4162. # Copy Sounds, Icons, and Models into the build.
  4163. #
  4164. ##########################################################################################
  4165. MakeDirectory(PREFIX+"/models")
  4166. MakeDirectory(PREFIX+"/models/audio")
  4167. MakeDirectory(PREFIX+"/models/audio/sfx")
  4168. MakeDirectory(PREFIX+"/models/icons")
  4169. MakeDirectory(PREFIX+"/models/maps")
  4170. MakeDirectory(PREFIX+"/models/misc")
  4171. MakeDirectory(PREFIX+"/models/gui")
  4172. CopyAllFiles(PREFIX+"/models/audio/sfx/", "dmodels/src/audio/sfx/", ".wav")
  4173. CopyAllFiles(PREFIX+"/models/icons/", "dmodels/src/icons/", ".gif")
  4174. CopyAllFiles(PREFIX+"/models/", "models/", ".egg")
  4175. CopyAllFiles(PREFIX+"/models/", "models/", ".bam")
  4176. CopyAllFiles(PREFIX+"/models/maps/", "models/maps/", ".jpg")
  4177. CopyAllFiles(PREFIX+"/models/maps/", "models/maps/", ".png")
  4178. CopyAllFiles(PREFIX+"/models/maps/", "models/maps/", ".rgb")
  4179. CopyAllFiles(PREFIX+"/models/maps/", "models/maps/", ".rgba")
  4180. CopyAllFiles(PREFIX+"/models/maps/", "dmodels/src/maps/", ".jpg")
  4181. CopyAllFiles(PREFIX+"/models/maps/", "dmodels/src/maps/", ".png")
  4182. CopyAllFiles(PREFIX+"/models/maps/", "dmodels/src/maps/", ".rgb")
  4183. CopyAllFiles(PREFIX+"/models/maps/", "dmodels/src/maps/", ".rgba")
  4184. CompileBAM("../=", PREFIX+"/models/gui/dialog_box_gui.bam", "dmodels/src/gui/dialog_box_gui.flt")
  4185. CompileBAM("../=", PREFIX+"/models/misc/camera.bam", "dmodels/src/misc/camera.flt")
  4186. CompileBAM("../=", PREFIX+"/models/misc/fade.bam", "dmodels/src/misc/fade.flt")
  4187. CompileBAM("../=", PREFIX+"/models/misc/fade_sphere.bam", "dmodels/src/misc/fade_sphere.flt")
  4188. CompileBAM("../=", PREFIX+"/models/misc/gridBack.bam", "dmodels/src/misc/gridBack.flt")
  4189. CompileBAM("../=", PREFIX+"/models/misc/iris.bam", "dmodels/src/misc/iris.flt")
  4190. CompileBAM("../=", PREFIX+"/models/misc/lilsmiley.bam", "dmodels/src/misc/lilsmiley.egg")
  4191. CompileBAM("../=", PREFIX+"/models/misc/objectHandles.bam", "dmodels/src/misc/objectHandles.flt")
  4192. CompileBAM("../=", PREFIX+"/models/misc/rgbCube.bam", "dmodels/src/misc/rgbCube.flt")
  4193. CompileBAM("../=", PREFIX+"/models/misc/smiley.bam", "dmodels/src/misc/smiley.egg")
  4194. CompileBAM("../=", PREFIX+"/models/misc/sphere.bam", "dmodels/src/misc/sphere.flt")
  4195. CompileBAM("../=", PREFIX+"/models/misc/xyzAxis.bam", "dmodels/src/misc/xyzAxis.flt")
  4196. CompileBAM("../=", PREFIX+"/models/misc/Pointlight.bam", "dmodels/src/misc/Pointlight.egg")
  4197. CompileBAM("../=", PREFIX+"/models/misc/Dirlight.bam", "dmodels/src/misc/Dirlight.egg")
  4198. CompileBAM("../=", PREFIX+"/models/misc/Spotlight.bam", "dmodels/src/misc/Spotlight.egg")
  4199. ##########################################################################################
  4200. #
  4201. # Run genpycode
  4202. #
  4203. ##########################################################################################
  4204. if (older(PREFIX+'/pandac/PandaModules.pyz',xpaths(PREFIX+"/pandac/input/",ALLIN,""))):
  4205. ALLTARGETS.append(PREFIX+'/pandac/PandaModules.pyz')
  4206. if (sys.platform=="win32" or sys.platform == "cygwin"):
  4207. if (GENMAN): oscmd(PREFIX+"/bin/genpycode.exe -m")
  4208. else : oscmd(PREFIX+"/bin/genpycode.exe")
  4209. else:
  4210. if (GENMAN): oscmd(PREFIX+"/bin/genpycode -m")
  4211. else : oscmd(PREFIX+"/bin/genpycode")
  4212. updatefiledate(PREFIX+'/pandac/PandaModules.pyz')
  4213. ########################################################################
  4214. ##
  4215. ## Save the CXX include-cache for next time.
  4216. ##
  4217. ########################################################################
  4218. try: icache = open(iCachePath,'wb')
  4219. except: icache = 0
  4220. if (icache!=0):
  4221. cPickle.dump(CxxIncludeCache, icache, 1)
  4222. icache.close()
  4223. ##########################################################################################
  4224. #
  4225. # 'Complete' mode.
  4226. #
  4227. # Copies the samples and direct into the build. Note that
  4228. # this isn't usually what you want. It is usually better to let the
  4229. # compiled panda load this stuff directly from the source tree.
  4230. # The only time you really want to do this is if you plan to move
  4231. # the build somewhere and leave the source tree behind.
  4232. #
  4233. ##########################################################################################
  4234. if (COMPLETE):
  4235. CopyFile(PREFIX+'/', 'InstallerNotes')
  4236. CopyFile(PREFIX+'/', 'LICENSE')
  4237. CopyFile(PREFIX+'/', 'README')
  4238. CopyTree(PREFIX+'/samples', 'samples')
  4239. CopyTree(PREFIX+'/direct/src', 'direct/src')
  4240. CopyTree(PREFIX+'/SceneEditor', 'SceneEditor')
  4241. ##########################################################################################
  4242. #
  4243. # The Installers
  4244. #
  4245. ##########################################################################################
  4246. if (sys.platform == "win32" or sys.platform == "cygwin"):
  4247. def MakeInstaller(file,fullname,smdirectory,uninstallkey,installdir,ppgame):
  4248. if (older(file, ALLTARGETS)):
  4249. print "Building "+fullname+" installer. This can take up to an hour."
  4250. if (COMPRESSOR != "lzma"):
  4251. print("Note: you are using zlib, which is faster, but lzma gives better compression.")
  4252. if (os.path.exists(file)):
  4253. os.remove(file)
  4254. if (os.path.exists("nsis-output.exe")):
  4255. os.remove("nsis-output.exe")
  4256. def0 = '/DCOMPRESSOR="' + COMPRESSOR + '" '
  4257. def1 = '/DFULLNAME="' + fullname + '" '
  4258. def2 = '/DSMDIRECTORY="' + smdirectory + '" '
  4259. def3 = '/DUNINSTALLKEY="' + uninstallkey + '" '
  4260. def4 = '/DINSTALLDIR="' + installdir + '" '
  4261. def5 = ''
  4262. if (ppgame): def5 = '/DPPGAME="' + ppgame + '" '
  4263. oscmd("thirdparty/win-nsis/makensis.exe /V2 "+def0+def1+def2+def3+def4+def5+" makepanda/panda.nsi")
  4264. os.rename("nsis-output.exe", file)
  4265. if (INSTALLER!=0):
  4266. MakeInstaller("Panda3D-"+VERSION+".exe", "Panda3D", "Panda3D "+VERSION,
  4267. "Panda3D "+VERSION, "C:\\Panda3D-"+VERSION, 0)
  4268. if (PPGAME!=0):
  4269. if (os.path.isdir(PPGAME)==0):
  4270. sys.exit("No such directory "+PPGAME)
  4271. if (os.path.exists(os.path.join(PPGAME,PPGAME+".py"))==0):
  4272. sys.exit("No such file "+PPGAME+"/"+PPGAME+".py")
  4273. MakeInstaller(PPGAME+"-"+VERSION+".exe", PPGAME, PPGAME+" "+VERSION,
  4274. PPGAME+" "+VERSION, "C:\\"+PPGAME+"-"+VERSION, PPGAME)
  4275. ##########################################################################################
  4276. #
  4277. # Print final status report.
  4278. #
  4279. ##########################################################################################
  4280. WARNINGS.append("Elapsed Time: "+prettyTime(time.time() - STARTTIME))
  4281. printStatus("Makepanda Final Status Report", WARNINGS)