makepanda.py 190 KB

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