makepanda.py 188 KB

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