makepanda.py 190 KB

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