| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747 |
- #!/usr/bin/python
- ########################################################################
- #
- # Caution: there are two separate, independent build systems:
- # 'makepanda', and 'ppremake'. Use one or the other, do not attempt
- # to use both. This file is part of the 'makepanda' system.
- #
- # To build panda using this script, type 'makepanda.py' on unix
- # or 'makepanda.bat' on windows, and examine the help-text.
- # Then run the script again with the appropriate options to compile
- # panda3d.
- #
- ########################################################################
- import sys,os,time,stat,string,re,getopt,cPickle,fnmatch,threading,Queue,signal
- from glob import glob
- ########################################################################
- ##
- ## PARSING THE COMMAND LINE OPTIONS
- ##
- ## You might be tempted to change the defaults by editing them
- ## here. Don't do it. Instead, create a script that compiles
- ## panda with your preferred options. Or, create
- ## a 'makepandaPreferences' file and put it into your python path.
- ##
- ########################################################################
- COMPILER=0
- THIRDPARTYLIBS=0
- VC80CRTVERSION=""
- OPTIMIZE="3"
- INSTALLER=0
- GENMAN=0
- VERSION=0
- VERBOSE=1
- COMPRESSOR="zlib"
- PACKAGES=["PYTHON","ZLIB","PNG","JPEG","TIFF","VRPN","FMODEX","NVIDIACG",
- "OPENSSL","FREETYPE","FFTW","MILES",
- "MAYA6","MAYA65","MAYA7","MAYA8","MAYA85","MAX6","MAX7","MAX8",
- "FFMPEG","PANDATOOL","PANDAAPP","DX8","DX9"]
- OMIT=PACKAGES[:]
- WARNINGS=[]
- DIRECTXSDK = {}
- MAYASDK = {}
- MAXSDK = {}
- MAXSDKCS = {}
- PYTHONSDK=0
- STARTTIME=time.time()
- SLAVEFILE=0
- DEPENDENCYQUEUE=[]
- TIMESTAMPCACHE = {}
- FINDSOURCESTUBS = {}
- BUILTFROMCACHE = {}
- CXXINCLUDECACHE = {}
- THREADCOUNT=0
- DXVERSIONS=["8","9"]
- MAYAVERSIONS=["6","65","7","8","85"]
- MAXVERSIONS=["6","7","8"]
- ICACHEPATH="built/tmp/makepanda-dcache"
- INTERRUPT=0
- MAINTHREAD=threading.currentThread()
- ##########################################################################################
- #
- # If there is a makepandaPreferences.py, import it
- #
- ##########################################################################################
- try:
- from makepandaPreferences import *
- except ImportError:
- pass
- ########################################################################
- ##
- ## The Timestamp Cache
- ##
- ## The make utility is constantly fetching the timestamps of files.
- ## This can represent the bulk of the file accesses during the make
- ## process. The timestamp cache eliminates redundant checks.
- ##
- ########################################################################
- def GetTimestamp(path):
- if TIMESTAMPCACHE.has_key(path):
- return TIMESTAMPCACHE[path]
- try: date = os.path.getmtime(path)
- except: date = 0
- TIMESTAMPCACHE[path] = date
- return date
- def ClearTimestamp(path):
- del TIMESTAMPCACHE[path]
- ########################################################################
- ##
- ## The Dependency cache.
- ##
- ## Makepanda's strategy for file dependencies is different from most
- ## make-utilities. Whenever a file is built, makepanda records
- ## that the file was built, and it records what the input files were,
- ## and what their dates were. Whenever a file is about to be built,
- ## panda compares the current list of input files and their dates,
- ## to the previous list of input files and their dates. If they match,
- ## there is no need to build the file.
- ##
- ########################################################################
- def JustBuilt(files,others):
- dates = []
- for file in files:
- del TIMESTAMPCACHE[file]
- dates.append(GetTimestamp(file))
- for file in others:
- dates.append(GetTimestamp(file))
- key = tuple(files)
- BUILTFROMCACHE[key] = [others,dates]
- def NeedsBuild(files,others):
- dates = []
- for file in files:
- dates.append(GetTimestamp(file))
- for file in others:
- dates.append(GetTimestamp(file))
- key = tuple(files)
- if (BUILTFROMCACHE.has_key(key)):
- if (BUILTFROMCACHE[key] == [others,dates]):
- return 0
- else:
- oldothers = BUILTFROMCACHE[key][0]
- if (oldothers != others):
- for f in files:
- print "CAUTION: file dependencies changed: "+f
- if (VERBOSE > 1):
- add = SetDifference(others, oldothers)
- sub = SetDifference(oldothers, others)
- print " - Add: "+str(add)
- print " - Sub: "+str(sub)
- return 1
- ########################################################################
- ##
- ## The CXX include cache:
- ##
- ## The following routine scans a CXX file and returns a list of
- ## the include-directives inside that file. It's not recursive:
- ## it just returns the includes that are immediately inside the file.
- ##
- ## Since scanning a CXX file is slow, we cache the result. It records
- ## the date of the source file and the list of includes that it
- ## contains. It assumes that if the file date hasn't changed, that
- ## the list of include-statements inside the file has not changed
- ## either.
- ##
- ########################################################################
- global CxxIncludeRegex
- CxxIncludeRegex = re.compile('^[ \t]*[#][ \t]*include[ \t]+"([^"]+)"[ \t\r\n]*$')
- def CxxGetIncludes(path):
- date = GetTimestamp(path)
- if (CXXINCLUDECACHE.has_key(path)):
- cached = CXXINCLUDECACHE[path]
- if (cached[0]==date): return cached[1]
- try: sfile = open(path, 'rb')
- except:
- exit("Cannot open source file \""+path+"\" for reading.")
- include = []
- for line in sfile:
- match = CxxIncludeRegex.match(line,0)
- if (match):
- incname = match.group(1)
- include.append(incname)
- sfile.close()
- CXXINCLUDECACHE[path] = [date, include]
- return include
- ########################################################################
- ##
- ## Error exit has to be done carefully, because the
- ## dependency cache must be saved, and because this can
- ## only be done by the main thread.
- ##
- ########################################################################
- def SaveDependencyCache():
- try: icache = open(ICACHEPATH,'wb')
- except: icache = 0
- if (icache!=0):
- print "Storing dependency cache."
- cPickle.dump(CXXINCLUDECACHE, icache, 1)
- cPickle.dump(BUILTFROMCACHE, icache, 1)
- icache.close()
- def LoadDependencyCache():
- global CXXINCLUDECACHE
- global BUILTFROMCACHE
- try: icache = open(ICACHEPATH,'rb')
- except: icache = 0
- if (icache!=0):
- CXXINCLUDECACHE = cPickle.load(icache)
- BUILTFROMCACHE = cPickle.load(icache)
- icache.close()
- LoadDependencyCache()
- def exit(msg):
- if (threading.currentThread() == MAINTHREAD):
- SaveDependencyCache()
- print "Elapsed Time: "+PrettyTime(time.time() - STARTTIME)
- print msg
- sys.stdout.flush()
- sys.stderr.flush()
- os._exit(1)
- else:
- print msg
- raise "initiate-exit"
- ########################################################################
- ##
- ## GetDirectoryContents
- ##
- ## At times, makepanda will use a function like "os.listdir" to process
- ## all the files in a directory. Unfortunately, that means that any
- ## accidental addition of a file to a directory could cause makepanda
- ## to misbehave without warning.
- ##
- ## To alleviate this weakness, we created GetDirectoryContents. This
- ## uses "os.listdir" to fetch the directory contents, but then it
- ## compares the results to the appropriate CVS/Entries to see if
- ## they match. If not, it prints a big warning message.
- ##
- ########################################################################
- def GetDirectoryContents(dir, filters="*", skip=[]):
- if (type(filters)==str):
- filters = [filters]
- actual = {}
- files = os.listdir(dir)
- for filter in filters:
- for file in fnmatch.filter(files, filter):
- if (skip.count(file)==0) and (os.path.isfile(dir + "/" + file)):
- actual[file] = 1
- if (os.path.isfile(dir + "/CVS/Entries")):
- cvs = {}
- srchandle = open(dir+"/CVS/Entries", "r")
- files = []
- for line in srchandle:
- if (line[0]=="/"):
- s = line.split("/",2)
- if (len(s)==3):
- files.append(s[1])
- srchandle.close()
- for filter in filters:
- for file in fnmatch.filter(files, filter):
- if (skip.count(file)==0):
- cvs[file] = 1
- for file in actual.keys():
- if (cvs.has_key(file)==0):
- msg = "WARNING: %s is in %s, but not in CVS"%(file, dir)
- print msg
- WARNINGS.append(msg)
- for file in cvs.keys():
- if (actual.has_key(file)==0):
- msg = "WARNING: %s is not in %s, but is in CVS"%(file, dir)
- print msg
- WARNINGS.append(msg)
- results = actual.keys()
- results.sort()
- return results
- ########################################################################
- ##
- ## Utility routines.
- ##
- ########################################################################
- if sys.platform == "win32":
- import _winreg
- def ListRegistryKeys(path):
- result=[]
- index=0
- try:
- key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, path, 0, _winreg.KEY_READ)
- while (1):
- result.append(_winreg.EnumKey(key, index))
- index = index + 1
- except: pass
- if (key!=0): _winreg.CloseKey(key)
- return result
- def GetRegistryKey(path, subkey):
- k1=0
- key=0
- try:
- key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, path, 0, _winreg.KEY_READ)
- k1, k2 = _winreg.QueryValueEx(key, subkey)
- except: pass
- if (key!=0): _winreg.CloseKey(key)
- return k1
- def oscmd(cmd):
- print cmd
- sys.stdout.flush()
- if sys.platform == "win32":
- exe = cmd.split()[0]+".exe"
- if os.path.isfile(exe)==0:
- for i in os.environ["PATH"].split(";"):
- if os.path.isfile(os.path.join(i, exe)):
- exe = os.path.join(i, exe)
- break
- if os.path.isfile(exe)==0:
- exit("Cannot find "+exe+" on search path")
- res = os.spawnl(os.P_WAIT, exe, cmd)
- else:
- res = os.system(cmd)
- if res != 0:
- exit("")
- def getbuilding(opts):
- building = 0
- for x in opts:
- if (x[:9]=="BUILDING_"): building = x[9:]
- return building
- def getoptlevel(opts,defval):
- for x in opts:
- if (x[:3]=="OPT"):
- n = int(x[3:])
- if (n > defval): defval = n
- return defval
- def PrettyTime(t):
- t = int(t)
- hours = t/3600
- t -= hours*3600
- minutes = t/60
- t -= minutes*60
- seconds = t
- if (hours): return str(hours)+" hours "+str(minutes)+" min"
- if (minutes): return str(minutes)+" min "+str(seconds)+" sec"
- return str(seconds)+" sec"
- def MakeDirectory(path):
- if os.path.isdir(path): return 0
- os.mkdir(path)
- def ReadFile(wfile):
- try:
- srchandle = open(wfile, "rb")
- data = srchandle.read()
- srchandle.close()
- return data
- except: exit("Cannot read "+wfile)
- def WriteFile(wfile,data):
- try:
- dsthandle = open(wfile, "wb")
- dsthandle.write(data)
- dsthandle.close()
- except: exit("Cannot write "+wfile)
- def ConditionalWriteFile(dest,desiredcontents):
- try:
- rfile = open(dest, 'rb')
- contents = rfile.read(-1)
- rfile.close()
- except:
- contents=0
- if contents != desiredcontents:
- if VERBOSE:
- print "Regenerating file: "+dest
- sys.stdout.flush()
- WriteFile(dest,desiredcontents)
- def SetDifference(add, sub):
- set = {}
- for x in add: set[x]=1
- for x in sub:
- if (set.has_key(x)):
- del set[x]
- return set.keys()
- def PkgSelected(pkglist, pkg):
- if (pkglist.count(pkg)==0): return 0
- if (OMIT.count(pkg)): return 0
- return 1
- def keyboardInterruptHandler(x,y):
- exit("keyboard interrupt")
- signal.signal(signal.SIGINT, keyboardInterruptHandler)
- ########################################################################
- ##
- ## Visual Studio Manifest Manipulation.
- ##
- ########################################################################
- VC80CRTVERSIONRE=re.compile(" name=['\"]Microsoft.VC80.CRT['\"] version=['\"]([0-9.]+)['\"] ")
- def getVC80CRTVersion(fn):
- manifest = ReadFile(fn)
- version = VC80CRTVERSIONRE.search(manifest)
- if (version == None):
- exit("Cannot locate version number in "+manifn)
- return version.group(1)
- def setVC80CRTVersion(fn, ver):
- manifest = ReadFile(fn)
- subst = " name='Microsoft.VC80.CRT' version='"+ver+"' "
- manifest = VC80CRTVERSIONRE.sub(subst, manifest)
- WriteFile(fn, manifest)
- ########################################################################
- ##
- ## Command-line parser.
- ##
- ## You can type "makepanda --help" to see all the options.
- ##
- ########################################################################
- def usage(problem):
- if (problem):
- print ""
- print problem
- print ""
- print "Makepanda generates a 'built' subdirectory containing a"
- print "compiled copy of Panda3D. Command-line arguments are:"
- print ""
- print " --help (print the help message you're reading now)"
- print " --package-info (help info about the optional packages)"
- print " --optimize X (optimization level can be 1,2,3,4)"
- print " --installer (build an installer)"
- print " --v1 X (set the major version number)"
- print " --v2 X (set the minor version number)"
- print " --v3 X (set the sequence version number)"
- print " --lzma (use lzma compression when building installer)"
- print " --slaves X (use the distributed build system. see manual)"
- print " --threads N (use the multithreaded build system. see manual)"
- print ""
- for pkg in PACKAGES:
- p = pkg.lower()
- print " --use-%-9s --no-%-9s (enable/disable use of %s)"%(p, p, pkg)
- print ""
- print " --nothing (disable every third-party lib)"
- print " --everything (enable every third-party lib)"
- print ""
- print " --quiet (print less output)"
- print " --verbose (print more output and debugging info)"
- print ""
- print "The simplest way to compile panda is to just type:"
- print ""
- print " makepanda --everything"
- print ""
- exit("")
- def parseopts(args):
- global OPTIMIZE,OMIT,INSTALLER,GENMAN
- global VERSION,COMPRESSOR,VERBOSE,SLAVEFILE,THREADCOUNT
- longopts = [
- "help","package-info",
- "optimize=","everything","nothing","installer","quiet","verbose",
- "version=","lzma","no-python","slaves=","threads="]
- anything = 0
- for pkg in PACKAGES: longopts.append("no-"+pkg.lower())
- for pkg in PACKAGES: longopts.append("use-"+pkg.lower())
- try:
- opts, extras = getopt.getopt(args, "", longopts)
- for option,value in opts:
- if (option=="--help"): raise "usage"
- elif (option=="--optimize"): OPTIMIZE=value
- elif (option=="--quiet"): VERBOSE-=1
- elif (option=="--verbose"): VERBOSE+=1
- elif (option=="--installer"): INSTALLER=1
- elif (option=="--genman"): GENMAN=1
- elif (option=="--everything"): OMIT=[]
- elif (option=="--nothing"): OMIT=PACKAGES[:]
- elif (option=="--slaves"): SLAVEFILE=value
- elif (option=="--threads"): THREADCOUNT=int(value)
- elif (option=="--version"):
- VERSION=value
- if (len(VERSION.split(".")) != 3): raise "usage"
- elif (option=="--lzma"): COMPRESSOR="lzma"
- else:
- for pkg in PACKAGES:
- if (option=="--use-"+pkg.lower()):
- if (OMIT.count(pkg)): OMIT.remove(pkg)
- break
- for pkg in PACKAGES:
- if (option=="--no-"+pkg.lower()):
- if (OMIT.count(pkg)==0): OMIT.append(pkg)
- break
- anything = 1
- except: usage(0)
- if (anything==0): usage(0)
- if (OPTIMIZE=="1"): OPTIMIZE=1
- elif (OPTIMIZE=="2"): OPTIMIZE=2
- elif (OPTIMIZE=="3"): OPTIMIZE=3
- elif (OPTIMIZE=="4"): OPTIMIZE=4
- else: usage("Invalid setting for OPTIMIZE")
- parseopts(sys.argv[1:])
- ########################################################################
- #
- # Locate the root of the panda tree
- #
- ########################################################################
- PANDASOURCE=os.path.dirname(os.path.abspath(sys.path[0]))
- if ((os.path.exists(os.path.join(PANDASOURCE,"makepanda/makepanda.py"))==0) or
- (os.path.exists(os.path.join(PANDASOURCE,"dtool","src","dtoolbase","dtoolbase.h"))==0) or
- (os.path.exists(os.path.join(PANDASOURCE,"panda","src","pandabase","pandabase.h"))==0)):
- exit("I am unable to locate the root of the panda source tree.")
- os.chdir(PANDASOURCE)
- ########################################################################
- ##
- ## If you have the "sdks" directory, supply all sdks
- ##
- ## This is a temporary hack, it may go away.
- ##
- ########################################################################
- if (os.path.isdir("sdks")):
- DIRECTXSDK["DX8"] = "sdks/directx8"
- DIRECTXSDK["DX9"] = "sdks/directx9"
- MAXSDKCS["MAX6"] = "sdks/maxsdk6"
- MAXSDKCS["MAX7"] = "sdks/maxsdk7"
- MAXSDKCS["MAX8"] = "sdks/maxsdk8"
- MAXSDK["MAX6"] = "sdks/maxsdk6"
- MAXSDK["MAX7"] = "sdks/maxsdk7"
- MAXSDK["MAX8"] = "sdks/maxsdk8"
- MAYASDK["MAYA6"] = "sdks/maya6"
- MAYASDK["MAYA65"] = "sdks/maya65"
- MAYASDK["MAYA7"] = "sdks/maya7"
- MAYASDK["MAYA8"] = "sdks/maya8"
- MAYASDK["MAYA85"] = "sdks/maya85"
- ########################################################################
- ##
- ## Locate the DirectX SDK
- ##
- ## Microsoft keeps changing the &*#$*& registry key for the DirectX SDK.
- ## The only way to reliably find it is to search through the installer's
- ## uninstall-directories, look in each one, and see if it contains the
- ## relevant files.
- ##
- ########################################################################
- if sys.platform == "win32":
- uninstaller = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
- for subdir in ListRegistryKeys(uninstaller):
- if (subdir[0]=="{"):
- dir = GetRegistryKey(uninstaller+"\\"+subdir, "InstallLocation")
- if (dir != 0):
- if ((DIRECTXSDK.has_key("DX8")==0) and
- (os.path.isfile(dir+"\\Include\\d3d8.h")) and
- (os.path.isfile(dir+"\\Include\\d3dx8.h")) and
- (os.path.isfile(dir+"\\Lib\\d3d8.lib")) and
- (os.path.isfile(dir+"\\Lib\\d3dx8.lib"))):
- DIRECTXSDK["DX8"] = dir.replace("\\", "/").rstrip("/")
- if ((DIRECTXSDK.has_key("DX9")==0) and
- (os.path.isfile(dir+"\\Include\\d3d9.h")) and
- (os.path.isfile(dir+"\\Include\\d3dx9.h")) and
- (os.path.isfile(dir+"\\Include\\dxsdkver.h")) and
- (os.path.isfile(dir+"\\Lib\\x86\\d3d9.lib")) and
- (os.path.isfile(dir+"\\Lib\\x86\\d3dx9.lib"))):
- DIRECTXSDK["DX9"] = dir.replace("\\", "/").rstrip("/")
- for ver in DXVERSIONS:
- if (OMIT.count("DX"+ver)==0):
- if (DIRECTXSDK.has_key("DX"+ver)==0):
- WARNINGS.append("I cannot locate SDK for DX"+ver)
- WARNINGS.append("I have automatically added this command-line option: --no-dx"+ver)
- OMIT.append("DX"+ver)
- else:
- WARNINGS.append("Using DX"+ver+" sdk: "+DIRECTXSDK["DX"+ver])
- ########################################################################
- ##
- ## Locate the Maya SDK
- ##
- ########################################################################
- MAYAVERSIONINFO=[("MAYA6", "SOFTWARE\\Alias|Wavefront\\Maya\\6.0\\Setup\\InstallPath"),
- ("MAYA65", "SOFTWARE\\Alias|Wavefront\\Maya\\6.5\\Setup\\InstallPath"),
- ("MAYA7", "SOFTWARE\\Alias|Wavefront\\Maya\\7.0\\Setup\\InstallPath"),
- ("MAYA8", "SOFTWARE\\Alias\\Maya\\8.0\\Setup\\InstallPath"),
- ("MAYA85", "SOFTWARE\\Alias\\Maya\\8.5\\Setup\\InstallPath")
- ]
- for (ver,key) in MAYAVERSIONINFO:
- print "Checking for "+ver
- if (OMIT.count(ver)==0):
- if (sys.platform == "win32"):
- if (MAYASDK.has_key(ver)==0):
- MAYASDK[ver]=GetRegistryKey(key, "MAYA_INSTALL_LOCATION")
- if (MAYASDK[ver] == 0):
- WARNINGS.append("The registry does not appear to contain a pointer to the "+ver+" SDK.")
- WARNINGS.append("I have automatically added this command-line option: --no-"+ver.lower())
- OMIT.append(ver)
- else:
- MAYASDK[ver] = MAYASDK[ver].replace("\\", "/").rstrip("/")
- else:
- WARNINGS.append(ver+" not yet supported under linux")
- WARNINGS.append("I have automatically added this command-line option: --no-"+ver.lower())
- OMIT.append(ver)
- ########################################################################
- ##
- ## Locate the 3D Studio Max and Character Studio SDKs
- ##
- ########################################################################
- MAXVERSIONINFO = [("MAX6", "SOFTWARE\\Autodesk\\3DSMAX\\6.0", "installdir", "maxsdk\\cssdk\\include"),
- ("MAX7", "SOFTWARE\\Autodesk\\3DSMAX\\7.0", "Installdir", "maxsdk\\include\\CS"),
- ("MAX8", "SOFTWARE\\Autodesk\\3DSMAX\\8.0", "Installdir", "maxsdk\\include\\CS"),
- ]
- for version,key1,key2,subdir in MAXVERSIONINFO:
- if (OMIT.count(version)==0):
- if (sys.platform == "win32"):
- if (MAXSDK.has_key(version)==0):
- top = GetRegistryKey(key1,key2)
- if (top == 0):
- WARNINGS.append("The registry does not appear to contain a pointer to "+version)
- WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
- OMIT.append(version)
- else:
- if (os.path.isdir(top + "\\" + subdir)==0):
- WARNINGS.append("Your copy of "+version+" does not include the character studio SDK")
- WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
- OMIT.append(version)
- else:
- MAXSDK[version] = top + "maxsdk"
- MAXSDKCS[version] = top + subdir
- else:
- WARNINGS.append(version+" not yet supported under linux")
- WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
- OMIT.append(version)
- ########################################################################
- ##
- ## Locate the Python SDK
- ##
- ########################################################################
- if (OMIT.count("PYTHON")==0):
- if (sys.platform == "win32"):
- PYTHONSDK="thirdparty/win-python"
- else:
- if (os.path.isdir("/usr/include/python2.5")): PYTHONSDK = "/usr/include/python2.5"
- elif (os.path.isdir("/usr/include/python2.4")): PYTHONSDK = "/usr/include/python2.4"
- elif (os.path.isdir("/usr/include/python2.3")): PYTHONSDK = "/usr/include/python2.3"
- elif (os.path.isdir("/usr/include/python2.2")): PYTHONSDK = "/usr/include/python2.2"
- else: exit("Cannot find the python SDK")
- ########################################################################
- ##
- ## Choose a Compiler.
- ##
- ## This should also set up any environment variables needed to make
- ## the compiler work.
- ##
- ########################################################################
- def AddToPathEnv(path,add):
- if (os.environ.has_key(path)):
- os.environ[path] = add + ";" + os.environ[path]
- else:
- os.environ[path] = add
- def ChooseCompiler():
- global COMPILER, THIRDPARTYLIBS, VC80CRTVERSION
- # Try to use Linux GCC
- if (sys.platform[:5] == "linux"):
- COMPILER="LINUX"
- THIRDPARTYLIBS="thirdparty/linux-libs-a/"
- return
- # Panda now depends on visual studio 2005 or visual studio express 2005.
- vcdir = GetRegistryKey("SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7", "8.0")
- print "VCDIR=",vcdir
- if (vcdir != 0) and (vcdir[-4:] == "\\VC\\"):
- vcdir = vcdir[:-3]
- platsdk=GetRegistryKey("SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1",
- "Install Dir")
- if (platsdk == 0): exit("Found VC Toolkit, but cannot locate MS Platform SDK")
- WARNINGS.append("Using visual studio: "+vcdir)
- AddToPathEnv("PATH", vcdir + "VC\\bin")
- AddToPathEnv("PATH", vcdir + "Common7\\IDE")
- AddToPathEnv("INCLUDE", vcdir + "VC\\include")
- AddToPathEnv("LIB", vcdir + "VC\\lib")
- AddToPathEnv("INCLUDE", platsdk + "include")
- AddToPathEnv("LIB", platsdk + "lib")
- COMPILER="MSVC"
- THIRDPARTYLIBS="thirdparty/win-libs-vc8/"
- VC80CRTVERSION = getVC80CRTVersion(THIRDPARTYLIBS+"extras/bin/Microsoft.VC80.CRT.manifest")
- return
- # Give up
- exit("Cannot locate Microsoft Visual Studio 2005 or Visual Studio Express 2005")
- ChooseCompiler()
- ##########################################################################################
- #
- # Disable packages that are currently broken or not supported.
- #
- ##########################################################################################
- if (OMIT.count("MILES")==0):
- WARNINGS.append("makepanda currently does not support miles sound system")
- WARNINGS.append("I have automatically added this command-line option: --no-miles")
- OMIT.append("MILES")
- if (sys.platform != "win32"):
- if (OMIT.count("DX8")==0): OMIT.append("DX8")
- if (OMIT.count("DX9")==0): OMIT.append("DX9")
- ##########################################################################################
- #
- # Verify that LD_LIBRARY_PATH contains the built/lib directory.
- #
- # If not, add it on a temporary basis, and issue a warning.
- #
- ##########################################################################################
- if (sys.platform != "win32"):
- BUILTLIB = os.path.abspath("built/lib")
- try:
- LDPATH = []
- f = file("/etc/ld.so.conf","r")
- for line in f: LDPATH.append(line.rstrip())
- f.close()
- except: LDPATH = []
- if (os.environ.has_key("LD_LIBRARY_PATH")):
- LDPATH = LDPATH + os.environ["LD_LIBRARY_PATH"].split(":")
- if (LDPATH.count(BUILTLIB)==0):
- WARNINGS.append("Caution: the built/lib directory is not in LD_LIBRARY_PATH")
- WARNINGS.append("or /etc/ld.so.conf. You must add it before using panda.")
- if (os.environ.has_key("LD_LIBRARY_PATH")):
- os.environ["LD_LIBRARY_PATH"] = BUILTLIB + ":" + os.environ["LD_LIBRARY_PATH"]
- else:
- os.environ["LD_LIBRARY_PATH"] = BUILTLIB
- #######################################################################
- #
- # Ensure that bison can find its skeleton file
- #
- #######################################################################
- if (sys.platform == "win32"):
- os.environ["BISON_SIMPLE"] = "thirdparty/win-util/bison.simple"
- ########################################################################
- ##
- ## Choose a version number for the installer
- ##
- ########################################################################
- if (VERSION == 0):
- try:
- f = file("dtool/PandaVersion.pp","r")
- pattern = re.compile('^[ \t]*[#][ \t]*define[ \t]+PANDA_VERSION[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)')
- for line in f:
- match = pattern.match(line,0)
- if (match):
- VERSION = match.group(1)+"."+match.group(2)+"."+match.group(3)
- break
- f.close()
- except: VERSION="0.0.0"
- ########################################################################
- #
- # Sanity check some command-line arguments.
- #
- ########################################################################
- if (INSTALLER) and (OMIT.count("PYTHON")):
- exit("Cannot build installer without python")
- ########################################################################
- ##
- ## Give a Status Report on Command-Line Options
- ##
- ########################################################################
- def printStatus(header,warnings):
- global VERBOSE
- if VERBOSE >= -2:
- print ""
- print "-------------------------------------------------------------------"
- print header
- tkeep = ""
- tomit = ""
- for x in PACKAGES:
- if (OMIT.count(x)==0): tkeep = tkeep + x + " "
- else: tomit = tomit + x + " "
- print "Makepanda: Compiler:",COMPILER
- print "Makepanda: Optimize:",OPTIMIZE
- print "Makepanda: Keep Pkg:",tkeep
- print "Makepanda: Omit Pkg:",tomit
- print "Makepanda: Verbose vs. Quiet Level:",VERBOSE
- if (GENMAN): print "Makepanda: Generate API reference manual"
- else : print "Makepanda: Don't generate API reference manual"
- if (sys.platform == "win32"):
- if INSTALLER: print "Makepanda: Build installer, using",COMPRESSOR
- else : print "Makepanda: Don't build installer"
- print "Makepanda: Version ID: "+VERSION
- for x in warnings: print "Makepanda: "+x
- print "-------------------------------------------------------------------"
- print ""
- sys.stdout.flush()
- printStatus("Makepanda Initial Status Report", WARNINGS)
- ########################################################################
- ##
- ## CxxFindSource: given a source file name and a directory list,
- ## searches the directory list for the given source file. Returns
- ## the full pathname of the located file.
- ##
- ## CxxFindHeader: given a source file, an include directive, and a
- ## directory list, searches the directory list for the given header
- ## file. Returns the full pathname of the located file.
- ##
- ## Of course, CxxFindSource and CxxFindHeader cannot find a source
- ## file that has not been created yet. This can cause dependency
- ## problems. So the function CreateStubHeader can be used to create
- ## a file that CxxFindSource or CxxFindHeader can subsequently find.
- ##
- ########################################################################
- def CxxFindSource(name, ipath):
- for dir in ipath:
- if (dir == "."): full = name
- else: full = dir + "/" + name
- if GetTimestamp(full) > 0: return full
- exit("Could not find source file: "+name)
- def CxxFindHeader(srcfile, incfile, ipath):
- if (incfile.startswith(".")):
- last = srcfile.rfind("/")
- if (last < 0): exit("CxxFindHeader cannot handle this case #1")
- srcdir = srcfile[:last+1]
- while (incfile[:1]=="."):
- if (incfile[:2]=="./"):
- incfile = incfile[2:]
- elif (incfile[:3]=="../"):
- incfile = incfile[3:]
- last = srcdir[:-1].rfind("/")
- if (last < 0): exit("CxxFindHeader cannot handle this case #2")
- srcdir = srcdir[:last+1]
- else: exit("CxxFindHeader cannot handle this case #3")
- full = srcdir + incfile
- if GetTimestamp(full) > 0: return full
- return 0
- else:
- for dir in ipath:
- full = dir + "/" + incfile
- if GetTimestamp(full) > 0: return full
- return 0
- def CreateStubHeader(file):
- if (os.path.exists(file)==0):
- WriteFile(file,"/* stub header */")
- ########################################################################
- ##
- ## FindLocation
- ##
- ########################################################################
- def FindLocation(fn, ipath):
- if (COMPILER=="LINUX"):
- if (fn.endswith(".cxx")): return CxxFindSource(fn, ipath)
- if (fn.endswith(".I")): return CxxFindSource(fn, ipath)
- if (fn.endswith(".h")): return CxxFindSource(fn, ipath)
- if (fn.endswith(".c")): return CxxFindSource(fn, ipath)
- if (fn.endswith(".yxx")): return CxxFindSource(fn, ipath)
- if (fn.endswith(".lxx")): return CxxFindSource(fn, ipath)
- if (fn.endswith(".obj")): return "built/tmp/"+fn[:-4]+".o"
- if (fn.endswith(".dll")): return "built/lib/"+fn[:-4]+".so"
- if (fn.endswith(".exe")): return "built/bin/"+fn[:-4]
- if (fn.endswith(".lib")): return "built/lib/"+fn[:-4]+".a"
- if (fn.endswith(".ilb")): return "built/tmp/"+fn[:-4]+".a"
- if (fn.endswith(".dat")): return "built/tmp/"+fn
- if (fn.endswith(".in")): return "built/pandac/input/"+fn
- if (COMPILER=="MSVC"):
- if (fn.endswith(".cxx")): return CxxFindSource(fn, ipath)
- if (fn.endswith(".I")): return CxxFindSource(fn, ipath)
- if (fn.endswith(".h")): return CxxFindSource(fn, ipath)
- if (fn.endswith(".c")): return CxxFindSource(fn, ipath)
- if (fn.endswith(".yxx")): return CxxFindSource(fn, ipath)
- if (fn.endswith(".lxx")): return CxxFindSource(fn, ipath)
- if (fn.endswith(".obj")): return "built/tmp/"+fn
- if (fn.endswith(".dll")): return "built/bin/"+fn
- if (fn.endswith(".dlo")): return "built/plugins/"+fn
- if (fn.endswith(".dli")): return "built/plugins/"+fn
- if (fn.endswith(".dle")): return "built/plugins/"+fn
- if (fn.endswith(".mll")): return "built/plugins/"+fn
- if (fn.endswith(".exe")): return "built/bin/"+fn
- if (fn.endswith(".lib")): return "built/lib/"+fn
- if (fn.endswith(".ilb")): return "built/tmp/"+fn[:-4]+".lib"
- if (fn.endswith(".dat")): return "built/tmp/"+fn
- if (fn.endswith(".in")): return "built/pandac/input/"+fn
- return fn
- def FindLocations(files, ipath):
- result = []
- for x in files:
- result.append(FindLocation(x, ipath))
- return result
- ########################################################################
- ##
- ## CxxCalcDependencies(srcfile, ipath, ignore)
- ##
- ## Calculate the dependencies of a source file given a
- ## particular include-path. Any file in the list of files to
- ## ignore is not considered.
- ##
- ########################################################################
- global CxxIgnoreHeader
- global CxxDependencyCache
- CxxIgnoreHeader = {}
- CxxDependencyCache = {}
- def CxxCalcDependencies(srcfile, ipath, ignore):
- if (CxxDependencyCache.has_key(srcfile)):
- return CxxDependencyCache[srcfile]
- if (ignore.count(srcfile)): return []
- dep = {}
- dep[srcfile] = 1
- includes = CxxGetIncludes(srcfile)
- for include in includes:
- if (CxxIgnoreHeader.has_key(include)==0):
- header = CxxFindHeader(srcfile, include, ipath)
- if (header!=0):
- if (ignore.count(header)==0):
- hdeps = CxxCalcDependencies(header, ipath, [srcfile]+ignore)
- for x in hdeps: dep[x] = 1
- else:
- if (VERBOSE > 1):
- print "CAUTION: header file "+include+" cannot be found in "+srcfile+" IPATH="+str(ipath)
- result = dep.keys()
- CxxDependencyCache[srcfile] = result
- return result
- ########################################################################
- ##
- ##
- ##
- ########################################################################
- def SDependencyQueue(ipath, call, targets, sources):
- xipath = ["built/tmp"] + ipath + ["built/include"]
- osources = {}
- for x in sources:
- file = FindLocation(x, xipath)
- if (x.endswith(".cxx")) or (x.endswith(".I")) or (x.endswith(".h")) or (x.endswith(".c")):
- for dep in CxxCalcDependencies(file, xipath, []):
- osources[dep] = 1
- else:
- osources[file] = 1
- osources = osources.keys()
- osources.sort()
- otargets = FindLocations(targets, xipath)
- DEPENDENCYQUEUE.append([call[0],call[1:],otargets,osources,[]])
- ########################################################################
- ##
- ## Routines to copy files into the build tree
- ##
- ########################################################################
- def CopyFile(dstfile,srcfile):
- if (dstfile[-1]=='/'):
- dstdir = dstfile
- fnl = srcfile.rfind("/")
- if (fnl < 0): fn = srcfile
- else: fn = srcfile[fnl+1:]
- dstfile = dstdir + fn
- if (NeedsBuild([dstfile],[srcfile])):
- global VERBOSE
- if VERBOSE >= 1:
- print "Copying \"%s\" --> \"%s\""%(srcfile, dstfile)
- WriteFile(dstfile,ReadFile(srcfile))
- JustBuilt([dstfile], [srcfile])
- def CopyAllFiles(dstdir, srcdir, suffix=""):
- for x in GetDirectoryContents(srcdir, ["*"+suffix]):
- CopyFile(dstdir+x, srcdir+x)
- def CompileAllModels(dstdir, srcdir):
- for x in GetDirectoryContents(srcdir, ["*.egg", "*.flt"]):
- eggpz = os.path.basename(x[:-4] + ".egg.pz")
- bampz = os.path.basename(x[:-4] + ".bam.pz")
- EnqueueEggPZ("", dstdir + eggpz, srcdir + x)
- EnqueueBamPZ("", dstdir + bampz, dstdir + eggpz)
- def CopyAllHeaders(dir, skip=[]):
- for filename in GetDirectoryContents(dir, ["*.h", "*.I", "*.T"], skip):
- srcfile = dir + "/" + filename
- dstfile = "built/include/" + filename
- if (NeedsBuild([dstfile],[srcfile])):
- WriteFile(dstfile,ReadFile(srcfile))
- JustBuilt([dstfile],[srcfile])
- def CopyTree(dstdir,srcdir):
- if (os.path.isdir(dstdir)): return 0
- if (COMPILER=="MSVC"): cmd = 'xcopy /I/Y/E/Q "' + srcdir + '" "' + dstdir + '"'
- if (COMPILER=="LINUX"): cmd = 'cp --recursive --force ' + srcdir + ' ' + dstdir
- oscmd(cmd)
- ########################################################################
- ##
- ## EnqueueCxx
- ##
- ########################################################################
- def CompileCxx(obj,src,ipath,opts):
- ipath = ["built/tmp"] + ipath + ["built/include"]
- wobj = FindLocation(obj, ipath)
- wsrc = FindLocation(src, ipath)
- if (COMPILER=="MSVC"):
- cmd = "cl /wd4996 /Fo" + wobj + " /nologo /c "
- if (OMIT.count("PYTHON")==0): cmd = cmd + " /Ithirdparty/win-python/include"
- for ver in DXVERSIONS:
- if (PkgSelected(opts,"DX"+ver)):
- cmd = cmd + ' /I"' + DIRECTXSDK["DX"+ver] + '/include"'
- for ver in MAYAVERSIONS:
- if (PkgSelected(opts,"MAYA"+ver)):
- cmd = cmd + ' /I"' + MAYASDK["MAYA"+ver] + '/include"'
- for ver in MAXVERSIONS:
- if (PkgSelected(opts,"MAX"+ver)):
- cmd = cmd + ' /I"' + MAXSDK["MAX"+ver] + '/include" /I"' + MAXSDKCS["MAX"+ver] + '" /DMAX' + ver
- for pkg in PACKAGES:
- if (pkg[:4] != "MAYA") and (pkg[:3]!="MAX") and (pkg[:2]!="DX") and PkgSelected(opts,pkg):
- cmd = cmd + " /I" + THIRDPARTYLIBS + pkg.lower() + "/include"
- for x in ipath: cmd = cmd + " /I" + x
- if (opts.count('NOFLOATWARN')): cmd = cmd + ' /wd4244 /wd4305'
- if (opts.count("WITHINPANDA")): cmd = cmd + ' /DWITHIN_PANDA'
- if (opts.count("MSFORSCOPE")): cmd = cmd + ' /Zc:forScope-'
- optlevel = getoptlevel(opts,OPTIMIZE)
- if (optlevel==1): cmd = cmd + " /MD /Zi /RTCs /GS"
- if (optlevel==2): cmd = cmd + " /MD /Zi /DNDEBUG "
- if (optlevel==3): cmd = cmd + " /MD /Zi /O2 /Ob2 /DFORCE_INLINING /DNDEBUG "
- if (optlevel==4): cmd = cmd + " /MD /Zi /Ox /Ob2 /DFORCE_INLINING /DNDEBUG /GL "
- cmd = cmd + " /Fd" + wobj[:-4] + ".pdb"
- building = getbuilding(opts)
- if (building): cmd = cmd + " /DBUILDING_" + building
- cmd = cmd + " /EHsc /Zm300 /DWIN32_VC /DWIN32 /W3 " + wsrc
- oscmd(cmd)
- if (COMPILER=="LINUX"):
- if (wsrc.endswith(".c")): cmd = 'gcc -fPIC -c -o ' + wobj
- else: cmd = 'g++ -ftemplate-depth-30 -fPIC -c -o ' + wobj
- if (OMIT.count("PYTHON")==0): cmd = cmd + ' -I"' + PYTHONSDK + '"'
- if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'vrpn/include'
- if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'fftw/include'
- if (PkgSelected(opts,"FMODEX")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'fmodex/include'
- if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'nvidiacg/include'
- if (PkgSelected(opts,"FFMPEG")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'ffmpeg/include'
- if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' -I/usr/include/freetype2'
- for x in ipath: cmd = cmd + ' -I' + x
- if (opts.count("WITHINPANDA")): cmd = cmd + ' -DWITHIN_PANDA'
- optlevel = getoptlevel(opts,OPTIMIZE)
- if (optlevel==1): cmd = cmd + " -g"
- if (optlevel==2): cmd = cmd + " -O1 -DNDEBUG"
- if (optlevel==3): cmd = cmd + " -O2 -DNDEBUG"
- if (optlevel==4): cmd = cmd + " -O2 -DNDEBUG"
- building = getbuilding(opts)
- if (building): cmd = cmd + " -DBUILDING_" + building
- cmd = cmd + ' ' + wsrc
- oscmd(cmd)
- def EnqueueCxx(obj=0,src=0,ipath=[],opts=[],xdep=[]):
- if ((obj==0)|(src==0)):
- exit("syntax error in EnqueueCxx directive")
- SDependencyQueue(ipath, [CompileCxx,obj,src,ipath,opts], [obj], [src]+xdep)
- ########################################################################
- ##
- ## CompileBison
- ##
- ########################################################################
- def CompileBison(pre, dsth, obj, ipath, opts, src):
- ifile = os.path.basename(src)
- wsrc = FindLocation(src, ipath)
- wobj = FindLocation(obj, ipath)
- wdstc = "built/tmp/" + obj[:-4] + ".cxx"
- wdsth = "built/include/" + dsth
- ipath = ["built/tmp"] + ipath + ["built/include"]
- if (COMPILER == "MSVC"):
- oscmd('thirdparty/win-util/bison -y -d -obuilt/tmp/'+ifile+'.c -p '+pre+' '+wsrc)
- CopyFile(wdstc, "built/tmp/"+ifile+".c")
- CopyFile(wdsth, "built/tmp/"+ifile+".h")
- if (COMPILER == "LINUX"):
- oscmd("bison -y -d -obuilt/tmp/"+ifile+".c -p "+pre+" "+wsrc)
- CopyFile(wdstc, "built/tmp/"+ifile+".c")
- CopyFile(wdsth, "built/tmp/"+ifile+".h")
- CompileCxx(obj,obj[:-4]+".cxx",ipath,opts)
- def EnqueueBison(ipath=0,opts=0,pre=0,obj=0,dsth=0,src=0):
- if ((ipath==0)|(opts==0)|(pre==0)|(obj==0)|(dsth==0)|(src==0)):
- exit("syntax error in EnqueueBison directive")
- SDependencyQueue(ipath, [CompileBison,pre,dsth,obj,ipath,opts,src], [obj, dsth], [src])
- ########################################################################
- ##
- ## CompileFlex
- ##
- ########################################################################
- def CompileFlex(pre,src,obj,ipath,opts,dashi):
- wsrc=FindLocation(src, ipath)
- wobj=FindLocation(obj, ipath)
- wdst="built/tmp/"+obj[:-4]+".cxx"
- ipath = ["built/tmp"] + ipath + ["built/include"]
- if (COMPILER == "MSVC"):
- if (dashi): oscmd("thirdparty/win-util/flex -i -P" + pre + " -o"+wdst+" "+wsrc)
- else: oscmd("thirdparty/win-util/flex -P" + pre + " -o"+wdst+" "+wsrc)
- if (COMPILER == "LINUX"):
- if (dashi): oscmd("flex -i -P" + pre + " -o"+wdst+" "+wsrc)
- else: oscmd("flex -P" + pre + " -o"+wdst+" "+wsrc)
- CompileCxx(obj,obj[:-4]+".cxx",ipath,opts)
- def EnqueueFlex(ipath=0,opts=0,pre=0,obj=0,src=0,dashi=0):
- if ((ipath==0)|(opts==0)|(pre==0)|(obj==0)|(src==0)):
- exit("syntax error in EnqueueFlex directive")
- SDependencyQueue(ipath, [CompileFlex,pre,src,obj,ipath,opts,dashi], [obj], [src])
- ########################################################################
- ##
- ## EnqueueIgate
- ##
- ########################################################################
- def CompileIgate(ipath,opts,outd,obj,src,module,library,files):
- outc = obj[:-4]+".cxx"
- wobj = FindLocation(obj, ipath)
- woutd = FindLocation(outd, ipath)
- woutc = "built/tmp/"+outc
- xipath = ipath + ["built/include"]
- if (OMIT.count("PYTHON")):
- WriteFile(woutc,"")
- WriteFile(woutd,"")
- CompileCxx(obj,outc,ipath,opts)
- return
- if (COMPILER=="MSVC"):
- cmd = "built/bin/interrogate -srcdir "+src+" -I"+src
- cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32'
- cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall'
- optlevel=getoptlevel(opts,OPTIMIZE)
- if (optlevel==1): cmd = cmd + ' '
- if (optlevel==2): cmd = cmd + ' -DNDEBUG '
- if (optlevel==3): cmd = cmd + ' -DNDEBUG -DFORCE_INLINING'
- if (optlevel==4): cmd = cmd + ' -DNDEBUG -DFORCE_INLINING'
- cmd = cmd + ' -Sbuilt/include/parser-inc'
- cmd = cmd + ' -Ithirdparty/win-python/include'
- for pkg in PACKAGES:
- if (PkgSelected(opts,pkg)):
- cmd = cmd + " -I" + THIRDPARTYLIBS + pkg.lower() + "/include"
- cmd = cmd + ' -oc ' + woutc + ' -od ' + woutd
- cmd = cmd + ' -fnames -string -refcount -assert -python-native'
- for x in xipath: cmd = cmd + ' -I' + x
- building = getbuilding(opts)
- if (building): cmd = cmd + " -DBUILDING_"+building
- if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA"
- cmd = cmd + ' -module ' + module + ' -library ' + library
- for ver in DXVERSIONS:
- if ((COMPILER=="MSVC") and PkgSelected(opts,"DX"+ver)):
- cmd = cmd + ' -I"' + DIRECTXSDK["DX"+ver] + '/include"'
- for ver in MAYAVERSIONS:
- if ((COMPILER=="MSVC") and PkgSelected(opts,"MAYA"+ver)):
- cmd = cmd + ' -I"' + MAYASDK["MAYA"+ver] + '/include"'
- for x in files: cmd = cmd + ' ' + x
- oscmd(cmd)
- CompileCxx(obj,outc,ipath,opts)
- return
- if (COMPILER=="LINUX"):
- cmd = 'built/bin/interrogate -srcdir '+src
- cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const'
- optlevel = getoptlevel(opts,OPTIMIZE)
- if (optlevel==1): cmd = cmd + ' '
- if (optlevel==2): cmd = cmd + ' -DNDEBUG '
- if (optlevel==3): cmd = cmd + ' -DNDEBUG '
- if (optlevel==4): cmd = cmd + ' -DNDEBUG '
- cmd = cmd + ' -Sbuilt/include/parser-inc -S/usr/include'
- cmd = cmd + ' -Ithirdparty/win-python/include'
- for pkg in PACKAGES:
- if (PkgSelected(opts,pkg)):
- cmd = cmd + " -I" + THIRDPARTYLIBS + pkg.lower() + "/include"
- cmd = cmd + ' -oc ' + woutc + ' -od ' + woutd
- cmd = cmd + ' -fnames -string -refcount -assert -python-native'
- for x in xipath: cmd = cmd + ' -I' + x
- building = getbuilding(opts)
- if (building): cmd = cmd + " -DBUILDING_"+building
- if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA"
- cmd = cmd + ' -module ' + module + ' -library ' + library
- for ver in MAYAVERSIONS:
- if (PkgSelected(opts, "MAYA"+ver)):
- cmd = cmd + ' -I"' + MAYASDK["MAYA"+ver] + '/include"'
- for x in files: cmd = cmd + ' ' + x
- oscmd(cmd)
- CompileCxx(obj,outc,ipath,opts)
- return
- def FindInterrogateInputs(dir, skip, also):
- if (skip == "ALL"):
- files = []
- else:
- files = GetDirectoryContents(dir, ["*.h"], skip)
- files.sort()
- for x in also: files.append(x)
- return files
- def EnqueueIgate(ipath=0, opts=0, outd=0, obj=0, src=0, module=0, library=0, also=0, skip=0):
- if ((ipath==0)|(opts==0)|(outd==0)|(obj==0)|(src==0)|(module==0)|(library==0)|(also==0)|(skip==0)):
- exit("syntax error in EnqueueIgate directive")
- files = FindInterrogateInputs(src, skip, also)
- dep = files + ["dtool_have_python.dat", "interrogate.exe"]
- SDependencyQueue(ipath, [CompileIgate,ipath,opts,outd,obj,src,module,library,files], [obj, outd], dep)
- ########################################################################
- ##
- ## EnqueueImod
- ##
- ########################################################################
- def CompileImod(obj, module, library, ipath, opts, files):
- outc = obj[:-4]+".cxx"
- woutc = "built/tmp/"+outc
- wfiles = FindLocations(files, ipath)
- if (OMIT.count("PYTHON")):
- WriteFile(woutc,"")
- CompileCxx(obj,outc,ipath,opts)
- return
- if (COMPILER=="MSVC"):
- cmd = 'built/bin/interrogate_module '
- cmd = cmd + ' -oc ' + woutc + ' -module ' + module + ' -library ' + library + ' -python-native '
- for x in wfiles: cmd = cmd + ' ' + x
- oscmd(cmd)
- CompileCxx(obj,outc,ipath,opts)
- return
- if (COMPILER=="LINUX"):
- cmd = 'built/bin/interrogate_module '
- cmd = cmd + ' -oc ' + woutc + ' -module ' + module + ' -library ' + library + ' -python-native '
- for x in wfiles: cmd = cmd + ' ' + x
- oscmd(cmd)
- CompileCxx(obj,outc,ipath,opts)
- return
- def EnqueueImod(ipath=0, opts=0, obj=0, module=0, library=0, files=0):
- if ((ipath==0)|(opts==0)|(obj==0)|(module==0)|(library==0)|(files==0)):
- exit("syntax error in EnqueueImod directive")
- dep = files + ["dtool_have_python.dat", "interrogate_module.exe"]
- SDependencyQueue(ipath, [CompileImod, obj, module, library, ipath, opts, files], [obj], dep)
- ########################################################################
- ##
- ## EnqueueLib
- ##
- ########################################################################
- def CompileLib(lib, obj, opts):
- wlib = FindLocation(lib, [])
- wobj = FindLocations(obj, [])
- if (COMPILER=="MSVC"):
- cmd = 'link /lib /nologo /OUT:' + wlib
- optlevel = getoptlevel(opts,OPTIMIZE)
- if (optlevel==4): cmd = cmd + " /LTCG "
- for x in wobj: cmd = cmd + ' ' + x
- oscmd(cmd)
- if (COMPILER=="LINUX"):
- cmd = 'ar cru ' + wlib
- for x in wobj: cmd=cmd + ' ' + x
- oscmd(cmd)
- def EnqueueLib(lib=0, obj=[], opts=[]):
- if (lib==0): exit("syntax error in EnqueueLib directive")
- SDependencyQueue([], [CompileLib,lib,obj,opts], [lib], obj)
- ########################################################################
- ##
- ## EnqueueLink
- ##
- ########################################################################
- def CompileLink(dll, obj, opts, ldef):
- wdll = FindLocation(dll, [])
- if (COMPILER=="MSVC"):
- cmd = 'link /nologo /NOD:MFC80.LIB /NOD:LIBCI.LIB /NOD:MSVCRTD.LIB /DEBUG '
- if (THIRDPARTYLIBS=="thirdparty/win-libs-vc8/"): cmd = cmd + " /nod:libc /nod:libcmtd"
- if (wdll.endswith(".exe")==0): cmd = cmd + " /DLL"
- optlevel = getoptlevel(opts,OPTIMIZE)
- if (optlevel==1): cmd = cmd + " /MAP /MAPINFO:EXPORTS"
- if (optlevel==2): cmd = cmd + " /MAP:NUL "
- if (optlevel==3): cmd = cmd + " /MAP:NUL "
- if (optlevel==4): cmd = cmd + " /MAP:NUL /LTCG "
- cmd = cmd + " /FIXED:NO /OPT:REF /STACK:4194304 /INCREMENTAL:NO "
- if (ldef!=0): cmd = cmd + ' /DEF:"' + ldef + '"'
- cmd = cmd + ' /OUT:' + wdll
- if (dll.endswith(".dll")):
- cmd = cmd + ' /IMPLIB:built/lib/'+dll[:-4]+".lib"
- if (OMIT.count("PYTHON")==0): cmd = cmd + ' /LIBPATH:thirdparty/win-python/libs '
- for x in obj:
- if (x.endswith(".dll")): cmd = cmd + ' built/lib/' + x[:-4] + ".lib"
- else: cmd = cmd + ' ' + FindLocation(x,[])
- if (wdll[-4:]==".exe"): cmd = cmd + ' panda/src/configfiles/pandaIcon.obj'
- for ver in DXVERSIONS:
- if (PkgSelected(opts,"DX"+ver)):
- cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK["DX"+ver] + '/lib/x86"'
- cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK["DX"+ver] + '/lib"'
- cmd = cmd + ' d3dVER.lib d3dxVER.lib dxerrVER.lib ddraw.lib dxguid.lib'.replace("VER",ver)
- if (opts.count("WINSOCK")): cmd = cmd + " wsock32.lib"
- if (opts.count("WINSOCK2")): cmd = cmd + " wsock32.lib ws2_32.lib"
- if (opts.count("WINCOMCTL")): cmd = cmd + ' comctl32.lib'
- if (opts.count("WINCOMDLG")): cmd = cmd + ' comdlg32.lib'
- if (opts.count("WINUSER")): cmd = cmd + " user32.lib"
- if (opts.count("WINMM")): cmd = cmd + " winmm.lib"
- if (opts.count("WINIMM")): cmd = cmd + " imm32.lib"
- if (opts.count("WINKERNEL")): cmd = cmd + " kernel32.lib"
- if (opts.count("WINOLDNAMES")): cmd = cmd + " oldnames.lib"
- if (opts.count("WINGDI")): cmd = cmd + " gdi32.lib"
- if (opts.count("ADVAPI")): cmd = cmd + " advapi32.lib"
- if (opts.count("GLUT")): cmd = cmd + " opengl32.lib glu32.lib"
- if (PkgSelected(opts,"PNG")): cmd = cmd + ' ' + THIRDPARTYLIBS + 'png/lib/libpandapng.lib'
- if (PkgSelected(opts,"JPEG")): cmd = cmd + ' ' + THIRDPARTYLIBS + 'jpeg/lib/libpandajpeg.lib'
- if (PkgSelected(opts,"TIFF")): cmd = cmd + ' ' + THIRDPARTYLIBS + 'tiff/lib/libpandatiff.lib'
- if (PkgSelected(opts,"ZLIB")): cmd = cmd + ' ' + THIRDPARTYLIBS + 'zlib/lib/libpandazlib1.lib'
- if (PkgSelected(opts,"VRPN")):
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'vrpn/lib/vrpn.lib'
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'vrpn/lib/quat.lib'
- if (PkgSelected(opts,"FMODEX")):
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'fmodex/lib/fmodex_vc.lib'
- if (PkgSelected(opts,"MILES")):
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'miles/lib/mss32.lib'
- if (PkgSelected(opts,"NVIDIACG")):
- if (opts.count("CGGL")):
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'nvidiacg/lib/cgGL.lib'
- if (opts.count("CGDX9")):
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'nvidiacg/lib/cgD3D9.lib'
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'nvidiacg/lib/cg.lib'
- if (PkgSelected(opts,"OPENSSL")):
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'openssl/lib/libpandassl.lib'
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'openssl/lib/libpandaeay.lib'
- if (PkgSelected(opts,"FREETYPE")):
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'freetype/lib/freetype.lib'
- if (PkgSelected(opts,"FFTW")):
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'fftw/lib/rfftw.lib'
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'fftw/lib/fftw.lib'
- if (PkgSelected(opts,"FFMPEG")):
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'ffmpeg/lib/avcodec-51-panda.lib'
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'ffmpeg/lib/avformat-50-panda.lib'
- cmd = cmd + ' ' + THIRDPARTYLIBS + 'ffmpeg/lib/avutil-49-panda.lib'
- for ver in MAYAVERSIONS:
- if (PkgSelected(opts,"MAYA"+ver)):
- cmd = cmd + ' "' + MAYASDK["MAYA"+ver] + '/lib/Foundation.lib"'
- cmd = cmd + ' "' + MAYASDK["MAYA"+ver] + '/lib/OpenMaya.lib"'
- cmd = cmd + ' "' + MAYASDK["MAYA"+ver] + '/lib/OpenMayaAnim.lib"'
- cmd = cmd + ' "' + MAYASDK["MAYA"+ver] + '/lib/OpenMayaUI.lib"'
- for ver in MAXVERSIONS:
- if (PkgSelected(opts,"MAX"+ver)):
- cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/core.lib"'
- cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/edmodel.lib"'
- cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/gfx.lib"'
- cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/geom.lib"'
- cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/mesh.lib"'
- cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/maxutil.lib"'
- cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/paramblk2.lib"'
- oscmd(cmd)
- setVC80CRTVersion(wdll+".manifest", VC80CRTVERSION)
- mtcmd = 'mt -manifest ' + wdll + '.manifest -outputresource:' + wdll
- if (wdll.endswith(".exe")==0): mtcmd = mtcmd + ';2'
- else: mtcmd = mtcmd + ';1'
- oscmd(mtcmd)
- if (COMPILER=="LINUX"):
- if (dll.endswith(".exe")): cmd = 'g++ -o ' + wdll + ' -Lbuilt/lib -L/usr/X11R6/lib'
- else: cmd = 'g++ -shared -o ' + wdll + ' -Lbuilt/lib -L/usr/X11R6/lib'
- for x in obj:
- suffix = x[-4:]
- if (suffix==".obj"): cmd = cmd + ' built/tmp/' + x[:-4] + '.o'
- elif (suffix==".dll"): cmd = cmd + ' -l' + x[3:-4]
- elif (suffix==".lib"): cmd = cmd + ' built/lib/' + x[:-4] + '.a'
- elif (suffix==".ilb"): cmd = cmd + ' built/tmp/' + x[:-4] + '.a'
- if (PkgSelected(opts,"FMODEX")): cmd = cmd + ' -L' + THIRDPARTYLIBS + 'fmodex/lib -lfmodex'
- if (PkgSelected(opts,"NVIDIACG")):
- cmd = cmd + ' -Lthirdparty/nvidiacg/lib '
- if (opts.count("CGGL")): cmd = cmd + " -lCgGL"
- cmd = cmd + " -lCg "
- if (PkgSelected(opts,"FFMPEG")): cmd = cmd + ' -L' + THIRDPARTYLIBS + 'ffmpeg/lib -lavformat -lavcodec -lavformat -lavutil'
- if (PkgSelected(opts,"ZLIB")): cmd = cmd + " -lz"
- if (PkgSelected(opts,"PNG")): cmd = cmd + " -lpng"
- if (PkgSelected(opts,"JPEG")): cmd = cmd + " -ljpeg"
- if (PkgSelected(opts,"TIFF")): cmd = cmd + " -ltiff"
- if (PkgSelected(opts,"OPENSSL")): cmd = cmd + " -lssl"
- if (PkgSelected(opts,"FREETYPE")): cmd = cmd + " -lfreetype"
- if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -L' + THIRDPARTYLIBS + 'vrpn/lib -lvrpn -lquat'
- if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -L' + THIRDPARTYLIBS + 'fftw/lib -lrfftw -lfftw'
- if (opts.count("GLUT")): cmd = cmd + " -lGL -lGLU"
- cmd = cmd + " -lpthread"
- oscmd(cmd)
- def EnqueueLink(dll=0, obj=[], opts=[], xdep=[], ldef=0):
- if (dll==0): exit("syntax error in EnqueueLink directive")
- SDependencyQueue([], [CompileLink, dll, obj, opts, ldef], [dll], obj + xdep)
- ##########################################################################################
- #
- # EnqueueEggPZ
- #
- ##########################################################################################
- def CompileEggPZ(preconv, eggpz, src):
- if (src.endswith(".egg")):
- CopyFile(eggpz[:-3], src)
- elif (src.endswith(".flt")):
- oscmd("built/bin/flt2egg " + preconv + " -o " + eggpz[:-3] + " " + src)
- oscmd("built/bin/pzip " + eggpz[:-3])
- def EnqueueEggPZ(preconv, eggpz, src):
- dep = [src, "flt2egg.exe"]
- SDependencyQueue([], [CompileEggPZ, preconv, eggpz, src], [eggpz], dep)
- ##########################################################################################
- #
- # EnqueueBamPZ
- #
- ##########################################################################################
- def CompileBamPZ(preconv, bampz, src):
- oscmd("built/bin/egg2bam " + preconv + " -o " + bampz[:-3] + " " + src)
- oscmd("built/bin/pzip " + bampz[:-3])
- def EnqueueBamPZ(preconv, bampz, src):
- dep = [src, "egg2bam.exe"]
- SDependencyQueue([], [CompileBamPZ, preconv, bampz, src], [bampz], dep)
- ##########################################################################################
- #
- # If the 'make depend' process discovers an 'include'
- # directive that includes one of the following files,
- # the specified file is not added as a dependency,
- # nor is it traversed.
- #
- ##########################################################################################
- CxxIgnoreHeader["Python.h"] = 1
- CxxIgnoreHeader["Python/Python.h"] = 1
- CxxIgnoreHeader["Cg/cg.h"] = 1
- CxxIgnoreHeader["Cg/cgGL.h"] = 1
- CxxIgnoreHeader["alloc.h"] = 1
- CxxIgnoreHeader["ctype.h"] = 1
- CxxIgnoreHeader["stdlib.h"] = 1
- CxxIgnoreHeader["ipc_thread.h"] = 1
- CxxIgnoreHeader["platform/symbian/symbian_print.h"] = 1
- CxxIgnoreHeader["hxtypes.h"] = 1
- CxxIgnoreHeader["hxcom.h"] = 1
- CxxIgnoreHeader["hxiids.h"] = 1
- CxxIgnoreHeader["hxpiids.h"] = 1
- CxxIgnoreHeader["dsound.h"] = 1
- CxxIgnoreHeader["hlxosstr.h"] = 1
- CxxIgnoreHeader["ddraw.h"] = 1
- CxxIgnoreHeader["mss.h"] = 1
- CxxIgnoreHeader["MacSocket.h"] = 1
- CxxIgnoreHeader["textureTransition.h"] = 1
- CxxIgnoreHeader["transformTransition.h"] = 1
- CxxIgnoreHeader["billboardTransition.h"] = 1
- CxxIgnoreHeader["transformTransition.h"] = 1
- CxxIgnoreHeader["transparencyTransition.h"] = 1
- CxxIgnoreHeader["allTransitionsWrapper.h"] = 1
- CxxIgnoreHeader["allTransitionsWrapper.h"] = 1
- CxxIgnoreHeader["namedNode.h"] = 1
- CxxIgnoreHeader["renderRelation.h"] = 1
- CxxIgnoreHeader["renderTraverser.h"] = 1
- CxxIgnoreHeader["get_rel_pos.h"] = 1
- # Ignore Windows headers.
- CxxIgnoreHeader["windows.h"] = 1
- CxxIgnoreHeader["windef.h"] = 1
- CxxIgnoreHeader["afxres.h"] = 1
- # Ignore MAX headers
- CxxIgnoreHeader["Max.h"] = 1
- CxxIgnoreHeader["iparamb2.h"] = 1
- CxxIgnoreHeader["iparamm2.h"] = 1
- CxxIgnoreHeader["istdplug.h"] = 1
- CxxIgnoreHeader["iskin.h"] = 1
- CxxIgnoreHeader["stdmat.h"] = 1
- CxxIgnoreHeader["phyexp.h"] = 1
- CxxIgnoreHeader["bipexp.h"] = 1
- CxxIgnoreHeader["modstack.h"] = 1
- CxxIgnoreHeader["decomp.h"] = 1
- CxxIgnoreHeader["shape.h"] = 1
- CxxIgnoreHeader["simpobj.h"] = 1
- CxxIgnoreHeader["surf_api.h"] = 1
- # OpenSSL headers
- CxxIgnoreHeader["openssl/evp.h"] = 1
- CxxIgnoreHeader["openssl/rand.h"] = 1
- CxxIgnoreHeader["openssl/md5.h"] = 1
- CxxIgnoreHeader["openssl/err.h"] = 1
- CxxIgnoreHeader["openssl/ssl.h"] = 1
- CxxIgnoreHeader["openssl/pem.h"] = 1
- CxxIgnoreHeader["openssl/rsa.h"] = 1
- CxxIgnoreHeader["openssl/bio.h"] = 1
- CxxIgnoreHeader["openssl/x509.h"] = 1
- # STD headers
- CxxIgnoreHeader["map"] = 1
- CxxIgnoreHeader["vector"] = 1
- CxxIgnoreHeader["set"] = 1
- CxxIgnoreHeader["algorithm"] = 1
- ##########################################################################################
- #
- # Create the directory tree
- #
- ##########################################################################################
- MakeDirectory("built")
- MakeDirectory("built/bin")
- MakeDirectory("built/lib")
- MakeDirectory("built/etc")
- MakeDirectory("built/plugins")
- MakeDirectory("built/include")
- MakeDirectory("built/include/parser-inc")
- MakeDirectory("built/include/parser-inc/openssl")
- MakeDirectory("built/include/parser-inc/netinet")
- MakeDirectory("built/include/parser-inc/Cg")
- MakeDirectory("built/include/openssl")
- MakeDirectory("built/tmp")
- MakeDirectory("built/models")
- MakeDirectory("built/models/audio")
- MakeDirectory("built/models/audio/sfx")
- MakeDirectory("built/models/icons")
- MakeDirectory("built/models/maps")
- MakeDirectory("built/models/misc")
- MakeDirectory("built/models/gui")
- MakeDirectory("built/direct")
- MakeDirectory("built/pandac")
- MakeDirectory("built/pandac/input")
- ##########################################################################################
- #
- # Generate dtool_config.h, prc_parameters.h, and dtool_have_xxx.dat
- #
- ##########################################################################################
- DEFAULT_SETTINGS=[
- #_Variable_________________________Windows___________________Unix__________
- ("HAVE_PYTHON", '1', '1'),
- ("PYTHON_FRAMEWORK", 'UNDEF', 'UNDEF'),
- ("COMPILE_IN_DEFAULT_FONT", '1', '1'),
- ("HAVE_MAYA", '1', '1'),
- ("MAYA_PRE_5_0", 'UNDEF', 'UNDEF'),
- ("HAVE_SOFTIMAGE", 'UNDEF', 'UNDEF'),
- ("SSL_097", 'UNDEF', 'UNDEF'),
- ("REPORT_OPENSSL_ERRORS", '1', '1'),
- ("HAVE_GL", '1', '1'),
- ("HAVE_MESA", 'UNDEF', 'UNDEF'),
- ("MESA_MGL", 'UNDEF', 'UNDEF'),
- ("HAVE_SGIGL", 'UNDEF', 'UNDEF'),
- ("HAVE_GLX", 'UNDEF', '1'),
- ("HAVE_WGL", '1', 'UNDEF'),
- ("HAVE_DX8", 'UNDEF', 'UNDEF'),
- ("HAVE_DX9", 'UNDEF', 'UNDEF'),
- ("HAVE_CHROMIUM", 'UNDEF', 'UNDEF'),
- ("HAVE_THREADS", 'UNDEF', 'UNDEF'),
- ("HAVE_AUDIO", '1', '1'),
- ("NOTIFY_DEBUG", 'UNDEF', 'UNDEF'),
- ("DO_PSTATS", 'UNDEF', 'UNDEF'),
- ("DO_COLLISION_RECORDING", 'UNDEF', 'UNDEF'),
- ("TRACK_IN_INTERPRETER", 'UNDEF', 'UNDEF'),
- ("DO_MEMORY_USAGE", 'UNDEF', 'UNDEF'),
- ("DO_PIPELINING", 'UNDEF', 'UNDEF'),
- ("EXPORT_TEMPLATES", 'yes', 'yes'),
- ("LINK_IN_GL", 'UNDEF', 'UNDEF'),
- ("LINK_IN_PHYSICS", 'UNDEF', 'UNDEF'),
- ("DEFAULT_PATHSEP", '";"', '":"'),
- ("WORDS_BIGENDIAN", 'UNDEF', 'UNDEF'),
- ("HAVE_NAMESPACE", '1', '1'),
- ("HAVE_OPEN_MASK", 'UNDEF', 'UNDEF'),
- ("HAVE_WCHAR_T", '1', '1'),
- ("HAVE_WSTRING", '1', '1'),
- ("HAVE_TYPENAME", '1', '1'),
- ("SIMPLE_STRUCT_POINTERS", '1', 'UNDEF'),
- ("HAVE_DINKUM", 'UNDEF', 'UNDEF'),
- ("HAVE_STL_HASH", 'UNDEF', 'UNDEF'),
- ("HAVE_GETTIMEOFDAY", 'UNDEF', '1'),
- ("GETTIMEOFDAY_ONE_PARAM", 'UNDEF', 'UNDEF'),
- ("HAVE_GETOPT", 'UNDEF', '1'),
- ("HAVE_GETOPT_LONG_ONLY", 'UNDEF', '1'),
- ("HAVE_GETOPT_H", 'UNDEF', '1'),
- ("HAVE_LINUX_INPUT_H", 'UNDEF', '1'),
- ("IOCTL_TERMINAL_WIDTH", 'UNDEF', '1'),
- ("HAVE_STREAMSIZE", '1', '1'),
- ("HAVE_IOS_TYPEDEFS", '1', '1'),
- ("HAVE_IOS_BINARY", '1', '1'),
- ("STATIC_INIT_GETENV", '1', 'UNDEF'),
- ("HAVE_PROC_SELF_EXE", 'UNDEF', '1'),
- ("HAVE_PROC_SELF_MAPS", 'UNDEF', '1'),
- ("HAVE_PROC_SELF_ENVIRON", 'UNDEF', '1'),
- ("HAVE_PROC_SELF_CMDLINE", 'UNDEF', '1'),
- ("HAVE_GLOBAL_ARGV", '1', 'UNDEF'),
- ("PROTOTYPE_GLOBAL_ARGV", 'UNDEF', 'UNDEF'),
- ("GLOBAL_ARGV", '__argv', 'UNDEF'),
- ("GLOBAL_ARGC", '__argc', 'UNDEF'),
- ("HAVE_IO_H", '1', 'UNDEF'),
- ("HAVE_IOSTREAM", '1', '1'),
- ("HAVE_MALLOC_H", '1', '1'),
- ("HAVE_SYS_MALLOC_H", 'UNDEF', 'UNDEF'),
- ("HAVE_ALLOCA_H", 'UNDEF', '1'),
- ("HAVE_LOCALE_H", 'UNDEF', '1'),
- ("HAVE_MINMAX_H", '1', 'UNDEF'),
- ("HAVE_SSTREAM", '1', '1'),
- ("HAVE_NEW", '1', '1'),
- ("HAVE_SYS_TYPES_H", '1', '1'),
- ("HAVE_SYS_TIME_H", 'UNDEF', '1'),
- ("HAVE_UNISTD_H", 'UNDEF', '1'),
- ("HAVE_UTIME_H", 'UNDEF', '1'),
- ("HAVE_GLOB_H", 'UNDEF', '1'),
- ("HAVE_DIRENT_H", 'UNDEF', '1'),
- ("HAVE_SYS_SOUNDCARD_H", 'UNDEF', '1'),
- ("HAVE_RTTI", '1', '1'),
- ("IS_LINUX", 'UNDEF', '1'),
- ("GLOBAL_OPERATOR_NEW_EXCEPTIONS", 'UNDEF', '1'),
- ("USE_STL_ALLOCATOR", '1', '1'),
- ("USE_MEMORY_DLMALLOC", '1', 'UNDEF'),
- ("USE_MEMORY_PTMALLOC", 'UNDEF', 'UNDEF'),
- ("USE_MEMORY_MALLOC", 'UNDEF', '1'),
- ("HAVE_ZLIB", 'UNDEF', 'UNDEF'),
- ("HAVE_PNG", 'UNDEF', 'UNDEF'),
- ("HAVE_JPEG", 'UNDEF', 'UNDEF'),
- ("HAVE_TIFF", 'UNDEF', 'UNDEF'),
- ("HAVE_VRPN", 'UNDEF', 'UNDEF'),
- ("HAVE_FMODEX", 'UNDEF', 'UNDEF'),
- ("HAVE_NVIDIACG", 'UNDEF', 'UNDEF'),
- ("HAVE_FREETYPE", 'UNDEF', 'UNDEF'),
- ("HAVE_FFTW", 'UNDEF', 'UNDEF'),
- ("HAVE_OPENSSL", 'UNDEF', 'UNDEF'),
- ("HAVE_NET", 'UNDEF', 'UNDEF'),
- ("HAVE_CG", 'UNDEF', 'UNDEF'),
- ("HAVE_CGGL", 'UNDEF', 'UNDEF'),
- ("HAVE_CGDX9", 'UNDEF', 'UNDEF'),
- ("HAVE_FFMPEG", 'UNDEF', 'UNDEF'),
- ("DEFAULT_PRC_DIR", '"<auto>etc"', '"<auto>etc"'),
- ("PRC_DIR_ENVVARS", '"PANDA_PRC_DIR"', '"PANDA_PRC_DIR"'),
- ("PRC_PATH_ENVVARS", '"PANDA_PRC_PATH"', '"PANDA_PRC_PATH"'),
- ("PRC_PATTERNS", '"*.prc"', '"*.prc"'),
- ("PRC_ENCRYPTED_PATTERNS", '"*.prc.pe"', '"*.prc.pe"'),
- ("PRC_ENCRYPTION_KEY", '""', '""'),
- ("PRC_EXECUTABLE_PATTERNS", '""', '""'),
- ("PRC_EXECUTABLE_ARGS_ENVVAR", '"PANDA_PRC_XARGS"', '"PANDA_PRC_XARGS"'),
- ("PRC_PUBLIC_KEYS_FILENAME", '""', '""'),
- ("PRC_RESPECT_TRUST_LEVEL", 'UNDEF', 'UNDEF'),
- ("PRC_DCONFIG_TRUST_LEVEL", '0', '0'),
- ("PRC_INC_TRUST_LEVEL", '0', '0'),
- ("PRC_SAVE_DESCRIPTIONS", '1', '1'),
- ]
- def WriteConfigSettings():
- settings={}
- if (sys.platform == "win32"):
- for key,win,unix in DEFAULT_SETTINGS:
- settings[key] = win
- else:
- for key,win,unix in DEFAULT_SETTINGS:
- settings[key] = unix
-
- for x in PACKAGES:
- if (OMIT.count(x)==0):
- if (settings.has_key("HAVE_"+x)):
- settings["HAVE_"+x] = '1'
-
- settings["HAVE_NET"] = '1'
-
- if (OMIT.count("NVIDIACG")==0):
- settings["HAVE_CG"] = '1'
- settings["HAVE_CGGL"] = '1'
- settings["HAVE_CGDX9"] = '1'
-
- if (OPTIMIZE <= 3):
- if (settings["HAVE_NET"] != 'UNDEF'):
- settings["DO_PSTATS"] = '1'
-
- if (OPTIMIZE <= 3):
- settings["DO_COLLISION_RECORDING"] = '1'
-
- #if (OPTIMIZE <= 2):
- # settings["TRACK_IN_INTERPRETER"] = '1'
-
- if (OPTIMIZE <= 3):
- settings["DO_MEMORY_USAGE"] = '1'
-
- #if (OPTIMIZE <= 1):
- # settings["DO_PIPELINING"] = '1'
-
- if (OPTIMIZE <= 3):
- settings["NOTIFY_DEBUG"] = '1'
- conf = "/* prc_parameters.h. Generated automatically by makepanda.py */\n"
- for key in settings.keys():
- if ((key == "DEFAULT_PRC_DIR") or (key[:4]=="PRC_")):
- val = settings[key]
- if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
- else: conf = conf + "#define " + key + " " + val + "\n"
- del settings[key]
- ConditionalWriteFile('built/include/prc_parameters.h', conf)
- conf = "/* dtool_config.h. Generated automatically by makepanda.py */\n"
- for key in settings.keys():
- val = settings[key]
- if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
- else: conf = conf + "#define " + key + " " + val + "\n"
- del settings[key]
- ConditionalWriteFile('built/include/dtool_config.h', conf)
- for x in PACKAGES:
- if (OMIT.count(x)): ConditionalWriteFile('built/tmp/dtool_have_'+x.lower()+'.dat',"0\n")
- else: ConditionalWriteFile('built/tmp/dtool_have_'+x.lower()+'.dat',"1\n")
- WriteConfigSettings()
- ##########################################################################################
- #
- # Generate pandaVersion.h, pythonversion, null.cxx
- #
- ##########################################################################################
- PANDAVERSION_H="""
- #define PANDA_MAJOR_VERSION VERSION1
- #define PANDA_MINOR_VERSION VERSION2
- #define PANDA_SEQUENCE_VERSION VERSION2
- #undef PANDA_OFFICIAL_VERSION
- #define PANDA_VERSION NVERSION
- #define PANDA_VERSION_STR "VERSION1.VERSION2.VERSION3"
- #define PANDA_DISTRIBUTOR "makepanda"
- """
- CHECKPANDAVERSION_CXX="""
- # include "dtoolbase.h"
- EXPCL_DTOOL int panda_version_VERSION1_VERSION2_VERSION3 = 0;
- """
- CHECKPANDAVERSION_H="""
- # include "dtoolbase.h"
- extern EXPCL_DTOOL int panda_version_VERSION1_VERSION2_VERSION3;
- # ifndef WIN32
- /* For Windows, exporting the symbol from the DLL is sufficient; the
- DLL will not load unless all expected public symbols are defined.
- Other systems may not mind if the symbol is absent unless we
- explictly write code that references it. */
- static int check_panda_version = panda_version_VERSION1_VERSION2_VERSION3;
- # endif
- """
- def CreatePandaVersionFiles():
- version1=int(VERSION.split(".")[0])
- version2=int(VERSION.split(".")[1])
- version3=int(VERSION.split(".")[2])
- nversion=version1*1000000+version2*1000+version3
-
- pandaversion_h = PANDAVERSION_H.replace("VERSION1",str(version1))
- pandaversion_h = pandaversion_h.replace("VERSION2",str(version2))
- pandaversion_h = pandaversion_h.replace("VERSION3",str(version3))
- pandaversion_h = pandaversion_h.replace("NVERSION",str(nversion))
-
- checkpandaversion_cxx = CHECKPANDAVERSION_CXX.replace("VERSION1",str(version1))
- checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION2",str(version2))
- checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION3",str(version3))
- checkpandaversion_cxx = checkpandaversion_cxx.replace("NVERSION",str(nversion))
-
- checkpandaversion_h = CHECKPANDAVERSION_H.replace("VERSION1",str(version1))
- checkpandaversion_h = checkpandaversion_h.replace("VERSION2",str(version2))
- checkpandaversion_h = checkpandaversion_h.replace("VERSION3",str(version3))
- checkpandaversion_h = checkpandaversion_h.replace("NVERSION",str(nversion))
- ConditionalWriteFile('built/include/pandaVersion.h', pandaversion_h)
- ConditionalWriteFile('built/include/checkPandaVersion.cxx', checkpandaversion_cxx)
- ConditionalWriteFile('built/include/checkPandaVersion.h', checkpandaversion_h)
- if (OMIT.count("PYTHON")==0):
- ConditionalWriteFile("built/tmp/pythonversion", os.path.basename(PYTHONSDK))
- ConditionalWriteFile("built/tmp/null.cxx","")
- CreatePandaVersionFiles()
- ##########################################################################################
- #
- # Generate direct/__init__.py
- #
- ##########################################################################################
- DIRECTINIT="""
- import os,sys
- srcdir1 = os.path.join(__path__[0], 'src')
- srcdir2 = os.path.join(__path__[0], '..', '..', 'direct', 'src')
- if (os.path.isdir(srcdir1)): __path__[0] = srcdir1
- elif (os.path.isdir(srcdir2)): __path__[0] = srcdir2
- else: exit("Cannot find the 'direct' tree")
- """
- if (OMIT.count("PYTHON")==0):
- ConditionalWriteFile('built/direct/__init__.py', DIRECTINIT)
- ##########################################################################################
- #
- # Generate the PRC files into the ETC directory.
- #
- ##########################################################################################
- confautoprc=ReadFile("makepanda/confauto.in")
- if (os.path.isfile("makepanda/myconfig.in")):
- configprc=ReadFile("makepanda/myconfig.in")
- else:
- configprc=ReadFile("makepanda/config.in")
- if (sys.platform != "win32"):
- confautoprc = confautoprc.replace("aux-display pandadx9","")
- confautoprc = confautoprc.replace("aux-display pandadx8","")
- confautoprc = confautoprc.replace("aux-display pandadx7","")
- ConditionalWriteFile("built/etc/Config.prc", configprc)
- ConditionalWriteFile("built/etc/Confauto.prc", confautoprc)
- ##########################################################################################
- #
- # Copy the precompiled binaries and DLLs into the build.
- #
- ##########################################################################################
- for pkg in (PACKAGES + ["extras"]):
- if (OMIT.count(pkg)==0):
- if (COMPILER == "MSVC"):
- if (os.path.exists(THIRDPARTYLIBS+pkg.lower()+"/bin")):
- CopyAllFiles("built/bin/",THIRDPARTYLIBS+pkg.lower()+"/bin/")
- if (COMPILER == "LINUX"):
- if (os.path.exists(THIRDPARTYLIBS+pkg.lower()+"/lib")):
- CopyAllFiles("built/lib/",THIRDPARTYLIBS+pkg.lower()+"/lib/")
- if (sys.platform == "win32"):
- if (OMIT.count("PYTHON")==0):
- CopyFile('built/bin/python24.dll', 'thirdparty/win-python/python24.dll')
- CopyTree('built/python', 'thirdparty/win-python')
- CopyFile('built/python/ppython.exe', 'thirdparty/win-python/python.exe')
- CopyFile('built/python/ppythonw.exe', 'thirdparty/win-python/pythonw.exe')
- ConditionalWriteFile('built/python/panda.pth',"..\n../bin\n")
- ########################################################################
- ##
- ## Copy various stuff into the build.
- ##
- ########################################################################
- CopyFile("built/", "doc/LICENSE")
- CopyFile("built/", "doc/ReleaseNotes")
- CopyAllFiles("built/plugins/", "pandatool/src/scripts/", ".mel")
- CopyAllFiles("built/plugins/", "pandatool/src/scripts/", ".ms")
- if (OMIT.count("PYTHON")==0):
- CopyTree('built/Pmw', 'thirdparty/Pmw')
- CopyTree('built/SceneEditor', 'SceneEditor')
- ConditionalWriteFile('built/include/ctl3d.h', '/* dummy file to make MAX happy */')
- ########################################################################
- #
- # Copy header files to the built/include/parser-inc directory.
- #
- ########################################################################
- CopyAllFiles('built/include/parser-inc/','dtool/src/parser-inc/')
- CopyAllFiles('built/include/parser-inc/openssl/','dtool/src/parser-inc/')
- CopyAllFiles('built/include/parser-inc/netinet/','dtool/src/parser-inc/')
- CopyFile('built/include/parser-inc/Cg/','dtool/src/parser-inc/cg.h')
- CopyFile('built/include/parser-inc/Cg/','dtool/src/parser-inc/cgGL.h')
- ########################################################################
- #
- # Transfer all header files to the built/include directory.
- #
- ########################################################################
- CopyAllHeaders('dtool/src/dtoolbase')
- CopyAllHeaders('dtool/src/dtoolutil', skip=["pandaVersion.h", "checkPandaVersion.h"])
- CopyAllHeaders('dtool/metalibs/dtool')
- CopyAllHeaders('dtool/src/cppparser')
- CopyAllHeaders('dtool/src/prc')
- CopyAllHeaders('dtool/src/dconfig')
- CopyAllHeaders('dtool/src/interrogatedb')
- CopyAllHeaders('dtool/metalibs/dtoolconfig')
- CopyAllHeaders('dtool/src/pystub')
- CopyAllHeaders('dtool/src/interrogate')
- CopyAllHeaders('dtool/src/test_interrogate')
- CopyAllHeaders('panda/src/putil')
- CopyAllHeaders('panda/src/pandabase')
- CopyAllHeaders('panda/src/express')
- CopyAllHeaders('panda/src/downloader')
- CopyAllHeaders('panda/metalibs/pandaexpress')
- CopyAllHeaders('panda/src/pipeline')
- CopyAllHeaders('panda/src/putil')
- CopyAllHeaders('dtool/src/prckeys')
- CopyAllHeaders('panda/src/audio')
- CopyAllHeaders('panda/src/event')
- CopyAllHeaders('panda/src/linmath')
- CopyAllHeaders('panda/src/mathutil')
- CopyAllHeaders('panda/src/gsgbase')
- CopyAllHeaders('panda/src/pnmimage')
- CopyAllHeaders('panda/src/nativenet')
- CopyAllHeaders('panda/src/net')
- CopyAllHeaders('panda/src/pstatclient')
- CopyAllHeaders('panda/src/gobj')
- CopyAllHeaders('panda/src/lerp')
- CopyAllHeaders('panda/src/pgraph')
- CopyAllHeaders('panda/src/cull')
- CopyAllHeaders('panda/src/effects')
- CopyAllHeaders('panda/src/chan')
- CopyAllHeaders('panda/src/char')
- CopyAllHeaders('panda/src/dgraph')
- CopyAllHeaders('panda/src/display')
- CopyAllHeaders('panda/src/device')
- CopyAllHeaders('panda/src/pnmtext')
- CopyAllHeaders('panda/src/text')
- CopyAllHeaders('panda/src/grutil')
- CopyAllHeaders('panda/src/tform')
- CopyAllHeaders('panda/src/collide')
- CopyAllHeaders('panda/src/parametrics')
- CopyAllHeaders('panda/src/pgui')
- CopyAllHeaders('panda/src/pnmimagetypes')
- CopyAllHeaders('panda/src/recorder')
- CopyAllHeaders('panda/src/vrpn')
- CopyAllHeaders('panda/src/helix')
- CopyAllHeaders('panda/src/glgsg')
- CopyAllHeaders('panda/src/wgldisplay')
- CopyAllHeaders('panda/src/physics')
- CopyAllHeaders('panda/src/particlesystem')
- CopyAllHeaders('panda/metalibs/panda')
- CopyAllHeaders('panda/src/audiotraits')
- CopyAllHeaders('panda/src/audiotraits')
- CopyAllHeaders('panda/src/distort')
- CopyAllHeaders('panda/src/downloadertools')
- CopyAllHeaders('panda/src/windisplay')
- # CopyAllHeaders('panda/src/dxgsg7')
- # CopyAllHeaders('panda/metalibs/pandadx7')
- CopyAllHeaders('panda/src/dxgsg8')
- CopyAllHeaders('panda/metalibs/pandadx8')
- CopyAllHeaders('panda/src/dxgsg9')
- CopyAllHeaders('panda/metalibs/pandadx9')
- CopyAllHeaders('panda/src/egg')
- CopyAllHeaders('panda/src/egg2pg')
- CopyAllHeaders('panda/src/framework')
- CopyAllHeaders('panda/metalibs/pandafx')
- CopyAllHeaders('panda/src/glstuff')
- CopyAllHeaders('panda/src/glgsg')
- CopyAllHeaders('panda/metalibs/pandaegg')
- if (sys.platform != "win32"):
- CopyAllHeaders('panda/src/glxdisplay')
- else:
- CopyAllHeaders('panda/src/wgldisplay')
- CopyAllHeaders('panda/metalibs/pandagl')
- CopyAllHeaders('panda/src/physics')
- CopyAllHeaders('panda/src/particlesystem')
- CopyAllHeaders('panda/metalibs/pandaphysics')
- CopyAllHeaders('panda/src/testbed')
- CopyAllHeaders('direct/src/directbase')
- CopyAllHeaders('direct/src/dcparser')
- CopyAllHeaders('direct/src/deadrec')
- CopyAllHeaders('direct/src/distributed')
- CopyAllHeaders('direct/src/interval')
- CopyAllHeaders('direct/src/showbase')
- CopyAllHeaders('direct/metalibs/direct')
- CopyAllHeaders('direct/src/dcparse')
- CopyAllHeaders('direct/src/heapq')
- CopyAllHeaders('pandatool/src/pandatoolbase')
- CopyAllHeaders('pandatool/src/converter')
- CopyAllHeaders('pandatool/src/progbase')
- CopyAllHeaders('pandatool/src/eggbase')
- CopyAllHeaders('pandatool/src/bam')
- CopyAllHeaders('pandatool/src/cvscopy')
- CopyAllHeaders('pandatool/src/dxf')
- CopyAllHeaders('pandatool/src/dxfegg')
- CopyAllHeaders('pandatool/src/dxfprogs')
- CopyAllHeaders('pandatool/src/palettizer')
- CopyAllHeaders('pandatool/src/egg-mkfont')
- CopyAllHeaders('pandatool/src/eggcharbase')
- CopyAllHeaders('pandatool/src/egg-optchar')
- CopyAllHeaders('pandatool/src/egg-palettize')
- CopyAllHeaders('pandatool/src/egg-qtess')
- CopyAllHeaders('pandatool/src/eggprogs')
- CopyAllHeaders('pandatool/src/flt')
- CopyAllHeaders('pandatool/src/fltegg')
- CopyAllHeaders('pandatool/src/fltprogs')
- CopyAllHeaders('pandatool/src/imagebase')
- CopyAllHeaders('pandatool/src/imageprogs')
- CopyAllHeaders('pandatool/src/lwo')
- CopyAllHeaders('pandatool/src/lwoegg')
- CopyAllHeaders('pandatool/src/lwoprogs')
- CopyAllHeaders('pandatool/src/maya')
- CopyAllHeaders('pandatool/src/mayaegg')
- CopyAllHeaders('pandatool/src/maxegg')
- CopyAllHeaders('pandatool/src/maxprogs')
- CopyAllHeaders('pandatool/src/vrml')
- CopyAllHeaders('pandatool/src/vrmlegg')
- CopyAllHeaders('pandatool/src/xfile')
- CopyAllHeaders('pandatool/src/xfileegg')
- CopyAllHeaders('pandatool/src/ptloader')
- CopyAllHeaders('pandatool/src/miscprogs')
- CopyAllHeaders('pandatool/src/pstatserver')
- CopyAllHeaders('pandatool/src/softprogs')
- CopyAllHeaders('pandatool/src/text-stats')
- CopyAllHeaders('pandatool/src/vrmlprogs')
- CopyAllHeaders('pandatool/src/win-stats')
- CopyAllHeaders('pandatool/src/xfileprogs')
- ########################################################################
- #
- # This section contains a list of all the files that need to be compiled.
- #
- ########################################################################
- print "Generating dependencies..."
- sys.stdout.flush()
- #
- # DIRECTORY: dtool/src/dtoolbase/
- #
- IPATH=['dtool/src/dtoolbase']
- OPTS=['BUILDING_DTOOL', 'OPT3']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtoolbase_composite1.cxx', obj='dtoolbase_composite1.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtoolbase_composite2.cxx', obj='dtoolbase_composite2.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='lookup3.c', obj='dtoolbase_lookup3.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='indent.cxx', obj='dtoolbase_indent.obj')
- if (sys.platform == "win32"):
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dlmalloc.c', obj='dtoolbase_allocator.obj')
- else:
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='null.cxx', obj='dtoolbase_allocator.obj')
- #
- # DIRECTORY: dtool/src/dtoolutil/
- #
- IPATH=['dtool/src/dtoolutil']
- OPTS=['BUILDING_DTOOL', 'OPT3']
- CopyFile('built/include/','dtool/src/dtoolutil/vector_src.cxx')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='gnu_getopt.c', obj='dtoolutil_gnu_getopt.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='gnu_getopt1.c', obj='dtoolutil_gnu_getopt1.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtoolutil_composite.cxx', obj='dtoolutil_composite.obj')
- #
- # DIRECTORY: dtool/metalibs/dtool/
- #
- IPATH=['dtool/metalibs/dtool']
- OPTS=['BUILDING_DTOOL', 'OPT3']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtool.cxx', obj='dtool_dtool.obj')
- EnqueueLink(opts=['ADVAPI', 'OPT3'], dll='libp3dtool.dll', obj=[
- 'dtool_dtool.obj',
- 'dtoolutil_gnu_getopt.obj',
- 'dtoolutil_gnu_getopt1.obj',
- 'dtoolutil_composite.obj',
- 'dtoolbase_allocator.obj',
- 'dtoolbase_composite1.obj',
- 'dtoolbase_composite2.obj',
- 'dtoolbase_indent.obj',
- 'dtoolbase_lookup3.obj'
- ])
- #
- # DIRECTORY: dtool/src/cppparser/
- #
- IPATH=['dtool/src/cppparser']
- OPTS=['OPT3']
- CreateStubHeader("built/include/cppBison.h")
- EnqueueBison(ipath=IPATH, opts=OPTS, pre='cppyy', src='cppBison.yxx', dsth='cppBison.h', obj='cppParser_cppBison.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='cppParser_composite.cxx', obj='cppParser_composite.obj')
- EnqueueLib(lib='libcppParser.ilb', obj=[
- 'cppParser_composite.obj',
- 'cppParser_cppBison.obj',
- ])
- #
- # DIRECTORY: dtool/src/prc/
- #
- IPATH=['dtool/src/prc']
- OPTS=['BUILDING_DTOOLCONFIG', 'OPENSSL', 'OPT3']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='prc_composite.cxx', obj='prc_composite.obj')
- #
- # DIRECTORY: dtool/src/dconfig/
- #
- IPATH=['dtool/src/dconfig']
- OPTS=['BUILDING_DTOOLCONFIG', 'OPT3']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dconfig_composite.cxx', obj='dconfig_composite.obj')
- #
- # DIRECTORY: dtool/src/interrogatedb/
- #
- IPATH=['dtool/src/interrogatedb']
- OPTS=['BUILDING_DTOOLCONFIG', 'OPT3']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='interrogatedb_composite.cxx', obj='interrogatedb_composite.obj')
- #
- # DIRECTORY: dtool/metalibs/dtoolconfig/
- #
- IPATH=['dtool/metalibs/dtoolconfig']
- OPTS=['BUILDING_DTOOLCONFIG', 'OPT3']
- SRCFILE="pydtool.cxx"
- if (OMIT.count("PYTHON")): SRCFILE="null.cxx"
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtoolconfig.cxx', obj='dtoolconfig_dtoolconfig.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src=SRCFILE, obj='dtoolconfig_pydtool.obj', xdep=["dtool_have_python.dat"])
- EnqueueLink(opts=['ADVAPI', 'OPENSSL', 'OPT3'], dll='libp3dtoolconfig.dll', obj=[
- 'dtoolconfig_dtoolconfig.obj',
- 'dtoolconfig_pydtool.obj',
- 'interrogatedb_composite.obj',
- 'dconfig_composite.obj',
- 'prc_composite.obj',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: dtool/src/pystub/
- #
- IPATH=['dtool/src/pystub']
- OPTS=['BUILDING_DTOOLCONFIG', 'OPT3']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pystub.cxx', obj='pystub_pystub.obj')
- EnqueueLink(opts=['ADVAPI', 'OPT3'], dll='libp3pystub.dll', obj=[
- 'pystub_pystub.obj',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: dtool/src/interrogate/
- #
- IPATH=['dtool/src/interrogate', 'dtool/src/cppparser', 'dtool/src/interrogatedb']
- OPTS=[ 'OPT3']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='interrogate_composite.cxx', obj='interrogate_composite.obj')
- EnqueueLink(opts=['ADVAPI', 'OPENSSL', 'OPT3'], dll='interrogate.exe', obj=[
- 'interrogate_composite.obj',
- 'libcppParser.ilb',
- 'libp3pystub.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='interrogate_module.cxx', obj='interrogate_module_interrogate_module.obj')
- EnqueueLink(opts=['ADVAPI', 'OPENSSL', 'OPT3'], dll='interrogate_module.exe', obj=[
- 'interrogate_module_interrogate_module.obj',
- 'libcppParser.ilb',
- 'libp3pystub.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='parse_file.cxx', obj='parse_file_parse_file.obj')
- EnqueueLink(opts=['ADVAPI', 'OPENSSL', 'OPT3'], dll='parse_file.exe', obj=[
- 'parse_file_parse_file.obj',
- 'libcppParser.ilb',
- 'libp3pystub.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: dtool/src/prckeys/
- #
- if (OMIT.count("OPENSSL")==0):
- IPATH=['dtool/src/prckeys']
- OPTS=['OPENSSL']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='makePrcKey.cxx', obj='make-prc-key_makePrcKey.obj')
- EnqueueLink(opts=['ADVAPI', 'OPENSSL'], dll='make-prc-key.exe', obj=[
- 'make-prc-key_makePrcKey.obj',
- 'libp3pystub.dll',
- 'libp3dtool.dll',
- 'libp3dtoolconfig.dll',
- ])
- #
- # DIRECTORY: dtool/src/test_interrogate/
- #
- IPATH=['dtool/src/test_interrogate']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='test_interrogate.cxx', obj='test_interrogate_test_interrogate.obj')
- EnqueueLink(opts=['ADVAPI', 'OPENSSL'], dll='test_interrogate.exe', obj=[
- 'test_interrogate_test_interrogate.obj',
- 'libp3pystub.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/src/pandabase/
- #
- IPATH=['panda/src/pandabase']
- OPTS=['BUILDING_PANDAEXPRESS']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandabase.cxx', obj='pandabase_pandabase.obj')
- #
- # DIRECTORY: panda/src/express/
- #
- IPATH=['panda/src/express']
- OPTS=['BUILDING_PANDAEXPRESS', 'OPENSSL', 'ZLIB']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='express_composite1.cxx', obj='express_composite1.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='express_composite2.cxx', obj='express_composite2.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libexpress.in', obj='libexpress_igate.obj',
- src='panda/src/express', module='pandaexpress', library='libexpress',
- skip=[], also=["express_composite.cxx"])
- #
- # DIRECTORY: panda/src/downloader/
- #
- IPATH=['panda/src/downloader']
- OPTS=['BUILDING_PANDAEXPRESS', 'OPENSSL', 'ZLIB']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='downloader_composite.cxx', obj='downloader_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdownloader.in', obj='libdownloader_igate.obj',
- src='panda/src/downloader', module='pandaexpress', library='libdownloader',
- skip=[], also=["downloader_composite.cxx"])
- #
- # DIRECTORY: panda/metalibs/pandaexpress/
- #
- IPATH=['panda/metalibs/pandaexpress']
- OPTS=['BUILDING_PANDAEXPRESS', 'ZLIB']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaexpress.cxx', obj='pandaexpress_pandaexpress.obj')
- EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandaexpress_module.obj',
- module='pandaexpress', library='libpandaexpress',
- files=['libdownloader.in', 'libexpress.in'])
- EnqueueLink(opts=['ADVAPI', 'WINSOCK2', 'OPENSSL', 'ZLIB'], dll='libpandaexpress.dll', obj=[
- 'pandaexpress_pandaexpress.obj',
- 'libpandaexpress_module.obj',
- 'downloader_composite.obj',
- 'libdownloader_igate.obj',
- 'express_composite1.obj',
- 'express_composite2.obj',
- 'libexpress_igate.obj',
- 'pandabase_pandabase.obj',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/src/pipeline/
- #
- IPATH=['panda/src/pipeline']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pipeline_composite.cxx', obj='pipeline_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpipeline.in', obj='libpipeline_igate.obj',
- src='panda/src/pipeline', module='panda', library='libpipeline',
- skip=[], also=["pipeline_composite.cxx"])
- #
- # DIRECTORY: panda/src/putil/
- #
- IPATH=['panda/src/putil']
- OPTS=['BUILDING_PANDA', 'ZLIB']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='putil_composite1.cxx', obj='putil_composite1.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='putil_composite2.cxx', obj='putil_composite2.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libputil.in', obj='libputil_igate.obj',
- src='panda/src/putil', module='panda', library='libputil',
- skip=["test_bam.h"], also=["putil_composite.cxx"])
- #
- # DIRECTORY: panda/src/audio/
- #
- IPATH=['panda/src/audio']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='audio_composite.cxx', obj='audio_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libaudio.in', obj='libaudio_igate.obj',
- src='panda/src/audio', module='panda', library='libaudio',
- skip="ALL", also=["audio.h"])
- #
- # DIRECTORY: panda/src/event/
- #
- IPATH=['panda/src/event']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='event_composite.cxx', obj='event_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libevent.in', obj='libevent_igate.obj',
- src='panda/src/event', module='panda', library='libevent',
- skip=[], also=["event_composite.cxx"])
- #
- # DIRECTORY: panda/src/linmath/
- #
- IPATH=['panda/src/linmath']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='linmath_composite.cxx', obj='linmath_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='liblinmath.in', obj='liblinmath_igate.obj',
- src='panda/src/linmath', module='panda', library='liblinmath',
- skip=['lmat_ops_src.h', 'cast_to_double.h', 'lmat_ops.h', 'cast_to_float.h'],
- also=["linmath_composite.cxx"])
- #
- # DIRECTORY: panda/src/mathutil/
- #
- IPATH=['panda/src/mathutil']
- OPTS=['BUILDING_PANDA', 'FFTW']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='mathutil_composite.cxx', obj='mathutil_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libmathutil.in', obj='libmathutil_igate.obj',
- src='panda/src/mathutil', module='panda', library='libmathutil',
- skip=['mathHelpers.h'], also=["mathutil_composite.cxx"])
- #
- # DIRECTORY: panda/src/gsgbase/
- #
- IPATH=['panda/src/gsgbase']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='gsgbase_composite.cxx', obj='gsgbase_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libgsgbase.in', obj='libgsgbase_igate.obj',
- src='panda/src/gsgbase', module='panda', library='libgsgbase',
- skip=[], also=["gsgbase_composite.cxx"])
- #
- # DIRECTORY: panda/src/pnmimage/
- #
- IPATH=['panda/src/pnmimage']
- OPTS=['BUILDING_PANDA', 'ZLIB']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pnmimage_composite.cxx', obj='pnmimage_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpnmimage.in', obj='libpnmimage_igate.obj',
- src='panda/src/pnmimage', module='panda', library='libpnmimage',
- skip=[], also=["pnmimage_composite.cxx"])
- #
- # DIRECTORY: panda/src/nativenet/
- #
-
- IPATH=['panda/src/nativenet']
- OPTS=['OPENSSL', 'BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='nativenet_composite1.cxx', obj='nativenet_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libnativenet.in', obj='libnativenet_igate.obj',
- src='panda/src/nativenet', module='panda', library='libnativenet',
- skip=[], also=["nativenet_composite1.cxx"])
- #
- # DIRECTORY: panda/src/net/
- #
- IPATH=['panda/src/net']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='net_composite.cxx', obj='net_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libnet.in', obj='libnet_igate.obj',
- src='panda/src/net', module='panda', library='libnet',
- skip=["datagram_ui.h"], also=["net_composite.cxx"])
- #
- # DIRECTORY: panda/src/pstatclient/
- #
- IPATH=['panda/src/pstatclient']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pstatclient_composite.cxx', obj='pstatclient_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpstatclient.in', obj='libpstatclient_igate.obj',
- src='panda/src/pstatclient', module='panda', library='libpstatclient',
- skip=[], also=["pstatclient_composite.cxx"])
- #
- # DIRECTORY: panda/src/gobj/
- #
- IPATH=['panda/src/gobj']
- OPTS=['BUILDING_PANDA', 'NVIDIACG', 'ZLIB']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='gobj_composite1.cxx', obj='gobj_composite1.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='gobj_composite2.cxx', obj='gobj_composite2.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libgobj.in', obj='libgobj_igate.obj',
- src='panda/src/gobj', module='panda', library='libgobj',
- skip=[], also=["gobj_composite.cxx"])
- #
- # DIRECTORY: panda/src/lerp/
- #
- IPATH=['panda/src/lerp']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='lerp_composite.cxx', obj='lerp_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='liblerp.in', obj='liblerp_igate.obj',
- src='panda/src/lerp', module='panda', library='liblerp',
- skip=["lerp_headers.h","lerpchans.h"], also=["lerp_composite.cxx"])
- #
- # DIRECTORY: panda/src/pgraph/
- #
- IPATH=['panda/src/pgraph']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='nodePath.cxx', obj='pgraph_nodePath.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgraph_composite1.cxx', obj='pgraph_composite1.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgraph_composite2.cxx', obj='pgraph_composite2.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgraph_composite3.cxx', obj='pgraph_composite3.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgraph_composite4.cxx', obj='pgraph_composite4.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpgraph.in', obj='libpgraph_igate.obj',
- src='panda/src/pgraph', module='panda', library='libpgraph',
- skip=["antialiasAttrib.h"],
- also=["nodePath.cxx", "pgraph_composite.cxx"])
- #
- # DIRECTORY: panda/src/cull/
- #
- IPATH=['panda/src/cull']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='cull_composite.cxx', obj='cull_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libcull.in', obj='libcull_igate.obj',
- src='panda/src/cull', module='panda', library='libcull',
- skip=[], also=["cull_composite.cxx"])
- #
- # DIRECTORY: panda/src/effects/
- #
- IPATH=['panda/src/effects']
- OPTS=['BUILDING_PANDAFX', 'NVIDIACG']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='effects_composite.cxx', obj='effects_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libeffects.in', obj='libeffects_igate.obj',
- src='panda/src/effects', module='pandafx', library='libeffects',
- skip=["cgShader.h", "cgShaderAttrib.h", "cgShaderContext.h"],
- also=["effects_composite.cxx"])
- #
- # DIRECTORY: panda/src/chan/
- #
- IPATH=['panda/src/chan']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='chan_composite.cxx', obj='chan_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libchan.in', obj='libchan_igate.obj',
- src='panda/src/chan', module='panda', library='libchan',
- skip=['movingPart.h', 'chan_headers.h', 'animChannelFixed.h'],
- also=["chan_composite.cxx"])
- #
- # DIRECTORY: panda/src/char/
- #
- IPATH=['panda/src/char']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='char_composite.cxx', obj='char_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libchar.in', obj='libchar_igate.obj',
- src='panda/src/char', module='panda', library='libchar',
- skip=[], also=["char_composite.cxx"])
- #
- # DIRECTORY: panda/src/dgraph/
- #
- IPATH=['panda/src/dgraph']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dgraph_composite.cxx', obj='dgraph_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdgraph.in', obj='libdgraph_igate.obj',
- src='panda/src/dgraph', module='panda', library='libdgraph',
- skip=[], also=["dgraph_composite.cxx"])
- #
- # DIRECTORY: panda/src/display/
- #
- IPATH=['panda/src/display']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='display_composite.cxx', obj='display_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdisplay.in', obj='libdisplay_igate.obj',
- src='panda/src/display', module='panda', library='libdisplay',
- skip=['renderBuffer.h'], also=["display_composite.cxx"])
- #
- # DIRECTORY: panda/src/device/
- #
- IPATH=['panda/src/device']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='device_composite.cxx', obj='device_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdevice.in', obj='libdevice_igate.obj',
- src='panda/src/device', module='panda', library='libdevice',
- skip=[], also=["device_composite.cxx"])
- #
- # DIRECTORY: panda/src/pnmtext/
- #
- if (OMIT.count("FREETYPE")==0):
- IPATH=['panda/src/pnmtext']
- OPTS=['BUILDING_PANDA', 'FREETYPE']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pnmtext_composite.cxx', obj='pnmtext_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpnmtext.in', obj='libpnmtext_igate.obj',
- src='panda/src/pnmtext', module='panda', library='libpnmtext',
- skip=[], also=["pnmtext_composite.cxx"])
- #
- # DIRECTORY: panda/src/text/
- #
- IPATH=['panda/src/text']
- OPTS=['BUILDING_PANDA', 'ZLIB', 'FREETYPE']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='text_composite.cxx', obj='text_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libtext.in', obj='libtext_igate.obj',
- src='panda/src/text', module='panda', library='libtext',
- skip=[], also=["text_composite.cxx"])
- #
- # DIRECTORY: panda/src/grutil/
- #
- IPATH=['panda/src/grutil']
- OPTS=['BUILDING_PANDA', 'FFMPEG']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='multitexReducer.cxx', obj='grutil_multitexReducer.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='grutil_composite.cxx', obj='grutil_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libgrutil.in', obj='libgrutil_igate.obj',
- src='panda/src/grutil', module='panda', library='libgrutil',
- skip=[], also=["multitexReducer.cxx","grutil_composite.cxx"])
- #
- # DIRECTORY: panda/src/tform/
- #
- IPATH=['panda/src/tform']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='tform_composite.cxx', obj='tform_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libtform.in', obj='libtform_igate.obj',
- src='panda/src/tform', module='panda', library='libtform',
- skip=[], also=["tform_composite.cxx"])
- #
- # DIRECTORY: panda/src/collide/
- #
- IPATH=['panda/src/collide']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='collide_composite.cxx', obj='collide_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libcollide.in', obj='libcollide_igate.obj',
- src='panda/src/collide', module='panda', library='libcollide',
- skip=["collide_headers.h"], also=["collide_composite.cxx"])
- #
- # DIRECTORY: panda/src/parametrics/
- #
- IPATH=['panda/src/parametrics']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='parametrics_composite.cxx', obj='parametrics_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libparametrics.in', obj='libparametrics_igate.obj',
- src='panda/src/parametrics', module='panda', library='libparametrics',
- skip=['nurbsPPCurve.h'], also=["parametrics_composite.cxx"])
- #
- # DIRECTORY: panda/src/pgui/
- #
- IPATH=['panda/src/pgui']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgui_composite.cxx', obj='pgui_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpgui.in', obj='libpgui_igate.obj',
- src='panda/src/pgui', module='panda', library='libpgui',
- skip=[], also=["pgui_composite.cxx"])
- #
- # DIRECTORY: panda/src/pnmimagetypes/
- #
- IPATH=['panda/src/pnmimagetypes', 'panda/src/pnmimage']
- OPTS=['BUILDING_PANDA', 'PNG', 'ZLIB', 'JPEG', 'ZLIB', 'JPEG', 'TIFF']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pnmFileTypePNG.cxx', obj='pnmimagetypes_pnmFileTypePNG.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pnmFileTypeTIFF.cxx', obj='pnmimagetypes_pnmFileTypeTIFF.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pnmimagetypes_composite.cxx', obj='pnmimagetypes_composite.obj')
- #
- # DIRECTORY: panda/src/recorder/
- #
- IPATH=['panda/src/recorder']
- OPTS=['BUILDING_PANDA']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='recorder_composite.cxx', obj='recorder_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='librecorder.in', obj='librecorder_igate.obj',
- src='panda/src/recorder', module='panda', library='librecorder',
- skip=[], also=["recorder_composite.cxx"])
- #
- # DIRECTORY: panda/src/vrpn/
- #
- if (OMIT.count("VRPN")==0):
- IPATH=['panda/src/vrpn']
- OPTS=['BUILDING_PANDA', 'VRPN']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrpn_composite.cxx', obj='pvrpn_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpvrpn.in', obj='libpvrpn_igate.obj',
- src='panda/src/vrpn', module='panda', library='libpvrpn',
- skip=[], also=["vrpn_composite.cxx"])
- #
- # DIRECTORY: panda/metalibs/panda/
- #
- IPATH=['panda/metalibs/panda']
- OPTS=['BUILDING_PANDA', 'ZLIB', 'VRPN', 'JPEG', 'PNG', 'TIFF', 'ZLIB', 'NVIDIACG', 'OPENSSL', 'FREETYPE', 'FFTW', 'ADVAPI', 'WINSOCK2', 'WINUSER', 'WINMM', 'FFMPEG']
- INFILES=['librecorder.in', 'libpgraph.in', 'libcull.in', 'libgrutil.in', 'libchan.in', 'libpstatclient.in',
- 'libchar.in', 'libcollide.in', 'libdevice.in', 'libdgraph.in', 'libdisplay.in', 'libpipeline.in', 'libevent.in',
- 'libgobj.in', 'libgsgbase.in', 'liblinmath.in', 'libmathutil.in', 'libparametrics.in',
- 'libpnmimage.in', 'libtext.in', 'libtform.in', 'liblerp.in', 'libputil.in', 'libaudio.in',
- 'libnativenet.in', 'libnet.in', 'libpgui.in']
- OBJFILES=['panda_panda.obj', 'libpanda_module.obj',
- 'recorder_composite.obj', 'librecorder_igate.obj',
- 'pgraph_nodePath.obj',
- 'pgraph_composite1.obj', 'pgraph_composite2.obj', 'pgraph_composite3.obj', 'pgraph_composite4.obj', 'libpgraph_igate.obj',
- 'cull_composite.obj',
- 'grutil_multitexReducer.obj', 'grutil_composite.obj', 'libgrutil_igate.obj',
- 'chan_composite.obj', 'libchan_igate.obj',
- 'pstatclient_composite.obj', 'libpstatclient_igate.obj',
- 'char_composite.obj', 'libchar_igate.obj',
- 'collide_composite.obj', 'libcollide_igate.obj',
- 'device_composite.obj', 'libdevice_igate.obj',
- 'dgraph_composite.obj', 'libdgraph_igate.obj',
- 'display_composite.obj', 'libdisplay_igate.obj',
- 'pipeline_composite.obj', 'libpipeline_igate.obj',
- 'event_composite.obj', 'libevent_igate.obj',
- 'gobj_composite1.obj', 'gobj_composite2.obj', 'libgobj_igate.obj',
- 'gsgbase_composite.obj', 'libgsgbase_igate.obj',
- 'linmath_composite.obj', 'liblinmath_igate.obj',
- 'mathutil_composite.obj', 'libmathutil_igate.obj',
- 'parametrics_composite.obj', 'libparametrics_igate.obj',
- 'pnmimagetypes_composite.obj', 'pnmimagetypes_pnmFileTypePNG.obj', 'pnmimagetypes_pnmFileTypeTIFF.obj',
- 'pnmimage_composite.obj', 'libpnmimage_igate.obj',
- 'text_composite.obj', 'libtext_igate.obj',
- 'tform_composite.obj', 'libtform_igate.obj',
- 'lerp_composite.obj', 'liblerp_igate.obj',
- 'putil_composite1.obj', 'putil_composite2.obj', 'libputil_igate.obj',
- 'audio_composite.obj', 'libaudio_igate.obj',
- 'pgui_composite.obj', 'libpgui_igate.obj',
- 'net_composite.obj', 'libnet_igate.obj',
- 'nativenet_composite.obj', 'libnativenet_igate.obj',
- 'pandabase_pandabase.obj', 'libpandaexpress.dll', 'libp3dtoolconfig.dll', 'libp3dtool.dll']
- if OMIT.count("VRPN")==0:
- OBJFILES.append("pvrpn_composite.obj")
- OBJFILES.append("libpvrpn_igate.obj")
- INFILES.append("libpvrpn.in")
- if OMIT.count("FREETYPE")==0:
- OBJFILES.append("pnmtext_composite.obj")
- OBJFILES.append("libpnmtext_igate.obj")
- EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpanda_module.obj',
- module='panda', library='libpanda', files=INFILES)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='panda.cxx', obj='panda_panda.obj')
- EnqueueLink(opts=OPTS, dll='libpanda.dll', obj=OBJFILES, xdep=[
- 'dtool_have_helix.dat',
- 'dtool_have_vrpn.dat',
- 'dtool_have_nspr.dat',
- 'dtool_have_freetype.dat',
- ])
- #
- # DIRECTORY: panda/src/skel
- #
- IPATH=['panda/src/skel']
- OPTS=['BUILDING_PANDASKEL']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='skel_composite.cxx', obj='skel_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libskel.in', obj='libskel_igate.obj',
- src='panda/src/skel', module='pandaskel', library='libskel',
- skip=[], also=["skel_composite.cxx"])
- EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandaskel_module.obj',
- module='pandaskel', library='libpandaskel', files=["libskel.in"])
- EnqueueLink(dll='libpandaskel.dll', opts=['ADVAPI'], obj=[
- 'skel_composite.obj',
- 'libskel_igate.obj',
- 'libpandaskel_module.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/src/audiotraits/
- #
- if OMIT.count("FMODEX") == 0:
- IPATH=['panda/src/audiotraits']
- OPTS=['BUILDING_FMOD_AUDIO', 'FMODEX']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='fmod_audio_composite.cxx', obj='fmod_audio_fmod_audio_composite.obj')
- EnqueueLink(opts=['ADVAPI', 'WINUSER', 'WINMM', 'FMODEX'], dll='libp3fmod_audio.dll', obj=[
- 'fmod_audio_fmod_audio_composite.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- if OMIT.count("MILES") == 0:
- IPATH=['panda/src/audiotraits']
- OPTS=['BUILDING_MILES_AUDIO', 'MILES']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='miles_audio_composite.cxx', obj='miles_audio_miles_audio_composite.obj')
- EnqueueLink(opts=['ADVAPI', 'WINUSER', 'WINMM', 'MILES'], dll='libp3miles_audio.dll', obj=[
- 'miles_audio_miles_audio_composite.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/src/distort/
- #
- IPATH=['panda/src/distort']
- OPTS=['BUILDING_PANDAFX']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='distort_composite.cxx', obj='distort_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdistort.in', obj='libdistort_igate.obj',
- src='panda/src/distort', module='pandafx', library='libdistort',
- skip=[], also=["distort_composite.cxx"])
- #
- # DIRECTORY: panda/src/downloadertools/
- #
- # There's something funny about this OMIT.count('OPENSSL')... check it out.
- #
- if OMIT.count("OPENSSL")==0:
- IPATH=['panda/src/downloadertools']
- OPTS=['OPENSSL', 'ZLIB', 'ADVAPI']
- LIBS=['libpandaexpress.dll', 'libpanda.dll', 'libp3dtoolconfig.dll', 'libp3dtool.dll', 'libp3pystub.dll']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='apply_patch.cxx', obj='apply_patch_apply_patch.obj')
- EnqueueLink(dll='apply_patch.exe', opts=OPTS, obj=['apply_patch_apply_patch.obj']+LIBS)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='build_patch.cxx', obj='build_patch_build_patch.obj')
- EnqueueLink(dll='build_patch.exe', opts=OPTS, obj=['build_patch_build_patch.obj']+LIBS)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='check_adler.cxx', obj='check_adler_check_adler.obj')
- EnqueueLink(dll='check_adler.exe', opts=OPTS, obj=['check_adler_check_adler.obj']+LIBS)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='check_crc.cxx', obj='check_crc_check_crc.obj')
- EnqueueLink(dll='check_crc.exe', opts=OPTS, obj=['check_crc_check_crc.obj']+LIBS)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='check_md5.cxx', obj='check_md5_check_md5.obj')
- EnqueueLink(dll='check_md5.exe', opts=OPTS, obj=['check_md5_check_md5.obj']+LIBS)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='multify.cxx', obj='multify_multify.obj')
- EnqueueLink(dll='multify.exe', opts=OPTS, obj=['multify_multify.obj']+LIBS)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pzip.cxx', obj='pzip_pzip.obj')
- EnqueueLink(dll='pzip.exe', opts=OPTS, obj=['pzip_pzip.obj']+LIBS)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='punzip.cxx', obj='punzip_punzip.obj')
- EnqueueLink(dll='punzip.exe', opts=OPTS, obj=['punzip_punzip.obj']+LIBS)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pdecrypt.cxx', obj='pdecrypt_pdecrypt.obj')
- EnqueueLink(dll='pdecrypt.exe', opts=OPTS, obj=['pdecrypt_pdecrypt.obj']+LIBS)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pencrypt.cxx', obj='pencrypt_pencrypt.obj')
- EnqueueLink(dll='pencrypt.exe', opts=OPTS, obj=['pencrypt_pencrypt.obj']+LIBS)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='show_ddb.cxx', obj='show_ddb_show_ddb.obj')
- EnqueueLink(dll='show_ddb.exe', opts=OPTS, obj=['show_ddb_show_ddb.obj']+LIBS)
- #
- # DIRECTORY: panda/src/windisplay/
- #
- if (sys.platform == "win32"):
- IPATH=['panda/src/windisplay']
- OPTS=['BUILDING_PANDAWIN']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='windisplay_composite.cxx', obj='windisplay_composite.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS + ["DX8"], src='winDetectDx8.cxx', obj='windisplay_windetectdx8.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS + ["DX9"], src='winDetectDx9.cxx', obj='windisplay_windetectdx9.obj')
- EnqueueLink(opts=['WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM'],
- dll='libp3windisplay.dll', obj=[
- 'windisplay_composite.obj',
- 'windisplay_windetectdx8.obj',
- 'windisplay_windetectdx9.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/metalibs/pandadx8/
- #
- if OMIT.count("DX8")==0:
- IPATH=['panda/src/dxgsg8', 'panda/metalibs/pandadx8']
- OPTS=['BUILDING_PANDADX', 'DX8']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxGraphicsStateGuardian8.cxx', obj='dxgsg8_dxGraphicsStateGuardian8.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxgsg8_composite.cxx', obj='dxgsg8_composite.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandadx8.cxx', obj='pandadx8_pandadx8.obj')
- EnqueueLink(dll='libpandadx8.dll',
- opts=['ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DX8'], obj=[
- 'pandadx8_pandadx8.obj',
- 'dxgsg8_dxGraphicsStateGuardian8.obj',
- 'dxgsg8_composite.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3windisplay.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/metalibs/pandadx9/
- #
- if OMIT.count("DX9")==0:
- IPATH=['panda/src/dxgsg9']
- OPTS=['BUILDING_PANDADX', 'DX9', 'NVIDIACG', 'CGDX9']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxGraphicsStateGuardian9.cxx', obj='dxgsg9_dxGraphicsStateGuardian9.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxgsg9_composite.cxx', obj='dxgsg9_composite.obj')
- IPATH=['panda/metalibs/pandadx9']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandadx9.cxx', obj='pandadx9_pandadx9.obj')
- EnqueueLink(dll='libpandadx9.dll',
- opts=['ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DX9', 'NVIDIACG', 'CGDX9'], obj=[
- 'pandadx9_pandadx9.obj',
- 'dxgsg9_dxGraphicsStateGuardian9.obj',
- 'dxgsg9_composite.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3windisplay.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/src/egg/
- #
- IPATH=['panda/src/egg']
- OPTS=['BUILDING_PANDAEGG', 'ZLIB']
- CreateStubHeader("built/include/parser.h")
- EnqueueBison(ipath=IPATH, opts=OPTS, pre='eggyy', src='parser.yxx', dsth='parser.h', obj='egg_parser.obj')
- EnqueueFlex(ipath=IPATH, opts=OPTS, pre='eggyy', src='lexer.lxx', obj='egg_lexer.obj', dashi=1)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='egg_composite1.cxx', obj='egg_composite1.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='egg_composite2.cxx', obj='egg_composite2.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libegg.in', obj='libegg_igate.obj',
- src='panda/src/egg', module='pandaegg', library='libegg',
- skip=["parser.h"], also=["egg_composite.cxx"])
- #
- # DIRECTORY: panda/src/egg2pg/
- #
- IPATH=['panda/src/egg2pg']
- OPTS=['BUILDING_PANDAEGG']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='egg2pg_composite.cxx', obj='egg2pg_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libegg2pg.in', obj='libegg2pg_igate.obj',
- src='panda/src/egg2pg', module='pandaegg', library='libegg2pg',
- skip="ALL", also=['load_egg_file.h'])
- #
- # DIRECTORY: panda/src/framework/
- #
- IPATH=['panda/src/framework']
- OPTS=['BUILDING_FRAMEWORK']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='framework_composite.cxx', obj='framework_composite.obj')
- EnqueueLink(dll='libp3framework.dll', opts=['ADVAPI'], obj=[
- 'framework_composite.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/metalibs/pandafx/
- #
- IPATH=['panda/metalibs/pandafx', 'panda/src/distort']
- OPTS=['BUILDING_PANDAFX', 'NVIDIACG']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandafx.cxx', obj='pandafx_pandafx.obj')
- EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandafx_module.obj',
- module='pandafx', library='libpandafx',
- files=['libdistort.in', 'libeffects.in'])
- EnqueueLink(dll='libpandafx.dll', opts=['ADVAPI', 'NVIDIACG'], obj=[
- 'pandafx_pandafx.obj',
- 'libpandafx_module.obj',
- 'distort_composite.obj',
- 'libdistort_igate.obj',
- 'effects_composite.obj',
- 'libeffects_igate.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/src/glstuff/
- #
- IPATH=['panda/src/glstuff']
- OPTS=[ 'NVIDIACG', 'CGGL']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='glpure.cxx', obj='glstuff_glpure.obj')
- EnqueueLink(dll='libp3glstuff.dll', opts=['ADVAPI', 'GLUT', 'NVIDIACG', 'CGGL'], obj=[
- 'glstuff_glpure.obj',
- 'libpanda.dll',
- 'libpandafx.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/src/glgsg/
- #
- IPATH=['panda/src/glgsg', 'panda/src/glstuff', 'panda/src/gobj']
- OPTS=['BUILDING_PANDAGL', 'NVIDIACG']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_glgsg.cxx', obj='glgsg_config_glgsg.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='glgsg.cxx', obj='glgsg_glgsg.obj')
- #
- # DIRECTORY: panda/metalibs/pandaegg/
- #
- IPATH=['panda/metalibs/pandaegg', 'panda/src/egg']
- OPTS=['BUILDING_PANDAEGG']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaegg.cxx', obj='pandaegg_pandaegg.obj')
- EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandaegg_module.obj',
- module='pandaegg', library='libpandaegg',
- files=['libegg2pg.in', 'libegg.in'])
- EnqueueLink(dll='libpandaegg.dll', opts=['ADVAPI'], obj=[
- 'pandaegg_pandaegg.obj',
- 'libpandaegg_module.obj',
- 'egg2pg_composite.obj',
- 'libegg2pg_igate.obj',
- 'egg_composite1.obj',
- 'egg_composite2.obj',
- 'egg_parser.obj',
- 'egg_lexer.obj',
- 'libegg_igate.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/metalibs/panda/
- #
- IPATH=['panda/metalibs/panda']
- OPTS=['BUILDING_PANDA', 'FFTW', 'PNG', 'JPEG', 'TIFF', 'ZLIB', 'OPENSSL', 'ADVAPI', 'WINSOCK2', 'WINUSER', 'WINMM']
- OBJFILES=[
- 'pipeline_composite.obj',
- 'event_composite.obj',
- 'net_composite.obj',
- 'nativenet_composite.obj',
- 'pstatclient_composite.obj',
- 'linmath_composite.obj',
- 'mathutil_composite.obj',
- 'putil_composite1.obj', 'putil_composite2.obj',
- 'pnmimagetypes_composite.obj', 'pnmimagetypes_pnmFileTypePNG.obj', 'pnmimagetypes_pnmFileTypeTIFF.obj',
- 'pnmimage_composite.obj',
- 'pandabase_pandabase.obj', 'libpandaexpress.dll', 'libp3dtoolconfig.dll', 'libp3dtool.dll']
- EnqueueLink(opts=OPTS, dll='libpandastripped.dll', obj=OBJFILES, xdep=[
- 'dtool_have_helix.dat',
- 'dtool_have_vrpn.dat',
- 'dtool_have_freetype.dat',
- ])
- #
- # DIRECTORY: panda/metalibs/pandaegg/
- #
- IPATH=['panda/metalibs/pandaegg', 'panda/src/egg']
- OPTS=['BUILDING_PANDAEGG']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaeggnopg.cxx', obj='pandaegg_pandaeggnopg.obj')
- EnqueueLink(dll='libpandaeggstripped.dll', opts=['ADVAPI'], obj=[
- 'pandaegg_pandaeggnopg.obj',
- # 'egg2pg_composite.obj',
- 'egg_composite1.obj',
- 'egg_composite2.obj',
- 'egg_parser.obj',
- 'egg_lexer.obj',
- 'libpandastripped.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/src/mesadisplay/
- #
- if (sys.platform != "win32"):
- IPATH=['panda/src/mesadisplay', 'panda/src/glstuff']
- OPTS=['BUILDING_PANDAGLUT', 'NVIDIACG', 'GLUT']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='mesadisplay_composite.cxx', obj='mesadisplay_composite.obj')
- IPATH=['panda/metalibs/pandagl']
- EnqueueLink(opts=['GLUT'], dll='libpandamesa.dll', obj=[
- 'mesadisplay_composite.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3glstuff.dll',
- 'libpandafx.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/src/glxdisplay/
- #
- if (sys.platform != "win32"):
- IPATH=['panda/src/glxdisplay']
- OPTS=['BUILDING_PANDAGLUT', 'GLUT', 'NVIDIACG', 'CGGL']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='glxdisplay_composite.cxx', obj='glxdisplay_composite.obj')
- IPATH=['panda/metalibs/pandagl']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandagl.cxx', obj='pandagl_pandagl.obj')
- EnqueueLink(opts=['GLUT', 'NVIDIACG', 'CGGL'], dll='libpandagl.dll', obj=[
- 'pandagl_pandagl.obj',
- 'glgsg_config_glgsg.obj',
- 'glgsg_glgsg.obj',
- 'glxdisplay_composite.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3glstuff.dll',
- 'libpandafx.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/src/wgldisplay/
- #
- if (sys.platform == "win32"):
- IPATH=['panda/src/wgldisplay', 'panda/src/glstuff']
- OPTS=['BUILDING_PANDAGL', 'NVIDIACG', 'CGGL']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='wgldisplay_composite.cxx', obj='wgldisplay_composite.obj')
- IPATH=['panda/metalibs/pandagl']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandagl.cxx', obj='pandagl_pandagl.obj')
- EnqueueLink(opts=['WINGDI', 'GLUT', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NVIDIACG', 'CGGL'],
- dll='libpandagl.dll', obj=[
- 'pandagl_pandagl.obj',
- 'glgsg_config_glgsg.obj',
- 'glgsg_glgsg.obj',
- 'wgldisplay_composite.obj',
- 'libp3windisplay.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3glstuff.dll',
- 'libpandafx.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/src/physics/
- #
- IPATH=['panda/src/physics']
- OPTS=['BUILDING_PANDAPHYSICS']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='physics_composite.cxx', obj='physics_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libphysics.in', obj='libphysics_igate.obj',
- src='panda/src/physics', module='pandaphysics', library='libphysics',
- skip=["forces.h"], also=["physics_composite.cxx"])
- #
- # DIRECTORY: panda/src/particlesystem/
- #
- IPATH=['panda/src/particlesystem']
- OPTS=['BUILDING_PANDAPHYSICS']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='particlesystem_composite.cxx', obj='particlesystem_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libparticlesystem.in', obj='libparticlesystem_igate.obj',
- src='panda/src/particlesystem', module='pandaphysics', library='libparticlesystem',
- skip=['orientedParticle.h', 'orientedParticleFactory.h', 'particlefactories.h', 'emitters.h', 'particles.h'],
- also=["particlesystem_composite.cxx"])
- #
- # DIRECTORY: panda/metalibs/pandaphysics/
- #
- IPATH=['panda/metalibs/pandaphysics']
- OPTS=['BUILDING_PANDAPHYSICS']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaphysics.cxx', obj='pandaphysics_pandaphysics.obj')
- EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandaphysics_module.obj',
- module='pandaphysics', library='libpandaphysics',
- files=['libphysics.in', 'libparticlesystem.in'])
- EnqueueLink(dll='libpandaphysics.dll', opts=['ADVAPI'], obj=[
- 'pandaphysics_pandaphysics.obj',
- 'libpandaphysics_module.obj',
- 'physics_composite.obj',
- 'libphysics_igate.obj',
- 'particlesystem_composite.obj',
- 'libparticlesystem_igate.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: panda/src/testbed/
- #
- IPATH=['panda/src/testbed']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pview.cxx', obj='pview_pview.obj')
- EnqueueLink(dll='pview.exe', opts=['ADVAPI'], obj=[
- 'pview_pview.obj',
- 'libp3framework.dll',
- 'libpanda.dll',
- 'libpandafx.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: direct/src/directbase/
- #
- if (OMIT.count("PYTHON")==0):
- IPATH=['direct/src/directbase']
- OPTS=['BUILDING_DIRECT']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='directbase.cxx', obj='directbase_directbase.obj')
- if (sys.platform != "win32"):
- EnqueueCxx(ipath=IPATH, opts=['BUILDING_PPYTHON'], src='ppython.cxx', obj='ppython.obj')
- EnqueueLink(opts=['WINUSER'], dll='ppython.exe', obj=['ppython.obj'])
- EnqueueCxx(ipath=IPATH, opts=['BUILDING_GENPYCODE'], src='ppython.cxx', obj='genpycode.obj')
- EnqueueLink(opts=['WINUSER'], dll='genpycode.exe', obj=['genpycode.obj'])
- EnqueueCxx(ipath=IPATH, opts=['BUILDING_PACKPANDA'], src='ppython.cxx', obj='packpanda.obj')
- EnqueueLink(opts=['WINUSER'], dll='packpanda.exe', obj=['packpanda.obj'])
- #
- # DIRECTORY: direct/src/dcparser/
- #
- if (OMIT.count("PYTHON")==0):
- IPATH=['direct/src/dcparser']
- OPTS=['WITHINPANDA', 'BUILDING_DIRECT']
- CreateStubHeader("built/include/dcParser.h")
- EnqueueBison(ipath=IPATH, opts=OPTS, pre='dcyy', src='dcParser.yxx', dsth='dcParser.h', obj='dcparser_dcParser.obj')
- EnqueueFlex(ipath=IPATH, opts=OPTS, pre='dcyy', src='dcLexer.lxx', obj='dcparser_dcLexer.obj', dashi=0)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dcparser_composite.cxx', obj='dcparser_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdcparser.in', obj='libdcparser_igate.obj',
- src='direct/src/dcparser', module='p3direct', library='libdcparser',
- skip=['dcmsgtypes.h'],
- also=["dcparser_composite.cxx"])
- #
- # DIRECTORY: direct/src/deadrec/
- #
- if (OMIT.count("PYTHON")==0):
- IPATH=['direct/src/deadrec']
- OPTS=['BUILDING_DIRECT']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='deadrec_composite.cxx', obj='deadrec_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdeadrec.in', obj='libdeadrec_igate.obj',
- src='direct/src/deadrec', module='p3direct', library='libdeadrec',
- skip=[], also=["deadrec_composite.cxx"])
- #
- # DIRECTORY: direct/src/distributed/
- #
- if (OMIT.count("PYTHON")==0):
- IPATH=['direct/src/distributed', 'direct/src/dcparser']
- OPTS=['WITHINPANDA', 'BUILDING_DIRECT', 'OPENSSL']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_distributed.cxx', obj='distributed_config_distributed.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='cConnectionRepository.cxx', obj='distributed_cConnectionRepository.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='cDistributedSmoothNodeBase.cxx', obj='distributed_cDistributedSmoothNodeBase.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdistributed.in', obj='libdistributed_igate.obj',
- src='direct/src/distributed', module='p3direct', library='libdistributed',
- skip=[], also=['config_distributed.cxx', 'cConnectionRepository.cxx', 'cDistributedSmoothNodeBase.cxx'])
- #
- # DIRECTORY: direct/src/interval/
- #
- if (OMIT.count("PYTHON")==0):
- IPATH=['direct/src/interval']
- OPTS=['BUILDING_DIRECT']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='interval_composite.cxx', obj='interval_composite.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libinterval.in', obj='libinterval_igate.obj',
- src='direct/src/interval', module='p3direct', library='libinterval',
- skip=[], also=["interval_composite.cxx"])
- #
- # DIRECTORY: direct/src/showbase/
- #
- if (OMIT.count("PYTHON")==0):
- IPATH=['direct/src/showbase']
- OPTS=['BUILDING_DIRECT']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='showBase.cxx', obj='showbase_showBase.obj')
- EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libshowbase.in', obj='libshowbase_igate.obj',
- src='direct/src/showbase', module='p3direct', library='libshowbase',
- skip=[], also=["showBase.cxx"])
- #
- # DIRECTORY: direct/metalibs/direct/
- #
- if (OMIT.count("PYTHON")==0):
- IPATH=['direct/metalibs/direct']
- OPTS=['BUILDING_DIRECT']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='direct.cxx', obj='direct_direct.obj')
- EnqueueImod(ipath=IPATH, opts=OPTS, obj='libp3direct_module.obj',
- module='p3direct', library='libp3direct',
- files=['libdcparser.in', 'libshowbase.in', 'libdeadrec.in', 'libinterval.in', 'libdistributed.in'])
- EnqueueLink(dll='libp3direct.dll', opts=['ADVAPI', 'OPENSSL'], obj=[
- 'direct_direct.obj',
- 'libp3direct_module.obj',
- 'directbase_directbase.obj',
- 'dcparser_composite.obj',
- 'dcparser_dcParser.obj',
- 'dcparser_dcLexer.obj',
- 'libdcparser_igate.obj',
- 'showbase_showBase.obj',
- 'libshowbase_igate.obj',
- 'deadrec_composite.obj',
- 'libdeadrec_igate.obj',
- 'interval_composite.obj',
- 'libinterval_igate.obj',
- 'distributed_config_distributed.obj',
- 'distributed_cConnectionRepository.obj',
- 'distributed_cDistributedSmoothNodeBase.obj',
- 'libdistributed_igate.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: direct/src/dcparse/
- #
- if (OMIT.count("PYTHON")==0):
- IPATH=['direct/src/dcparse', 'direct/src/dcparser']
- OPTS=['WITHINPANDA', 'ADVAPI']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dcparse.cxx', obj='dcparse_dcparse.obj')
- EnqueueLink(dll='dcparse.exe', opts=OPTS, obj=[
- 'dcparse_dcparse.obj',
- 'libp3direct.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: direct/src/heapq/
- #
- if (OMIT.count("PYTHON")==0):
- IPATH=['direct/src/heapq']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='heapq.cxx', obj='heapq_heapq.obj')
- EnqueueLink(dll='libp3heapq.dll', opts=['ADVAPI'], obj=[
- 'heapq_heapq.obj',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: pandatool/src/pandatoolbase/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/pandatoolbase']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandatoolbase_composite1.cxx', obj='pandatoolbase_composite1.obj')
- EnqueueLib(lib='libpandatoolbase.lib', obj=['pandatoolbase_composite1.obj'])
- #
- # DIRECTORY: pandatool/src/converter/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/converter']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='somethingToEggConverter.cxx', obj='converter_somethingToEggConverter.obj')
- EnqueueLib(lib='libconverter.lib', obj=['converter_somethingToEggConverter.obj'])
- #
- # DIRECTORY: pandatool/src/progbase/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/progbase']
- OPTS=[ 'ZLIB']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='progbase_composite1.cxx', obj='progbase_composite1.obj')
- EnqueueLib(lib='libprogbase.lib', obj=['progbase_composite1.obj'])
- #
- # DIRECTORY: pandatool/src/eggbase/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/eggbase']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggbase_composite1.cxx', obj='eggbase_composite1.obj')
- EnqueueLib(lib='libeggbase.lib', obj=['eggbase_composite1.obj'])
- #
- # DIRECTORY: pandatool/src/bam/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/bam']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='bamInfo.cxx', obj='bam-info_bamInfo.obj')
- EnqueueLink(dll='bam-info.exe', opts=['ADVAPI', 'FFTW'], obj=[
- 'bam-info_bamInfo.obj',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='bamToEgg.cxx', obj='bam2egg_bamToEgg.obj')
- EnqueueLink(dll='bam2egg.exe', opts=['ADVAPI', 'FFTW'], obj=[
- 'bam2egg_bamToEgg.obj',
- 'libconverter.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToBam.cxx', obj='egg2bam_eggToBam.obj')
- EnqueueLink(dll='egg2bam.exe', opts=['ADVAPI', 'FFTW'], obj=[
- 'egg2bam_eggToBam.obj',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libconverter.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
-
- #
- # DIRECTORY: pandatool/src/cvscopy/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/cvscopy']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='cvscopy_composite1.cxx', obj='cvscopy_composite1.obj')
- EnqueueLib(lib='libcvscopy.lib', obj=['cvscopy_composite1.obj'])
- #
- # DIRECTORY: pandatool/src/dxf/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/dxf']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxf_composite1.cxx', obj='dxf_composite1.obj')
- EnqueueLib(lib='libdxf.lib', obj=['dxf_composite1.obj'])
- #
- # DIRECTORY: pandatool/src/dxfegg/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/dxfegg']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfToEggConverter.cxx', obj='dxfegg_dxfToEggConverter.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfToEggLayer.cxx', obj='dxfegg_dxfToEggLayer.obj')
- EnqueueLib(lib='libdxfegg.lib', obj=[
- 'dxfegg_dxfToEggConverter.obj',
- 'dxfegg_dxfToEggLayer.obj',
- ])
- #
- # DIRECTORY: pandatool/src/dxfprogs/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/dxfprogs']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfPoints.cxx', obj='dxf-points_dxfPoints.obj')
- EnqueueLink(dll='dxf-points.exe', opts=['ADVAPI', 'FFTW'], obj=[
- 'dxf-points_dxfPoints.obj',
- 'libprogbase.lib',
- 'libdxf.lib',
- 'libpandatoolbase.lib',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfToEgg.cxx', obj='dxf2egg_dxfToEgg.obj')
- EnqueueLink(dll='dxf2egg.exe', opts=['ADVAPI', 'FFTW'], obj=[
- 'dxf2egg_dxfToEgg.obj',
- 'libdxfegg.lib',
- 'libdxf.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libconverter.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToDXF.cxx', obj='egg2dxf_eggToDXF.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToDXFLayer.cxx', obj='egg2dxf_eggToDXFLayer.obj')
- EnqueueLink(dll='egg2dxf.exe', opts=['ADVAPI', 'FFTW'], obj=[
- 'egg2dxf_eggToDXF.obj',
- 'egg2dxf_eggToDXFLayer.obj',
- 'libdxf.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libconverter.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandatool/src/palettizer/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/palettizer']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='palettizer_composite1.cxx', obj='palettizer_composite1.obj')
- EnqueueLib(lib='libpalettizer.lib', obj=['palettizer_composite1.obj'])
- #
- # DIRECTORY: pandatool/src/egg-mkfont/
- #
- if (OMIT.count("FREETYPE")==0) and (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/egg-mkfont', 'pandatool/src/palettizer']
- OPTS=[ 'FREETYPE']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggMakeFont.cxx', obj='egg-mkfont_eggMakeFont.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='rangeDescription.cxx', obj='egg-mkfont_rangeDescription.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='rangeIterator.cxx', obj='egg-mkfont_rangeIterator.obj')
- EnqueueLink(dll='egg-mkfont.exe', opts=['ADVAPI', 'FREETYPE'], obj=[
- 'egg-mkfont_eggMakeFont.obj',
- 'egg-mkfont_rangeDescription.obj',
- 'egg-mkfont_rangeIterator.obj',
- 'libpalettizer.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libconverter.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandatool/src/eggcharbase/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/eggcharbase']
- OPTS=['ZLIB']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggcharbase_composite1.cxx', obj='eggcharbase_composite1.obj')
- EnqueueLib(lib='libeggcharbase.lib', obj=['eggcharbase_composite1.obj'])
- #
- # DIRECTORY: pandatool/src/egg-optchar/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/egg-optchar']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_egg_optchar.cxx', obj='egg-optchar_config_egg_optchar.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggOptchar.cxx', obj='egg-optchar_eggOptchar.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggOptcharUserData.cxx', obj='egg-optchar_eggOptcharUserData.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='vertexMembership.cxx', obj='egg-optchar_vertexMembership.obj')
- EnqueueLink(dll='egg-optchar.exe', opts=['ADVAPI'], obj=[
- 'egg-optchar_config_egg_optchar.obj',
- 'egg-optchar_eggOptchar.obj',
- 'egg-optchar_eggOptcharUserData.obj',
- 'egg-optchar_vertexMembership.obj',
- 'libeggcharbase.lib',
- 'libconverter.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandatool/src/egg-palettize/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/egg-palettize', 'pandatool/src/palettizer']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggPalettize.cxx', obj='egg-palettize_eggPalettize.obj')
- EnqueueLink(dll='egg-palettize.exe', opts=['ADVAPI'], obj=[
- 'egg-palettize_eggPalettize.obj',
- 'libpalettizer.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libconverter.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandatool/src/egg-qtess/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/egg-qtess']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='egg-qtess_composite1.cxx', obj='egg-qtess_composite1.obj')
- EnqueueLink(dll='egg-qtess.exe', opts=['ADVAPI'], obj=[
- 'egg-qtess_composite1.obj',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libconverter.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
-
- #
- # DIRECTORY: pandatool/src/eggprogs/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/eggprogs']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggCrop.cxx', obj='egg-crop_eggCrop.obj')
- EnqueueLink(dll='egg-crop.exe', opts=['ADVAPI'], obj=[
- 'egg-crop_eggCrop.obj',
- 'libconverter.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggMakeTube.cxx', obj='egg-make-tube_eggMakeTube.obj')
- EnqueueLink(dll='egg-make-tube.exe', opts=['ADVAPI'], obj=[
- 'egg-make-tube_eggMakeTube.obj',
- 'libconverter.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggTextureCards.cxx', obj='egg-texture-cards_eggTextureCards.obj')
- EnqueueLink(dll='egg-texture-cards.exe', opts=['ADVAPI'], obj=[
- 'egg-texture-cards_eggTextureCards.obj',
- 'libconverter.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggTopstrip.cxx', obj='egg-topstrip_eggTopstrip.obj')
- EnqueueLink(dll='egg-topstrip.exe', opts=['ADVAPI'], obj=[
- 'egg-topstrip_eggTopstrip.obj',
- 'libeggcharbase.lib',
- 'libconverter.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggTrans.cxx', obj='egg-trans_eggTrans.obj')
- EnqueueLink(dll='egg-trans.exe', opts=['ADVAPI'], obj=[
- 'egg-trans_eggTrans.obj',
- 'libconverter.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToC.cxx', obj='egg2c_eggToC.obj')
- EnqueueLink(dll='egg2c.exe', opts=['ADVAPI'], obj=[
- 'egg2c_eggToC.obj',
- 'libconverter.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggRename.cxx', obj='egg-rename_eggRename.obj')
- EnqueueLink(dll='egg-rename.exe', opts=['ADVAPI'], obj=[
- 'egg-rename_eggRename.obj',
- 'libconverter.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggRetargetAnim.cxx', obj='egg-retarget-anim_eggRetargetAnim.obj')
- EnqueueLink(dll='egg-retarget-anim.exe', opts=['ADVAPI'], obj=[
- 'egg-retarget-anim_eggRetargetAnim.obj',
- 'libeggcharbase.lib',
- 'libconverter.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandatool/src/flt/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/flt']
- OPTS=[ 'ZLIB']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltVectorRecord.cxx', obj='flt_fltVectorRecord.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='flt_composite1.cxx', obj='flt_composite1.obj')
- EnqueueLib(lib='libflt.lib', obj=['flt_fltVectorRecord.obj', 'flt_composite1.obj'])
- #
- # DIRECTORY: pandatool/src/fltegg/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/fltegg']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltToEggConverter.cxx', obj='fltegg_fltToEggConverter.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltToEggLevelState.cxx', obj='fltegg_fltToEggLevelState.obj')
- EnqueueLib(lib='libfltegg.lib', obj=['fltegg_fltToEggConverter.obj', 'fltegg_fltToEggLevelState.obj'])
- #
- # DIRECTORY: pandatool/src/fltprogs/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/fltprogs', 'pandatool/src/flt', 'pandatool/src/cvscopy']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToFlt.cxx', obj='egg2flt_eggToFlt.obj')
- EnqueueLink(dll='egg2flt.exe', opts=['ADVAPI'], obj=[
- 'egg2flt_eggToFlt.obj',
- 'libflt.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libconverter.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltInfo.cxx', obj='flt-info_fltInfo.obj')
- EnqueueLink(dll='flt-info.exe', opts=['ADVAPI'], obj=[
- 'flt-info_fltInfo.obj',
- 'libprogbase.lib',
- 'libflt.lib',
- 'libpandatoolbase.lib',
- 'libconverter.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltTrans.cxx', obj='flt-trans_fltTrans.obj')
- EnqueueLink(dll='flt-trans.exe', opts=['ADVAPI'], obj=[
- 'flt-trans_fltTrans.obj',
- 'libprogbase.lib',
- 'libflt.lib',
- 'libpandatoolbase.lib',
- 'libconverter.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltToEgg.cxx', obj='flt2egg_fltToEgg.obj')
- EnqueueLink(dll='flt2egg.exe', opts=['ADVAPI'], obj=[
- 'flt2egg_fltToEgg.obj',
- 'libflt.lib',
- 'libfltegg.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libconverter.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltCopy.cxx', obj='fltcopy_fltCopy.obj')
- EnqueueLink(dll='fltcopy.exe', opts=['ADVAPI'], obj=[
- 'fltcopy_fltCopy.obj',
- 'libcvscopy.lib',
- 'libflt.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libconverter.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandatool/src/imagebase/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/imagebase']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='imagebase_composite1.cxx', obj='imagebase_composite1.obj')
- EnqueueLib(lib='libimagebase.lib', obj=['imagebase_composite1.obj'])
- #
- # DIRECTORY: pandatool/src/imageprogs/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/imageprogs']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='imageInfo.cxx', obj='image-info_imageInfo.obj')
- EnqueueLink(dll='image-info.exe', opts=['ADVAPI'], obj=[
- 'image-info_imageInfo.obj',
- 'libimagebase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
-
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='imageResize.cxx', obj='image-resize_imageResize.obj')
- EnqueueLink(dll='image-resize.exe', opts=['ADVAPI'], obj=[
- 'image-resize_imageResize.obj',
- 'libimagebase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
-
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='imageTrans.cxx', obj='image-trans_imageTrans.obj')
- EnqueueLink(dll='image-trans.exe', opts=['ADVAPI'], obj=[
- 'image-trans_imageTrans.obj',
- 'libimagebase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandatool/src/lwo/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/lwo']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwo_composite1.cxx', obj='lwo_composite1.obj')
- EnqueueLib(lib='liblwo.lib', obj=['lwo_composite1.obj'])
- #
- # DIRECTORY: pandatool/src/lwoegg/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/lwoegg']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwoegg_composite1.cxx', obj='lwoegg_composite1.obj')
- EnqueueLib(lib='liblwoegg.lib', obj=['lwoegg_composite1.obj'])
- #
- # DIRECTORY: pandatool/src/lwoprogs/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/lwoprogs', 'pandatool/src/lwo']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwoScan.cxx', obj='lwo-scan_lwoScan.obj')
- EnqueueLink(dll='lwo-scan.exe', opts=['ADVAPI'], obj=[
- 'lwo-scan_lwoScan.obj',
- 'liblwo.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
-
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwoToEgg.cxx', obj='lwo2egg_lwoToEgg.obj')
- EnqueueLink(dll='lwo2egg.exe', opts=['ADVAPI'], obj=[
- 'lwo2egg_lwoToEgg.obj',
- 'liblwo.lib',
- 'liblwoegg.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libconverter.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandatool/src/maya/
- #
- for VER in MAYAVERSIONS:
- if (OMIT.count("MAYA"+VER)==0) and (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/maya']
- OPTS=['MAYA'+VER]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='maya_composite1.cxx', obj='maya'+VER+'_composite1.obj')
- EnqueueLib(lib='libmaya'+VER+'.lib', obj=[ 'maya'+VER+'_composite1.obj' ])
-
- #
- # DIRECTORY: pandatool/src/mayaegg/
- #
- for VER in MAYAVERSIONS:
- if (OMIT.count("MAYA"+VER)==0) and (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/mayaegg', 'pandatool/src/maya']
- OPTS=['MAYA'+VER]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaEggLoader.cxx', obj='mayaegg'+VER+'_loader.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaegg_composite1.cxx', obj='mayaegg'+VER+'_composite1.obj')
- EnqueueLib(lib='libmayaegg'+VER+'.lib', obj=[ 'mayaegg'+VER+'_composite1.obj' ])
- #
- # DIRECTORY: pandatool/src/maxegg/
- #
- for VER in MAXVERSIONS:
- if (OMIT.count("MAX"+VER)==0) and (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/maxegg']
- OPTS=['MAX'+VER, "WINCOMCTL", "WINCOMDLG", "WINUSER", "MSFORSCOPE"]
- CopyFile("built/tmp/maxEgg.obj", "pandatool/src/maxegg/maxEgg.obj")
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='maxEggLoader.cxx',obj='maxegg'+VER+'_loader.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='maxegg_composite1.cxx',obj='maxegg'+VER+'_composite1.obj')
- EnqueueLink(opts=OPTS, dll='maxegg'+VER+'.dlo', ldef="pandatool/src/maxegg/maxEgg.def", obj=[
- 'maxegg'+VER+'_composite1.obj',
- 'maxEgg.obj',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libconverter.lib',
- 'libpandaeggstripped.dll',
- 'libpandastripped.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll'
- ])
- #
- # DIRECTORY: pandatool/src/maxprogs/
- #
- for VER in MAXVERSIONS:
- if (OMIT.count("MAX"+VER)==0) and (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/maxprogs']
- OPTS=['MAX'+VER, "WINCOMCTL", "WINCOMDLG", "WINUSER", "MSFORSCOPE"]
- CopyFile("built/tmp/maxImportRes.obj", "pandatool/src/maxprogs/maxImportRes.obj")
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='maxEggImport.cxx',obj='maxprogs'+VER+'_maxeggimport.obj')
- EnqueueLink(opts=OPTS, dll='maxeggimport'+VER+'.dle', ldef="pandatool/src/maxprogs/maxEggImport.def", obj=[
- 'maxegg'+VER+'_loader.obj',
- 'maxprogs'+VER+'_maxeggimport.obj',
- 'maxImportRes.obj',
- 'libpandaeggstripped.dll',
- 'libpandastripped.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll'
- ])
- #
- # DIRECTORY: pandatool/src/vrml/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/vrml']
- OPTS=['ZLIB']
- CreateStubHeader("built/include/vrmlParser.h")
- EnqueueBison(ipath=IPATH, opts=OPTS, pre='vrmlyy', src='vrmlParser.yxx', dsth='vrmlParser.h', obj='pvrml_vrmlParser.obj')
- EnqueueFlex(ipath=IPATH, opts=OPTS, pre='vrmlyy', src='vrmlLexer.lxx', obj='pvrml_vrmlLexer.obj', dashi=0)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='parse_vrml.cxx', obj='pvrml_parse_vrml.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='standard_nodes.cxx', obj='pvrml_standard_nodes.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlNode.cxx', obj='pvrml_vrmlNode.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlNodeType.cxx', obj='pvrml_vrmlNodeType.obj')
- EnqueueLib(lib='libpvrml.lib', obj=[
- 'pvrml_parse_vrml.obj',
- 'pvrml_standard_nodes.obj',
- 'pvrml_vrmlNode.obj',
- 'pvrml_vrmlNodeType.obj',
- 'pvrml_vrmlParser.obj',
- 'pvrml_vrmlLexer.obj',
- ])
- #
- # DIRECTORY: pandatool/src/vrmlegg/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/vrmlegg', 'pandatool/src/vrml']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexedFaceSet.cxx', obj='vrmlegg_indexedFaceSet.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlAppearance.cxx', obj='vrmlegg_vrmlAppearance.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlToEggConverter.cxx', obj='vrmlegg_vrmlToEggConverter.obj')
- EnqueueLib(lib='libvrmlegg.lib', obj=[
- 'vrmlegg_indexedFaceSet.obj',
- 'vrmlegg_vrmlAppearance.obj',
- 'vrmlegg_vrmlToEggConverter.obj',
- ])
- #
- # DIRECTORY: pandatool/src/xfile/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/xfile']
- OPTS=['ZLIB']
- CreateStubHeader("built/include/xParser.h")
- EnqueueBison(ipath=IPATH, opts=OPTS, pre='xyy', src='xParser.yxx', dsth='xParser.h', obj='xfile_xParser.obj')
- EnqueueFlex(ipath=IPATH, opts=OPTS, pre='xyy', src='xLexer.lxx', obj='xfile_xLexer.obj', dashi=1)
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='xfile_composite1.cxx', obj='xfile_composite1.obj')
- EnqueueLib(lib='libxfile.lib', obj=[
- 'xfile_composite1.obj',
- 'xfile_xParser.obj',
- 'xfile_xLexer.obj',
- ])
- #
- # DIRECTORY: pandatool/src/xfileegg/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/xfileegg', 'pandatool/src/xfile']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='xfileegg_composite1.cxx', obj='xfileegg_composite1.obj')
- EnqueueLib(lib='libxfileegg.lib', obj=[
- 'xfileegg_composite1.obj',
- ])
- #
- # DIRECTORY: pandatool/src/ptloader/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/ptloader', 'pandatool/src/flt', 'pandatool/src/lwo', 'pandatool/src/xfile', 'pandatool/src/xfileegg']
- OPTS=['BUILDING_PTLOADER']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_ptloader.cxx', obj='ptloader_config_ptloader.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='loaderFileTypePandatool.cxx', obj='ptloader_loaderFileTypePandatool.obj')
- EnqueueLink(dll='libp3ptloader.dll', opts=['ADVAPI'], obj=[
- 'ptloader_config_ptloader.obj',
- 'ptloader_loaderFileTypePandatool.obj',
- 'libfltegg.lib',
- 'libflt.lib',
- 'liblwoegg.lib',
- 'liblwo.lib',
- 'libdxfegg.lib',
- 'libdxf.lib',
- 'libvrmlegg.lib',
- 'libpvrml.lib',
- 'libxfileegg.lib',
- 'libxfile.lib',
- 'libconverter.lib',
- 'libpandatoolbase.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- #
- # DIRECTORY: pandatool/src/mayaprogs/
- #
- for VER in MAYAVERSIONS:
- if (OMIT.count('MAYA'+VER)==0) and (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/mayaprogs', 'pandatool/src/maya', 'pandatool/src/mayaegg',
- 'pandatool/src/cvscopy']
- OPTS=['BUILDING_MISC', 'MAYA'+VER]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaEggImport.cxx', obj='mayaeggimport'+VER+'_mayaeggimport.obj')
- EnqueueLink(opts=OPTS, dll='mayaeggimport'+VER+'.mll', obj=[
- 'mayaegg'+VER+'_loader.obj',
- 'mayaeggimport'+VER+'_mayaeggimport.obj',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll'
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_mayaloader.cxx', obj='mayaloader'+VER+'_config_mayaloader.obj')
- EnqueueLink(dll='libp3mayaloader'+VER+'.dll', opts=['ADVAPI', 'MAYA'+VER], obj=[
- 'mayaloader'+VER+'_config_mayaloader.obj',
- 'libmayaegg'+VER+'.lib',
- 'libp3ptloader.lib',
- 'libconverter.lib',
- 'libpandatoolbase.lib',
- 'libmaya'+VER+'.lib',
- 'libfltegg.lib',
- 'libflt.lib',
- 'liblwoegg.lib',
- 'liblwo.lib',
- 'libdxfegg.lib',
- 'libdxf.lib',
- 'libvrmlegg.lib',
- 'libpvrml.lib',
- 'libxfileegg.lib',
- 'libxfile.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaPview.cxx', obj='mayapview'+VER+'_mayaPview.obj')
- EnqueueLink(dll='libmayapview'+VER+'.mll', opts=['ADVAPI', 'MAYA'+VER], obj=[
- 'mayapview'+VER+'_mayaPview.obj',
- 'libmayaegg'+VER+'.lib',
- 'libmaya'+VER+'.lib',
- 'libconverter.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libp3framework.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaToEgg.cxx', obj='maya2egg'+VER+'_mayaToEgg.obj')
- EnqueueLink(dll='maya2egg'+VER+'.exe', opts=['ADVAPI', 'MAYA'+VER], obj=[
- 'maya2egg'+VER+'_mayaToEgg.obj',
- 'libmayaegg'+VER+'.lib',
- 'libmaya'+VER+'.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libconverter.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaCopy.cxx', obj='mayacopy'+VER+'_mayaCopy.obj')
- EnqueueLink(dll='mayacopy'+VER+'.exe', opts=['ADVAPI', 'MAYA'+VER], obj=[
- 'mayacopy'+VER+'_mayaCopy.obj',
- 'libcvscopy.lib',
- 'libmaya'+VER+'.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libconverter.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaSavePview.cxx', obj='mayasavepview'+VER+'_mayaSavePview.obj')
- EnqueueLink(dll='libmayasavepview'+VER+'.mll', opts=['ADVAPI', 'MAYA'+VER], obj=[
- 'mayasavepview'+VER+'_mayaSavePview.obj',
- ])
- #
- # DIRECTORY: pandatool/src/miscprogs/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/miscprogs']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='binToC.cxx', obj='bin2c_binToC.obj')
- EnqueueLink(dll='bin2c.exe', opts=['ADVAPI'], obj=[
- 'bin2c_binToC.obj',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandatool/src/pstatserver/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/pstatserver']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pstatserver_composite1.cxx', obj='pstatserver_composite1.obj')
- EnqueueLib(lib='libpstatserver.lib', obj=[ 'pstatserver_composite1.obj' ])
- #
- # DIRECTORY: pandatool/src/softprogs/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/softprogs']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='softCVS.cxx', obj='softcvs_softCVS.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='softFilename.cxx', obj='softcvs_softFilename.obj')
- EnqueueLink(opts=['ADVAPI'], dll='softcvs.exe', obj=[
- 'softcvs_softCVS.obj',
- 'softcvs_softFilename.obj',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandatool/src/text-stats/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/text-stats']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='textMonitor.cxx', obj='text-stats_textMonitor.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='textStats.cxx', obj='text-stats_textStats.obj')
- EnqueueLink(opts=['ADVAPI'], dll='text-stats.exe', obj=[
- 'text-stats_textMonitor.obj',
- 'text-stats_textStats.obj',
- 'libprogbase.lib',
- 'libpstatserver.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandatool/src/vrmlprogs/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/vrmlprogs', 'pandatool/src/vrml', 'pandatool/src/vrmlegg']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlTrans.cxx', obj='vrml-trans_vrmlTrans.obj')
- EnqueueLink(opts=['ADVAPI'], dll='vrml-trans.exe', obj=[
- 'vrml-trans_vrmlTrans.obj',
- 'libprogbase.lib',
- 'libpvrml.lib',
- 'libpandatoolbase.lib',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlToEgg.cxx', obj='vrml2egg_vrmlToEgg.obj')
- EnqueueLink(opts=['ADVAPI'], dll='vrml2egg.exe', obj=[
- 'vrml2egg_vrmlToEgg.obj',
- 'libvrmlegg.lib',
- 'libpvrml.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libconverter.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandatool/src/win-stats/
- #
- if (OMIT.count("PANDATOOL")==0) and (sys.platform == "win32"):
- IPATH=['pandatool/src/win-stats']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='winstats_composite1.cxx', obj='pstats_composite1.obj')
- EnqueueLink(opts=['WINSOCK', 'WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM'],
- dll='pstats.exe', obj=[
- 'pstats_composite1.obj',
- 'libprogbase.lib',
- 'libpstatserver.lib',
- 'libpandatoolbase.lib',
- 'libpandaexpress.dll',
- 'libpanda.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandatool/src/xfileprogs/
- #
- if (OMIT.count("PANDATOOL")==0):
- IPATH=['pandatool/src/xfileprogs', 'pandatool/src/xfile', 'pandatool/src/xfileegg']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToX.cxx', obj='egg2x_eggToX.obj')
- EnqueueLink(dll='egg2x.exe', opts=['ADVAPI'], obj=[
- 'egg2x_eggToX.obj',
- 'libxfileegg.lib',
- 'libxfile.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libconverter.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='xFileTrans.cxx', obj='x-trans_xFileTrans.obj')
- EnqueueLink(dll='x-trans.exe', opts=['ADVAPI'], obj=[
- 'x-trans_xFileTrans.obj',
- 'libprogbase.lib',
- 'libxfile.lib',
- 'libpandatoolbase.lib',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='xFileToEgg.cxx', obj='x2egg_xFileToEgg.obj')
- EnqueueLink(opts=['ADVAPI'], dll='x2egg.exe', obj=[
- 'x2egg_xFileToEgg.obj',
- 'libxfileegg.lib',
- 'libxfile.lib',
- 'libconverter.lib',
- 'libeggbase.lib',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libpandaegg.dll',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtoolconfig.dll',
- 'libp3dtool.dll',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandaapp/src/pandaappbase/
- #
- if (OMIT.count("PANDAAPP")==0):
- IPATH=['pandaapp/src/pandaappbase']
- OPTS=[]
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaappbase.cxx', obj='pandaappbase_pandaappbase.obj')
- EnqueueLib(lib='libpandaappbase.lib', obj=['pandaappbase_pandaappbase.obj'])
- #
- # DIRECTORY: pandaapp/src/httpbackup/
- #
- if (OMIT.count("OPENSSL")==0) and (OMIT.count("PANDAAPP")==0):
- IPATH=['pandaapp/src/httpbackup', 'pandaapp/src/pandaappbase']
- OPTS=['OPENSSL']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='backupCatalog.cxx', obj='httpbackup_backupCatalog.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='httpBackup.cxx', obj='httpbackup_httpBackup.obj')
- EnqueueLink(opts=['ADVAPI', 'OPENSSL'], dll='httpbackup.exe', obj=[
- 'httpbackup_backupCatalog.obj',
- 'httpbackup_httpBackup.obj',
- 'libpandaappbase.lib',
- 'libpandaexpress.dll',
- 'libpanda.dll',
- 'libp3dtool.dll',
- 'libp3dtoolconfig.dll',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libp3pystub.dll',
- ])
- #
- # DIRECTORY: pandaapp/src/indexify/
- #
- if (OMIT.count("FREETYPE")==0) and (OMIT.count("PANDAAPP")==0):
- IPATH=['pandaapp/src/indexify']
- OPTS=[ 'FREETYPE']
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='font-samples_default_font.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='fontSamples.cxx', obj='font-samples_fontSamples.obj')
- EnqueueLink(opts=['ADVAPI', 'FREETYPE'], dll='font-samples.exe', obj=[
- 'font-samples_default_font.obj',
- 'font-samples_fontSamples.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtool.dll',
- 'libp3dtoolconfig.dll',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libp3pystub.dll',
- ])
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='default_index_icons.cxx', obj='indexify_default_index_icons.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='indexify_default_font.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexImage.cxx', obj='indexify_indexImage.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexParameters.cxx', obj='indexify_indexParameters.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexify.cxx', obj='indexify_indexify.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='photo.cxx', obj='indexify_photo.obj')
- EnqueueCxx(ipath=IPATH, opts=OPTS, src='rollDirectory.cxx', obj='indexify_rollDirectory.obj')
- EnqueueLink(opts=['ADVAPI', 'FREETYPE'], dll='indexify.exe', obj=[
- 'indexify_default_index_icons.obj',
- 'indexify_default_font.obj',
- 'indexify_indexImage.obj',
- 'indexify_indexParameters.obj',
- 'indexify_indexify.obj',
- 'indexify_photo.obj',
- 'indexify_rollDirectory.obj',
- 'libpanda.dll',
- 'libpandaexpress.dll',
- 'libp3dtool.dll',
- 'libp3dtoolconfig.dll',
- 'libprogbase.lib',
- 'libpandatoolbase.lib',
- 'libp3pystub.dll',
- ])
- #
- # Generate the models directory
- #
- if (OMIT.count("PANDATOOL")==0):
- CompileAllModels("built/models/misc/", "dmodels/src/misc/")
- CompileAllModels("built/models/gui/", "dmodels/src/gui/")
- CompileAllModels("built/models/", "models/")
- CopyAllFiles("built/models/audio/sfx/", "dmodels/src/audio/sfx/", ".wav")
- CopyAllFiles("built/models/icons/", "dmodels/src/icons/", ".gif")
-
- CopyAllFiles("built/models/maps/", "models/maps/", ".jpg")
- CopyAllFiles("built/models/maps/", "models/maps/", ".png")
- CopyAllFiles("built/models/maps/", "models/maps/", ".rgb")
- CopyAllFiles("built/models/maps/", "models/maps/", ".rgba")
-
- CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".jpg")
- CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".png")
- CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".rgb")
- CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".rgba")
- ##########################################################################################
- #
- # Dependency-Based Distributed Build System.
- #
- ##########################################################################################
- def BuildWorker(taskqueue, donequeue, slave):
- print "Slave online: "+slave
- while (1):
- task = taskqueue.get()
- sys.stdout.flush()
- if (task == 0): return
- try:
- apply(task[0],task[1])
- donequeue.put(task)
- except:
- donequeue.put(0)
- def AllSourcesReady(task, pending):
- sources = task[3]
- for x in sources:
- if (pending.has_key(x)):
- return 0
- altsources = task[4]
- for x in altsources:
- if (pending.has_key(x)):
- return 0
- return 1
- def ParallelMake(tasklist):
- # Read the slave-file.
- slaves = []
- for i in range(THREADCOUNT):
- slaves.append("local")
- # create the communication queues.
- donequeue=Queue.Queue()
- taskqueue=Queue.Queue()
- # build up a table listing all the pending targets
- pending = {}
- for task in tasklist:
- for target in task[2]:
- pending[target] = 1
- # create the workers
- for slave in slaves:
- th = threading.Thread(target=BuildWorker, args=[taskqueue,donequeue,slave])
- th.setDaemon(1)
- th.start()
- # feed tasks to the workers.
- tasksqueued = 0
- while (1):
- if (tasksqueued < len(slaves)*2):
- extras = []
- for task in tasklist:
- if (tasksqueued < len(slaves)*3) & (AllSourcesReady(task, pending)):
- if (NeedsBuild(task[2], task[3])):
- tasksqueued += 1
- taskqueue.put(task)
- else:
- for target in task[2]:
- del pending[target]
- else:
- extras.append(task)
- tasklist = extras
- sys.stdout.flush()
- if (tasksqueued == 0): break
- donetask = donequeue.get()
- if (donetask == 0):
- exit("Build process aborting.")
- sys.stdout.flush()
- tasksqueued -= 1
- JustBuilt(donetask[2], donetask[3])
- for target in donetask[2]:
- del pending[target]
- # kill the workers.
- for slave in slaves:
- taskqueue.put(0)
- # make sure there aren't any unsatisfied tasks
- if (len(tasklist)>0):
- exit("Dependency problem - task unsatisfied: "+str(tasklist[0][2]))
- def SequentialMake(tasklist):
- for task in tasklist:
- if (NeedsBuild(task[2], task[3])):
- apply(task[0], task[1])
- JustBuilt(task[2], task[3])
- def RunDependencyQueue(tasklist):
- if (THREADCOUNT!=0):
- ParallelMake(tasklist)
- else:
- SequentialMake(tasklist)
- RunDependencyQueue(DEPENDENCYQUEUE)
- ##########################################################################################
- #
- # Run genpycode
- #
- ##########################################################################################
- if (OMIT.count("PYTHON")==0):
- inputs = []
- for x in GetDirectoryContents("built/pandac/input", ["*.in"]):
- inputs.append("built/pandac/input/" + x)
- if (NeedsBuild(['built/pandac/PandaModules.py'],inputs)):
- if (GENMAN): oscmd("built/bin/genpycode -d")
- else : oscmd("built/bin/genpycode")
- JustBuilt(['built/pandac/PandaModules.py'],inputs)
- ##########################################################################################
- #
- # The Installers
- #
- # Under windows, we can build an 'exe' package using NSIS
- # Under linux, we can build an 'deb' package using dpkg-deb
- # Makepanda does not build RPMs. To do that, use 'rpm -tb' on the source tarball.
- #
- ##########################################################################################
- def MakeInstallerNSIS(file,fullname,smdirectory,installdir):
- print "Building "+fullname+" installer. This can take up to an hour."
- if (COMPRESSOR != "lzma"):
- print("Note: you are using zlib, which is faster, but lzma gives better compression.")
- if (os.path.exists(file)):
- os.remove(file)
- if (os.path.exists("nsis-output.exe")):
- os.remove("nsis-output.exe")
- psource=os.path.abspath(".")
- panda=os.path.abspath("built")
- cmd="thirdparty/win-nsis/makensis /V2 "
- cmd=cmd+'/DCOMPRESSOR="'+COMPRESSOR+'" '
- cmd=cmd+'/DNAME="'+fullname+'" '
- cmd=cmd+'/DSMDIRECTORY="'+smdirectory+'" '
- cmd=cmd+'/DINSTALLDIR="'+installdir+'" '
- cmd=cmd+'/DOUTFILE="'+psource+'\\nsis-output.exe" '
- cmd=cmd+'/DLICENSE="'+panda+'\\LICENSE" '
- cmd=cmd+'/DLANGUAGE="Panda3DEnglish" '
- cmd=cmd+'/DRUNTEXT="Run the Panda Greeting Card" '
- cmd=cmd+'/DIBITMAP="panda-install.bmp" '
- cmd=cmd+'/DUBITMAP="panda-uninstall.bmp" '
- cmd=cmd+'/DPANDA="'+panda+'" '
- cmd=cmd+'/DPSOURCE="'+psource+'" '
- cmd=cmd+'/DPYEXTRAS="'+psource+'\\thirdparty\\win-extras" '
- cmd=cmd+'"'+psource+'\\direct\\src\\directscripts\\packpanda.nsi"'
- oscmd( cmd)
- os.rename("nsis-output.exe", file)
- INSTALLER_DEB_FILE="""
- Package: panda3d
- Version: VERSION
- Section: libdevel
- Priority: optional
- Architecture: i386
- Essential: no
- Depends: PYTHONV
- Provides: panda3d
- Maintainer: [email protected]
- Description: The panda3D free 3D engine
- """
- INSTALLER_SPEC_FILE="""
- Summary: Panda 3D Engine
- Name: panda3d
- Version: VERSION
- Release: 1
- License: Panda3D License
- Group: Development/Libraries
- BuildRoot: PANDASOURCE/linuxroot
- %description
- The Panda3D engine.
- %post
- /sbin/ldconfig
- %postun
- /sbin/ldconfig
- %files
- %defattr(-,root,root)
- /etc/Confauto.prc
- /etc/Config.prc
- /usr/share/panda3d
- /etc/ld.so.conf.d/panda3d.conf
- /usr/bin
- /usr/lib
- /usr/include/panda3d
- """
- def MakeInstallerLinux():
- import compileall
- PYTHONV=os.path.basename(PYTHONSDK)
- if (os.path.isdir("linuxroot")): oscmd("chmod -R 755 linuxroot")
- oscmd("rm -rf linuxroot data.tar.gz control.tar.gz i386 panda3d.spec")
- oscmd("mkdir -p linuxroot/usr/bin")
- oscmd("mkdir -p linuxroot/usr/include")
- oscmd("mkdir -p linuxroot/usr/share/panda3d")
- oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/lib-dynload")
- oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/site-packages")
- oscmd("mkdir -p linuxroot/etc/ld.so.conf.d")
- oscmd("sed -e 's@$THIS_PRC_DIR/[.][.]@/usr/share/panda3d@' < built/etc/Config.prc > linuxroot/etc/Config.prc")
- oscmd("cp built/etc/Confauto.prc linuxroot/etc/Confauto.prc")
- oscmd("cp --recursive built/include linuxroot/usr/include/panda3d")
- oscmd("cp --recursive direct linuxroot/usr/share/panda3d/direct")
- oscmd("cp --recursive built/pandac linuxroot/usr/share/panda3d/pandac")
- oscmd("cp --recursive built/Pmw linuxroot/usr/share/panda3d/Pmw")
- oscmd("cp built/direct/__init__.py linuxroot/usr/share/panda3d/direct/__init__.py")
- oscmd("cp --recursive SceneEditor linuxroot/usr/share/panda3d/SceneEditor")
- oscmd("cp --recursive built/models linuxroot/usr/share/panda3d/models")
- oscmd("cp --recursive samples linuxroot/usr/share/panda3d/samples")
- oscmd("cp doc/LICENSE linuxroot/usr/share/panda3d/LICENSE")
- oscmd("cp doc/LICENSE linuxroot/usr/include/panda3d/LICENSE")
- oscmd("cp doc/ReleaseNotes linuxroot/usr/share/panda3d/ReleaseNotes")
- oscmd("echo '/usr/lib/panda3d' > linuxroot/etc/ld.so.conf.d/panda3d.conf")
- oscmd("echo '/usr/share/panda3d' > linuxroot/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth")
- oscmd("cp built/bin/* linuxroot/usr/bin/")
- for base in os.listdir("built/lib"):
- oscmd("ln -sf /usr/lib/"+base+" linuxroot/usr/lib/"+PYTHONV+"/lib-dynload/"+base)
- oscmd("cp built/lib/"+base+" linuxroot/usr/lib/"+base)
- for base in os.listdir("linuxroot/usr/share/panda3d/direct/src"):
- if ((base != "extensions") and (base != "extensions_native")):
- compileall.compile_dir("linuxroot/usr/share/panda3d/direct/src/"+base)
- compileall.compile_dir("linuxroot/usr/share/panda3d/Pmw")
- compileall.compile_dir("linuxroot/usr/share/panda3d/SceneEditor")
- oscmd("chmod -R 555 linuxroot/usr/share/panda3d")
- if (os.path.exists("/usr/bin/dpkg-deb")):
- txt = INSTALLER_DEB_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV)
- oscmd("mkdir -p linuxroot/DEBIAN")
- oscmd("cd linuxroot ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums")
- oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums")
- WriteFile("linuxroot/DEBIAN/conffiles","/etc/Config.prc\n")
- WriteFile("linuxroot/DEBIAN/control",txt)
- oscmd("dpkg-deb -b linuxroot panda3d_"+VERSION+"_i386.deb")
- oscmd("chmod -R 755 linuxroot")
- if (os.path.exists("/usr/bin/rpmbuild")):
- txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",PANDASOURCE)
- WriteFile("panda3d.spec", txt)
- oscmd("rpmbuild --define '_rpmdir "+PANDASOURCE+"' -bb panda3d.spec")
- oscmd("mv i386/panda3d-"+VERSION+"-1.i386.rpm .")
-
- oscmd("chmod -R 755 linuxroot")
- oscmd("rm -rf linuxroot data.tar.gz control.tar.gz i386 panda3d.spec")
-
-
- if (INSTALLER != 0):
- if (sys.platform == "win32"):
- MakeInstallerNSIS("Panda3D-"+VERSION+".exe", "Panda3D", "Panda3D "+VERSION, "C:\\Panda3D-"+VERSION)
- elif (sys.platform == "linux2"):
- MakeInstallerLinux()
- else:
- exit("Do not know how to make an installer for this platform")
- ##########################################################################################
- #
- # Print final status report.
- #
- ##########################################################################################
- SaveDependencyCache()
- WARNINGS.append("Elapsed Time: "+PrettyTime(time.time() - STARTTIME))
- #WARNINGS.append("Time(EnqueueCxx): "+PrettyTime(TIMECOMPILEC))
- #WARNINGS.append("Time(CompileLib): "+PrettyTime(TIMECOMPILELIB))
- #WARNINGS.append("Time(EnqueueLink): "+PrettyTime(TIMECOMPILELINK))
- #WARNINGS.append("Time(EnqueueIgate): "+PrettyTime(TIMEINTERROGATE))
- #WARNINGS.append("Time(EnqueueImod): "+PrettyTime(TIMEINTERROGATEMODULE))
- printStatus("Makepanda Final Status Report", WARNINGS)
|