diff --git a/makepanda/installer.nsi b/makepanda/installer.nsi index 1dab5196da..7b1d6ea25e 100644 --- a/makepanda/installer.nsi +++ b/makepanda/installer.nsi @@ -331,13 +331,24 @@ SectionGroup "Python support" SetOutPath $INSTDIR\panda3d File /r "${BUILT}\panda3d\*.py" - File /r /x bullet.pyd /x ode.pyd /x physx.pyd /x rocket.pyd "${BUILT}\panda3d\*.pyd" + File /nonfatal /r "${BUILT}\panda3d\core${EXT_SUFFIX}" + File /nonfatal /r "${BUILT}\panda3d\ai${EXT_SUFFIX}" + File /nonfatal /r "${BUILT}\panda3d\awesomium${EXT_SUFFIX}" + File /nonfatal /r "${BUILT}\panda3d\direct${EXT_SUFFIX}" + File /nonfatal /r "${BUILT}\panda3d\egg${EXT_SUFFIX}" + File /nonfatal /r "${BUILT}\panda3d\fx${EXT_SUFFIX}" + File /nonfatal /r "${BUILT}\panda3d\interrogatedb${EXT_SUFFIX}" + File /nonfatal /r "${BUILT}\panda3d\physics${EXT_SUFFIX}" + File /nonfatal /r "${BUILT}\panda3d\_rplight${EXT_SUFFIX}" + File /nonfatal /r "${BUILT}\panda3d\skel${EXT_SUFFIX}" + File /nonfatal /r "${BUILT}\panda3d\vision${EXT_SUFFIX}" + File /nonfatal /r "${BUILT}\panda3d\vrpn${EXT_SUFFIX}" !ifdef HAVE_BULLET SectionGetFlags ${SecBullet} $R0 IntOp $R0 $R0 & ${SF_SELECTED} StrCmp $R0 ${SF_SELECTED} 0 SkipBulletPyd - File /nonfatal /r "${BUILT}\panda3d\bullet.pyd" + File /nonfatal /r "${BUILT}\panda3d\bullet${EXT_SUFFIX}" SkipBulletPyd: !endif @@ -345,7 +356,7 @@ SectionGroup "Python support" SectionGetFlags ${SecODE} $R0 IntOp $R0 $R0 & ${SF_SELECTED} StrCmp $R0 ${SF_SELECTED} 0 SkipODEPyd - File /nonfatal /r "${BUILT}\panda3d\ode.pyd" + File /nonfatal /r "${BUILT}\panda3d\ode${EXT_SUFFIX}" SkipODEPyd: !endif @@ -353,7 +364,7 @@ SectionGroup "Python support" SectionGetFlags ${SecPhysX} $R0 IntOp $R0 $R0 & ${SF_SELECTED} StrCmp $R0 ${SF_SELECTED} 0 SkipPhysXPyd - File /nonfatal /r "${BUILT}\panda3d\physx.pyd" + File /nonfatal /r "${BUILT}\panda3d\physx${EXT_SUFFIX}" SkipPhysXPyd: !endif @@ -361,7 +372,7 @@ SectionGroup "Python support" SectionGetFlags ${SecRocket} $R0 IntOp $R0 $R0 & ${SF_SELECTED} StrCmp $R0 ${SF_SELECTED} 0 SkipRocketPyd - File /nonfatal /r "${BUILT}\panda3d\rocket.pyd" + File /nonfatal /r "${BUILT}\panda3d\rocket${EXT_SUFFIX}" SkipRocketPyd: !endif diff --git a/makepanda/installpanda.py b/makepanda/installpanda.py index 63a4601ee6..410847efc7 100644 --- a/makepanda/installpanda.py +++ b/makepanda/installpanda.py @@ -175,6 +175,7 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built", libdir=GetLibDir( oscmd("mkdir -m 0755 -p "+destdir+prefix+"/share/applications") oscmd("mkdir -m 0755 -p "+destdir+libdir+"/panda3d") oscmd("mkdir -m 0755 -p "+destdir+PPATH) + oscmd("mkdir -m 0755 -p "+destdir+PPATH+"/panda3d") if (sys.platform.startswith("freebsd")): oscmd("mkdir -m 0755 -p "+destdir+prefix+"/etc") @@ -194,13 +195,17 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built", libdir=GetLibDir( oscmd("cp -R "+outputdir+"/include "+destdir+prefix+"/include/panda3d") oscmd("cp -R "+outputdir+"/pandac "+destdir+prefix+"/share/panda3d/") - oscmd("cp -R "+outputdir+"/panda3d "+destdir+PPATH+"/") oscmd("cp -R "+outputdir+"/models "+destdir+prefix+"/share/panda3d/") if os.path.isdir("samples"): oscmd("cp -R samples "+destdir+prefix+"/share/panda3d/") if os.path.isdir(outputdir+"/direct"): oscmd("cp -R "+outputdir+"/direct "+destdir+prefix+"/share/panda3d/") if os.path.isdir(outputdir+"/Pmw"): oscmd("cp -R "+outputdir+"/Pmw "+destdir+prefix+"/share/panda3d/") if os.path.isdir(outputdir+"/plugins"): oscmd("cp -R "+outputdir+"/plugins "+destdir+prefix+"/share/panda3d/") + suffix = GetExtensionSuffix() + for base in os.listdir(outputdir + "/panda3d"): + if base.endswith(".py") or (base.endswith(suffix) and '.' not in base[:-len(suffix)]): + oscmd("cp "+outputdir+"/panda3d/"+base+" "+destdir+PPATH+"/panda3d/"+base) + WriteMimeFile(destdir+prefix+"/share/mime-info/panda3d.mime", MIME_INFO) WriteKeysFile(destdir+prefix+"/share/mime-info/panda3d.keys", MIME_INFO) WriteMimeXMLFile(destdir+prefix+"/share/mime/packages/panda3d.xml", MIME_INFO) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index eae006b2ec..2689205461 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1448,7 +1448,6 @@ def CompileFlex(wobj,wsrc,opts): def CompileIgate(woutd,wsrc,opts): outbase = os.path.basename(woutd)[:-3] woutc = GetOutputDir()+"/tmp/"+outbase+"_igate.cxx" - wobj = FindLocation(outbase + "_igate.obj", []) srcdir = GetValueOption(opts, "SRCDIR:") module = GetValueOption(opts, "IMOD:") library = GetValueOption(opts, "ILIB:") @@ -1457,7 +1456,7 @@ def CompileIgate(woutd,wsrc,opts): WriteFile(woutc, "") WriteFile(woutd, "") ConditionalWriteFile(woutd, "") - return (wobj, woutc, opts) + return if not CrossCompiling(): # If we're compiling for this platform, we can use the one we've built. @@ -1524,8 +1523,6 @@ def CompileIgate(woutd,wsrc,opts): cmd += ' ' + BracketNameWithQuotes(os.path.basename(x)) oscmd(cmd) - return (wobj, woutc, opts) - ######################################################################## ## ## CompileImod @@ -2198,9 +2195,7 @@ def CompileAnything(target, inputs, opts, progress = None): return CompileLink(target, inputs, opts) elif (origsuffix==".in"): ProgressOutput(progress, "Building Interrogate database", target) - args = CompileIgate(target, inputs, opts) - ProgressOutput(progress, "Building C++ object", args[0]) - return CompileCxx(*args) + return CompileIgate(target, inputs, opts) elif (origsuffix==".plugin" and GetTarget() == "darwin"): ProgressOutput(progress, "Building plugin bundle", target) return CompileBundle(target, inputs, opts) @@ -3450,16 +3445,14 @@ TargetAdd('libp3interrogatedb.dll', input='p3interrogatedb_composite2.obj') TargetAdd('libp3interrogatedb.dll', input='libp3dtool.dll') TargetAdd('libp3interrogatedb.dll', input='libp3dtoolconfig.dll') -if not PkgSkip("PYTHON"): - # This used to be called dtoolconfig.pyd, but it just contains the interrogatedb - # stuff, so it has been renamed appropriately. - OPTS=['DIR:dtool/metalibs/dtoolconfig', 'PYTHON'] - TargetAdd('interrogatedb_pydtool.obj', opts=OPTS, input="pydtool.cxx") - TargetAdd('interrogatedb.pyd', input='interrogatedb_pydtool.obj') - TargetAdd('interrogatedb.pyd', input='libp3dtool.dll') - TargetAdd('interrogatedb.pyd', input='libp3dtoolconfig.dll') - TargetAdd('interrogatedb.pyd', input='libp3interrogatedb.dll') - TargetAdd('interrogatedb.pyd', opts=['PYTHON']) +# This used to be called dtoolconfig.pyd, but it just contains the interrogatedb +# stuff, so it has been renamed appropriately. +OPTS=['DIR:dtool/metalibs/dtoolconfig'] +PyTargetAdd('interrogatedb_pydtool.obj', opts=OPTS, input="pydtool.cxx") +PyTargetAdd('interrogatedb.pyd', input='interrogatedb_pydtool.obj') +PyTargetAdd('interrogatedb.pyd', input='libp3dtool.dll') +PyTargetAdd('interrogatedb.pyd', input='libp3dtoolconfig.dll') +PyTargetAdd('interrogatedb.pyd', input='libp3interrogatedb.dll') # # DIRECTORY: dtool/src/pystub/ @@ -3541,7 +3534,7 @@ if (not RTDIST and not RUNTIME): # DIRECTORY: dtool/src/dtoolbase/ # -OPTS=['DIR:dtool/src/dtoolbase', 'PYTHON'] +OPTS=['DIR:dtool/src/dtoolbase'] IGATEFILES=GetDirectoryContents('dtool/src/dtoolbase', ["*_composite*.cxx"]) IGATEFILES += [ "typeHandle.h", @@ -3552,14 +3545,13 @@ IGATEFILES += [ ] TargetAdd('libp3dtoolbase.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3dtoolbase.in', opts=['IMOD:panda3d.core', 'ILIB:libp3dtoolbase', 'SRCDIR:dtool/src/dtoolbase']) -TargetAdd('libp3dtoolbase_igate.obj', input='libp3dtoolbase.in', opts=["DEPENDENCYONLY"]) -TargetAdd('p3dtoolbase_typeHandle_ext.obj', opts=OPTS, input='typeHandle_ext.cxx') +PyTargetAdd('p3dtoolbase_typeHandle_ext.obj', opts=OPTS, input='typeHandle_ext.cxx') # # DIRECTORY: dtool/src/dtoolutil/ # -OPTS=['DIR:dtool/src/dtoolutil', 'PYTHON'] +OPTS=['DIR:dtool/src/dtoolutil'] IGATEFILES=GetDirectoryContents('dtool/src/dtoolutil', ["*_composite*.cxx"]) IGATEFILES += [ "config_dtoolutil.h", @@ -3577,19 +3569,17 @@ IGATEFILES += [ ] TargetAdd('libp3dtoolutil.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3dtoolutil.in', opts=['IMOD:panda3d.core', 'ILIB:libp3dtoolutil', 'SRCDIR:dtool/src/dtoolutil']) -TargetAdd('libp3dtoolutil_igate.obj', input='libp3dtoolutil.in', opts=["DEPENDENCYONLY"]) -TargetAdd('p3dtoolutil_ext_composite.obj', opts=OPTS, input='p3dtoolutil_ext_composite.cxx') +PyTargetAdd('p3dtoolutil_ext_composite.obj', opts=OPTS, input='p3dtoolutil_ext_composite.cxx') # # DIRECTORY: dtool/src/prc/ # -OPTS=['DIR:dtool/src/prc', 'PYTHON'] +OPTS=['DIR:dtool/src/prc'] IGATEFILES=GetDirectoryContents('dtool/src/prc', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3prc.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3prc.in', opts=['IMOD:panda3d.core', 'ILIB:libp3prc', 'SRCDIR:dtool/src/prc']) -TargetAdd('libp3prc_igate.obj', input='libp3prc.in', opts=["DEPENDENCYONLY"]) -TargetAdd('p3prc_ext_composite.obj', opts=OPTS, input='p3prc_ext_composite.cxx') +PyTargetAdd('p3prc_ext_composite.obj', opts=OPTS, input='p3prc_ext_composite.cxx') # # DIRECTORY: panda/src/pandabase/ @@ -3606,12 +3596,11 @@ OPTS=['DIR:panda/src/express', 'BUILDING:PANDAEXPRESS', 'OPENSSL', 'ZLIB'] TargetAdd('p3express_composite1.obj', opts=OPTS, input='p3express_composite1.cxx') TargetAdd('p3express_composite2.obj', opts=OPTS, input='p3express_composite2.cxx') -OPTS=['DIR:panda/src/express', 'OPENSSL', 'ZLIB', 'PYTHON'] +OPTS=['DIR:panda/src/express', 'OPENSSL', 'ZLIB'] IGATEFILES=GetDirectoryContents('panda/src/express', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3express.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3express.in', opts=['IMOD:panda3d.core', 'ILIB:libp3express', 'SRCDIR:panda/src/express']) -TargetAdd('libp3express_igate.obj', input='libp3express.in', opts=["DEPENDENCYONLY"]) -TargetAdd('p3express_ext_composite.obj', opts=OPTS, input='p3express_ext_composite.cxx') +PyTargetAdd('p3express_ext_composite.obj', opts=OPTS, input='p3express_ext_composite.cxx') # # DIRECTORY: panda/src/downloader/ @@ -3621,12 +3610,11 @@ OPTS=['DIR:panda/src/downloader', 'BUILDING:PANDAEXPRESS', 'OPENSSL', 'ZLIB'] TargetAdd('p3downloader_composite1.obj', opts=OPTS, input='p3downloader_composite1.cxx') TargetAdd('p3downloader_composite2.obj', opts=OPTS, input='p3downloader_composite2.cxx') -OPTS=['DIR:panda/src/downloader', 'OPENSSL', 'ZLIB', 'PYTHON'] +OPTS=['DIR:panda/src/downloader', 'OPENSSL', 'ZLIB'] IGATEFILES=GetDirectoryContents('panda/src/downloader', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3downloader.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3downloader.in', opts=['IMOD:panda3d.core', 'ILIB:libp3downloader', 'SRCDIR:panda/src/downloader']) -TargetAdd('libp3downloader_igate.obj', input='libp3downloader.in', opts=["DEPENDENCYONLY"]) -TargetAdd('p3downloader_stringStream_ext.obj', opts=OPTS, input='stringStream_ext.cxx') +PyTargetAdd('p3downloader_stringStream_ext.obj', opts=OPTS, input='stringStream_ext.cxx') # # DIRECTORY: panda/metalibs/pandaexpress/ @@ -3653,12 +3641,11 @@ if (not RUNTIME): TargetAdd('p3pipeline_composite2.obj', opts=OPTS, input='p3pipeline_composite2.cxx') TargetAdd('p3pipeline_contextSwitch.obj', opts=OPTS, input='contextSwitch.c') - OPTS=['DIR:panda/src/pipeline', 'PYTHON'] + OPTS=['DIR:panda/src/pipeline'] IGATEFILES=GetDirectoryContents('panda/src/pipeline', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3pipeline.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3pipeline.in', opts=['IMOD:panda3d.core', 'ILIB:libp3pipeline', 'SRCDIR:panda/src/pipeline']) - TargetAdd('libp3pipeline_igate.obj', input='libp3pipeline.in', opts=["DEPENDENCYONLY"]) - TargetAdd('p3pipeline_pythonThread.obj', opts=OPTS, input='pythonThread.cxx') + PyTargetAdd('p3pipeline_pythonThread.obj', opts=OPTS, input='pythonThread.cxx') # # DIRECTORY: panda/src/linmath/ @@ -3669,7 +3656,7 @@ if (not RUNTIME): TargetAdd('p3linmath_composite1.obj', opts=OPTS, input='p3linmath_composite1.cxx') TargetAdd('p3linmath_composite2.obj', opts=OPTS, input='p3linmath_composite2.cxx') - OPTS=['DIR:panda/src/linmath', 'PYTHON'] + OPTS=['DIR:panda/src/linmath'] IGATEFILES=GetDirectoryContents('panda/src/linmath', ["*.h", "*_composite*.cxx"]) for ifile in IGATEFILES[:]: if "_src." in ifile: @@ -3679,7 +3666,6 @@ if (not RUNTIME): IGATEFILES.remove('cast_to_float.h') TargetAdd('libp3linmath.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3linmath.in', opts=['IMOD:panda3d.core', 'ILIB:libp3linmath', 'SRCDIR:panda/src/linmath']) - TargetAdd('libp3linmath_igate.obj', input='libp3linmath.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/putil/ @@ -3690,14 +3676,13 @@ if (not RUNTIME): TargetAdd('p3putil_composite1.obj', opts=OPTS, input='p3putil_composite1.cxx') TargetAdd('p3putil_composite2.obj', opts=OPTS, input='p3putil_composite2.cxx') - OPTS=['DIR:panda/src/putil', 'ZLIB', 'PYTHON'] + OPTS=['DIR:panda/src/putil', 'ZLIB'] IGATEFILES=GetDirectoryContents('panda/src/putil', ["*.h", "*_composite*.cxx"]) IGATEFILES.remove("test_bam.h") IGATEFILES.remove("config_util.h") TargetAdd('libp3putil.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3putil.in', opts=['IMOD:panda3d.core', 'ILIB:libp3putil', 'SRCDIR:panda/src/putil']) - TargetAdd('libp3putil_igate.obj', input='libp3putil.in', opts=["DEPENDENCYONLY"]) - TargetAdd('p3putil_ext_composite.obj', opts=OPTS, input='p3putil_ext_composite.cxx') + PyTargetAdd('p3putil_ext_composite.obj', opts=OPTS, input='p3putil_ext_composite.cxx') # # DIRECTORY: panda/src/audio/ @@ -3707,11 +3692,10 @@ if (not RUNTIME): OPTS=['DIR:panda/src/audio', 'BUILDING:PANDA'] TargetAdd('p3audio_composite1.obj', opts=OPTS, input='p3audio_composite1.cxx') - OPTS=['DIR:panda/src/audio', 'PYTHON'] + OPTS=['DIR:panda/src/audio'] IGATEFILES=["audio.h"] TargetAdd('libp3audio.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3audio.in', opts=['IMOD:panda3d.core', 'ILIB:libp3audio', 'SRCDIR:panda/src/audio']) - TargetAdd('libp3audio_igate.obj', input='libp3audio.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/event/ @@ -3722,13 +3706,12 @@ if (not RUNTIME): TargetAdd('p3event_composite1.obj', opts=OPTS, input='p3event_composite1.cxx') TargetAdd('p3event_composite2.obj', opts=OPTS, input='p3event_composite2.cxx') - OPTS=['DIR:panda/src/event', 'PYTHON'] - TargetAdd('p3event_asyncFuture_ext.obj', opts=OPTS, input='asyncFuture_ext.cxx') - TargetAdd('p3event_pythonTask.obj', opts=OPTS, input='pythonTask.cxx') + OPTS=['DIR:panda/src/event'] + PyTargetAdd('p3event_asyncFuture_ext.obj', opts=OPTS, input='asyncFuture_ext.cxx') + PyTargetAdd('p3event_pythonTask.obj', opts=OPTS, input='pythonTask.cxx') IGATEFILES=GetDirectoryContents('panda/src/event', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3event.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3event.in', opts=['IMOD:panda3d.core', 'ILIB:libp3event', 'SRCDIR:panda/src/event']) - TargetAdd('libp3event_igate.obj', input='libp3event.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/mathutil/ @@ -3739,14 +3722,13 @@ if (not RUNTIME): TargetAdd('p3mathutil_composite1.obj', opts=OPTS, input='p3mathutil_composite1.cxx') TargetAdd('p3mathutil_composite2.obj', opts=OPTS, input='p3mathutil_composite2.cxx') - OPTS=['DIR:panda/src/mathutil', 'FFTW', 'PYTHON'] + OPTS=['DIR:panda/src/mathutil', 'FFTW'] IGATEFILES=GetDirectoryContents('panda/src/mathutil', ["*.h", "*_composite*.cxx"]) for ifile in IGATEFILES[:]: if "_src." in ifile: IGATEFILES.remove(ifile) TargetAdd('libp3mathutil.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3mathutil.in', opts=['IMOD:panda3d.core', 'ILIB:libp3mathutil', 'SRCDIR:panda/src/mathutil']) - TargetAdd('libp3mathutil_igate.obj', input='libp3mathutil.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/gsgbase/ @@ -3756,11 +3738,10 @@ if (not RUNTIME): OPTS=['DIR:panda/src/gsgbase', 'BUILDING:PANDA'] TargetAdd('p3gsgbase_composite1.obj', opts=OPTS, input='p3gsgbase_composite1.cxx') - OPTS=['DIR:panda/src/gsgbase', 'PYTHON'] + OPTS=['DIR:panda/src/gsgbase'] IGATEFILES=GetDirectoryContents('panda/src/gsgbase', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3gsgbase.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3gsgbase.in', opts=['IMOD:panda3d.core', 'ILIB:libp3gsgbase', 'SRCDIR:panda/src/gsgbase']) - TargetAdd('libp3gsgbase_igate.obj', input='libp3gsgbase.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/pnmimage/ @@ -3772,12 +3753,11 @@ if (not RUNTIME): TargetAdd('p3pnmimage_composite2.obj', opts=OPTS, input='p3pnmimage_composite2.cxx') TargetAdd('p3pnmimage_convert_srgb_sse2.obj', opts=OPTS+['SSE2'], input='convert_srgb_sse2.cxx') - OPTS=['DIR:panda/src/pnmimage', 'ZLIB', 'PYTHON'] + OPTS=['DIR:panda/src/pnmimage', 'ZLIB'] IGATEFILES=GetDirectoryContents('panda/src/pnmimage', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3pnmimage.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3pnmimage.in', opts=['IMOD:panda3d.core', 'ILIB:libp3pnmimage', 'SRCDIR:panda/src/pnmimage']) - TargetAdd('libp3pnmimage_igate.obj', input='libp3pnmimage.in', opts=["DEPENDENCYONLY"]) - TargetAdd('p3pnmimage_pfmFile_ext.obj', opts=OPTS, input='pfmFile_ext.cxx') + PyTargetAdd('p3pnmimage_pfmFile_ext.obj', opts=OPTS, input='pfmFile_ext.cxx') # # DIRECTORY: panda/src/nativenet/ @@ -3787,11 +3767,10 @@ if (not RUNTIME): OPTS=['DIR:panda/src/nativenet', 'OPENSSL', 'BUILDING:PANDA'] TargetAdd('p3nativenet_composite1.obj', opts=OPTS, input='p3nativenet_composite1.cxx') - OPTS=['DIR:panda/src/nativenet', 'OPENSSL', 'PYTHON'] + OPTS=['DIR:panda/src/nativenet', 'OPENSSL'] IGATEFILES=GetDirectoryContents('panda/src/nativenet', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3nativenet.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3nativenet.in', opts=['IMOD:panda3d.core', 'ILIB:libp3nativenet', 'SRCDIR:panda/src/nativenet']) - TargetAdd('libp3nativenet_igate.obj', input='libp3nativenet.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/net/ @@ -3802,12 +3781,11 @@ if (not RUNTIME): TargetAdd('p3net_composite1.obj', opts=OPTS, input='p3net_composite1.cxx') TargetAdd('p3net_composite2.obj', opts=OPTS, input='p3net_composite2.cxx') - OPTS=['DIR:panda/src/net', 'PYTHON'] + OPTS=['DIR:panda/src/net'] IGATEFILES=GetDirectoryContents('panda/src/net', ["*.h", "*_composite*.cxx"]) IGATEFILES.remove("datagram_ui.h") TargetAdd('libp3net.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3net.in', opts=['IMOD:panda3d.core', 'ILIB:libp3net', 'SRCDIR:panda/src/net']) - TargetAdd('libp3net_igate.obj', input='libp3net.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/pstatclient/ @@ -3818,12 +3796,11 @@ if (not RUNTIME): TargetAdd('p3pstatclient_composite1.obj', opts=OPTS, input='p3pstatclient_composite1.cxx') TargetAdd('p3pstatclient_composite2.obj', opts=OPTS, input='p3pstatclient_composite2.cxx') - OPTS=['DIR:panda/src/pstatclient', 'PYTHON'] + OPTS=['DIR:panda/src/pstatclient'] IGATEFILES=GetDirectoryContents('panda/src/pstatclient', ["*.h", "*_composite*.cxx"]) IGATEFILES.remove("config_pstats.h") TargetAdd('libp3pstatclient.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3pstatclient.in', opts=['IMOD:panda3d.core', 'ILIB:libp3pstatclient', 'SRCDIR:panda/src/pstatclient']) - TargetAdd('libp3pstatclient_igate.obj', input='libp3pstatclient.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/gobj/ @@ -3834,13 +3811,12 @@ if (not RUNTIME): TargetAdd('p3gobj_composite1.obj', opts=OPTS, input='p3gobj_composite1.cxx') TargetAdd('p3gobj_composite2.obj', opts=OPTS+['BIGOBJ'], input='p3gobj_composite2.cxx') - OPTS=['DIR:panda/src/gobj', 'NVIDIACG', 'ZLIB', 'SQUISH', 'PYTHON'] + OPTS=['DIR:panda/src/gobj', 'NVIDIACG', 'ZLIB', 'SQUISH'] IGATEFILES=GetDirectoryContents('panda/src/gobj', ["*.h", "*_composite*.cxx"]) if ("cgfx_states.h" in IGATEFILES): IGATEFILES.remove("cgfx_states.h") TargetAdd('libp3gobj.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3gobj.in', opts=['IMOD:panda3d.core', 'ILIB:libp3gobj', 'SRCDIR:panda/src/gobj']) - TargetAdd('libp3gobj_igate.obj', input='libp3gobj.in', opts=["DEPENDENCYONLY"]) - TargetAdd('p3gobj_ext_composite.obj', opts=OPTS, input='p3gobj_ext_composite.cxx') + PyTargetAdd('p3gobj_ext_composite.obj', opts=OPTS, input='p3gobj_ext_composite.cxx') # # DIRECTORY: panda/src/pgraphnodes/ @@ -3851,11 +3827,10 @@ if (not RUNTIME): TargetAdd('p3pgraphnodes_composite1.obj', opts=OPTS, input='p3pgraphnodes_composite1.cxx') TargetAdd('p3pgraphnodes_composite2.obj', opts=OPTS, input='p3pgraphnodes_composite2.cxx') - OPTS=['DIR:panda/src/pgraphnodes', 'PYTHON'] + OPTS=['DIR:panda/src/pgraphnodes'] IGATEFILES=GetDirectoryContents('panda/src/pgraphnodes', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3pgraphnodes.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3pgraphnodes.in', opts=['IMOD:panda3d.core', 'ILIB:libp3pgraphnodes', 'SRCDIR:panda/src/pgraphnodes']) - TargetAdd('libp3pgraphnodes_igate.obj', input='libp3pgraphnodes.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/pgraph/ @@ -3869,12 +3844,11 @@ if (not RUNTIME): TargetAdd('p3pgraph_composite3.obj', opts=OPTS, input='p3pgraph_composite3.cxx') TargetAdd('p3pgraph_composite4.obj', opts=OPTS, input='p3pgraph_composite4.cxx') - OPTS=['DIR:panda/src/pgraph', 'PYTHON'] + OPTS=['DIR:panda/src/pgraph'] IGATEFILES=GetDirectoryContents('panda/src/pgraph', ["*.h", "nodePath.cxx", "*_composite*.cxx"]) TargetAdd('libp3pgraph.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3pgraph.in', opts=['IMOD:panda3d.core', 'ILIB:libp3pgraph', 'SRCDIR:panda/src/pgraph']) - TargetAdd('libp3pgraph_igate.obj', input='libp3pgraph.in', opts=["DEPENDENCYONLY","BIGOBJ"]) - TargetAdd('p3pgraph_ext_composite.obj', opts=OPTS, input='p3pgraph_ext_composite.cxx') + PyTargetAdd('p3pgraph_ext_composite.obj', opts=OPTS, input='p3pgraph_ext_composite.cxx') # # DIRECTORY: panda/src/cull/ @@ -3885,11 +3859,10 @@ if (not RUNTIME): TargetAdd('p3cull_composite1.obj', opts=OPTS, input='p3cull_composite1.cxx') TargetAdd('p3cull_composite2.obj', opts=OPTS, input='p3cull_composite2.cxx') - OPTS=['DIR:panda/src/cull', 'PYTHON'] + OPTS=['DIR:panda/src/cull'] IGATEFILES=GetDirectoryContents('panda/src/cull', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3cull.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3cull.in', opts=['IMOD:panda3d.core', 'ILIB:libp3cull', 'SRCDIR:panda/src/cull']) - TargetAdd('libp3cull_igate.obj', input='libp3cull.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/display/ @@ -3901,15 +3874,14 @@ if (not RUNTIME): TargetAdd('p3display_composite1.obj', opts=OPTS, input='p3display_composite1.cxx') TargetAdd('p3display_composite2.obj', opts=OPTS, input='p3display_composite2.cxx') - OPTS=['DIR:panda/src/display', 'PYTHON'] + OPTS=['DIR:panda/src/display'] IGATEFILES=GetDirectoryContents('panda/src/display', ["*.h", "*_composite*.cxx"]) IGATEFILES.remove("renderBuffer.h") TargetAdd('libp3display.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3display.in', opts=['IMOD:panda3d.core', 'ILIB:libp3display', 'SRCDIR:panda/src/display']) - TargetAdd('libp3display_igate.obj', input='libp3display.in', opts=["DEPENDENCYONLY"]) - TargetAdd('p3display_graphicsStateGuardian_ext.obj', opts=OPTS, input='graphicsStateGuardian_ext.cxx') - TargetAdd('p3display_graphicsWindow_ext.obj', opts=OPTS, input='graphicsWindow_ext.cxx') - TargetAdd('p3display_pythonGraphicsWindowProc.obj', opts=OPTS, input='pythonGraphicsWindowProc.cxx') + PyTargetAdd('p3display_graphicsStateGuardian_ext.obj', opts=OPTS, input='graphicsStateGuardian_ext.cxx') + PyTargetAdd('p3display_graphicsWindow_ext.obj', opts=OPTS, input='graphicsWindow_ext.cxx') + PyTargetAdd('p3display_pythonGraphicsWindowProc.obj', opts=OPTS, input='pythonGraphicsWindowProc.cxx') if RTDIST and GetTarget() == 'darwin': OPTS=['DIR:panda/src/display'] @@ -3925,13 +3897,12 @@ if (not RUNTIME): TargetAdd('p3chan_composite1.obj', opts=OPTS, input='p3chan_composite1.cxx') TargetAdd('p3chan_composite2.obj', opts=OPTS, input='p3chan_composite2.cxx') - OPTS=['DIR:panda/src/chan', 'PYTHON'] + OPTS=['DIR:panda/src/chan'] IGATEFILES=GetDirectoryContents('panda/src/chan', ["*.h", "*_composite*.cxx"]) IGATEFILES.remove('movingPart.h') IGATEFILES.remove('animChannelFixed.h') TargetAdd('libp3chan.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3chan.in', opts=['IMOD:panda3d.core', 'ILIB:libp3chan', 'SRCDIR:panda/src/chan']) - TargetAdd('libp3chan_igate.obj', input='libp3chan.in', opts=["DEPENDENCYONLY"]) # DIRECTORY: panda/src/char/ @@ -3942,11 +3913,10 @@ if (not RUNTIME): TargetAdd('p3char_composite1.obj', opts=OPTS, input='p3char_composite1.cxx') TargetAdd('p3char_composite2.obj', opts=OPTS, input='p3char_composite2.cxx') - OPTS=['DIR:panda/src/char', 'PYTHON'] + OPTS=['DIR:panda/src/char'] IGATEFILES=GetDirectoryContents('panda/src/char', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3char.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3char.in', opts=['IMOD:panda3d.core', 'ILIB:libp3char', 'SRCDIR:panda/src/char']) - TargetAdd('libp3char_igate.obj', input='libp3char.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/dgraph/ @@ -3957,11 +3927,10 @@ if (not RUNTIME): TargetAdd('p3dgraph_composite1.obj', opts=OPTS, input='p3dgraph_composite1.cxx') TargetAdd('p3dgraph_composite2.obj', opts=OPTS, input='p3dgraph_composite2.cxx') - OPTS=['DIR:panda/src/dgraph', 'PYTHON'] + OPTS=['DIR:panda/src/dgraph'] IGATEFILES=GetDirectoryContents('panda/src/dgraph', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3dgraph.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3dgraph.in', opts=['IMOD:panda3d.core', 'ILIB:libp3dgraph', 'SRCDIR:panda/src/dgraph']) - TargetAdd('libp3dgraph_igate.obj', input='libp3dgraph.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/device/ @@ -3972,11 +3941,10 @@ if (not RUNTIME): TargetAdd('p3device_composite1.obj', opts=OPTS, input='p3device_composite1.cxx') TargetAdd('p3device_composite2.obj', opts=OPTS, input='p3device_composite2.cxx') - OPTS=['DIR:panda/src/device', 'PYTHON'] + OPTS=['DIR:panda/src/device'] IGATEFILES=GetDirectoryContents('panda/src/device', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3device.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3device.in', opts=['IMOD:panda3d.core', 'ILIB:libp3device', 'SRCDIR:panda/src/device']) - TargetAdd('libp3device_igate.obj', input='libp3device.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/pnmtext/ @@ -3986,11 +3954,10 @@ if (PkgSkip("FREETYPE")==0 and not RUNTIME): OPTS=['DIR:panda/src/pnmtext', 'BUILDING:PANDA', 'FREETYPE'] TargetAdd('p3pnmtext_composite1.obj', opts=OPTS, input='p3pnmtext_composite1.cxx') - OPTS=['DIR:panda/src/pnmtext', 'FREETYPE', 'PYTHON'] + OPTS=['DIR:panda/src/pnmtext', 'FREETYPE'] IGATEFILES=GetDirectoryContents('panda/src/pnmtext', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3pnmtext.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3pnmtext.in', opts=['IMOD:panda3d.core', 'ILIB:libp3pnmtext', 'SRCDIR:panda/src/pnmtext']) - TargetAdd('libp3pnmtext_igate.obj', input='libp3pnmtext.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/text/ @@ -4004,11 +3971,10 @@ if (not RUNTIME): TargetAdd('p3text_composite1.obj', opts=OPTS, input='p3text_composite1.cxx') TargetAdd('p3text_composite2.obj', opts=OPTS, input='p3text_composite2.cxx') - OPTS=['DIR:panda/src/text', 'ZLIB', 'FREETYPE', 'PYTHON'] + OPTS=['DIR:panda/src/text', 'ZLIB', 'FREETYPE'] IGATEFILES=GetDirectoryContents('panda/src/text', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3text.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3text.in', opts=['IMOD:panda3d.core', 'ILIB:libp3text', 'SRCDIR:panda/src/text']) - TargetAdd('libp3text_igate.obj', input='libp3text.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/movies/ @@ -4018,11 +3984,10 @@ if (not RUNTIME): OPTS=['DIR:panda/src/movies', 'BUILDING:PANDA', 'VORBIS', 'OPUS'] TargetAdd('p3movies_composite1.obj', opts=OPTS, input='p3movies_composite1.cxx') - OPTS=['DIR:panda/src/movies', 'VORBIS', 'OPUS', 'PYTHON'] + OPTS=['DIR:panda/src/movies', 'VORBIS', 'OPUS'] IGATEFILES=GetDirectoryContents('panda/src/movies', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3movies.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3movies.in', opts=['IMOD:panda3d.core', 'ILIB:libp3movies', 'SRCDIR:panda/src/movies']) - TargetAdd('libp3movies_igate.obj', input='libp3movies.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/grutil/ @@ -4034,12 +3999,11 @@ if (not RUNTIME): TargetAdd('p3grutil_composite1.obj', opts=OPTS, input='p3grutil_composite1.cxx') TargetAdd('p3grutil_composite2.obj', opts=OPTS, input='p3grutil_composite2.cxx') - OPTS=['DIR:panda/src/grutil', 'PYTHON'] + OPTS=['DIR:panda/src/grutil'] IGATEFILES=GetDirectoryContents('panda/src/grutil', ["*.h", "*_composite*.cxx"]) if 'convexHull.h' in IGATEFILES: IGATEFILES.remove('convexHull.h') TargetAdd('libp3grutil.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3grutil.in', opts=['IMOD:panda3d.core', 'ILIB:libp3grutil', 'SRCDIR:panda/src/grutil']) - TargetAdd('libp3grutil_igate.obj', input='libp3grutil.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/tform/ @@ -4050,11 +4014,10 @@ if (not RUNTIME): TargetAdd('p3tform_composite1.obj', opts=OPTS, input='p3tform_composite1.cxx') TargetAdd('p3tform_composite2.obj', opts=OPTS, input='p3tform_composite2.cxx') - OPTS=['DIR:panda/src/tform', 'PYTHON'] + OPTS=['DIR:panda/src/tform'] IGATEFILES=GetDirectoryContents('panda/src/tform', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3tform.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3tform.in', opts=['IMOD:panda3d.core', 'ILIB:libp3tform', 'SRCDIR:panda/src/tform']) - TargetAdd('libp3tform_igate.obj', input='libp3tform.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/collide/ @@ -4065,11 +4028,10 @@ if (not RUNTIME): TargetAdd('p3collide_composite1.obj', opts=OPTS, input='p3collide_composite1.cxx') TargetAdd('p3collide_composite2.obj', opts=OPTS, input='p3collide_composite2.cxx') - OPTS=['DIR:panda/src/collide', 'PYTHON'] + OPTS=['DIR:panda/src/collide'] IGATEFILES=GetDirectoryContents('panda/src/collide', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3collide.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3collide.in', opts=['IMOD:panda3d.core', 'ILIB:libp3collide', 'SRCDIR:panda/src/collide']) - TargetAdd('libp3collide_igate.obj', input='libp3collide.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/parametrics/ @@ -4080,11 +4042,10 @@ if (not RUNTIME): TargetAdd('p3parametrics_composite1.obj', opts=OPTS, input='p3parametrics_composite1.cxx') TargetAdd('p3parametrics_composite2.obj', opts=OPTS, input='p3parametrics_composite2.cxx') - OPTS=['DIR:panda/src/parametrics', 'PYTHON'] + OPTS=['DIR:panda/src/parametrics'] IGATEFILES=GetDirectoryContents('panda/src/parametrics', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3parametrics.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3parametrics.in', opts=['IMOD:panda3d.core', 'ILIB:libp3parametrics', 'SRCDIR:panda/src/parametrics']) - TargetAdd('libp3parametrics_igate.obj', input='libp3parametrics.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/pgui/ @@ -4095,11 +4056,10 @@ if (not RUNTIME): TargetAdd('p3pgui_composite1.obj', opts=OPTS, input='p3pgui_composite1.cxx') TargetAdd('p3pgui_composite2.obj', opts=OPTS, input='p3pgui_composite2.cxx') - OPTS=['DIR:panda/src/pgui', 'PYTHON'] + OPTS=['DIR:panda/src/pgui'] IGATEFILES=GetDirectoryContents('panda/src/pgui', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3pgui.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3pgui.in', opts=['IMOD:panda3d.core', 'ILIB:libp3pgui', 'SRCDIR:panda/src/pgui']) - TargetAdd('libp3pgui_igate.obj', input='libp3pgui.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/pnmimagetypes/ @@ -4119,11 +4079,10 @@ if (not RUNTIME): TargetAdd('p3recorder_composite1.obj', opts=OPTS, input='p3recorder_composite1.cxx') TargetAdd('p3recorder_composite2.obj', opts=OPTS, input='p3recorder_composite2.cxx') - OPTS=['DIR:panda/src/recorder', 'PYTHON'] + OPTS=['DIR:panda/src/recorder'] IGATEFILES=GetDirectoryContents('panda/src/recorder', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3recorder.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3recorder.in', opts=['IMOD:panda3d.core', 'ILIB:libp3recorder', 'SRCDIR:panda/src/recorder']) - TargetAdd('libp3recorder_igate.obj', input='libp3recorder.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/dxml/ @@ -4139,11 +4098,10 @@ if (not RUNTIME): OPTS=['DIR:panda/src/dxml', 'BUILDING:PANDA', 'TINYXML'] TargetAdd('p3dxml_composite1.obj', opts=OPTS, input='p3dxml_composite1.cxx') - OPTS=['DIR:panda/src/dxml', 'TINYXML', 'PYTHON'] + OPTS=['DIR:panda/src/dxml', 'TINYXML'] IGATEFILES=GetDirectoryContents('panda/src/dxml', ["*.h", "p3dxml_composite1.cxx"]) TargetAdd('libp3dxml.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3dxml.in', opts=['IMOD:panda3d.core', 'ILIB:libp3dxml', 'SRCDIR:panda/src/dxml']) - TargetAdd('libp3dxml_igate.obj', input='libp3dxml.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/metalibs/panda/ @@ -4230,110 +4188,109 @@ if (not RUNTIME): TargetAdd('libpanda.dll', dep='dtool_have_freetype.dat') TargetAdd('libpanda.dll', opts=OPTS) - TargetAdd('core_module.obj', input='libp3dtoolbase.in') - TargetAdd('core_module.obj', input='libp3dtoolutil.in') - TargetAdd('core_module.obj', input='libp3prc.in') + PyTargetAdd('core_module.obj', input='libp3dtoolbase.in') + PyTargetAdd('core_module.obj', input='libp3dtoolutil.in') + PyTargetAdd('core_module.obj', input='libp3prc.in') - TargetAdd('core_module.obj', input='libp3downloader.in') - TargetAdd('core_module.obj', input='libp3express.in') + PyTargetAdd('core_module.obj', input='libp3downloader.in') + PyTargetAdd('core_module.obj', input='libp3express.in') - TargetAdd('core_module.obj', input='libp3recorder.in') - TargetAdd('core_module.obj', input='libp3pgraphnodes.in') - TargetAdd('core_module.obj', input='libp3pgraph.in') - TargetAdd('core_module.obj', input='libp3cull.in') - TargetAdd('core_module.obj', input='libp3grutil.in') - TargetAdd('core_module.obj', input='libp3chan.in') - TargetAdd('core_module.obj', input='libp3pstatclient.in') - TargetAdd('core_module.obj', input='libp3char.in') - TargetAdd('core_module.obj', input='libp3collide.in') - TargetAdd('core_module.obj', input='libp3device.in') - TargetAdd('core_module.obj', input='libp3dgraph.in') - TargetAdd('core_module.obj', input='libp3display.in') - TargetAdd('core_module.obj', input='libp3pipeline.in') - TargetAdd('core_module.obj', input='libp3event.in') - TargetAdd('core_module.obj', input='libp3gobj.in') - TargetAdd('core_module.obj', input='libp3gsgbase.in') - TargetAdd('core_module.obj', input='libp3linmath.in') - TargetAdd('core_module.obj', input='libp3mathutil.in') - TargetAdd('core_module.obj', input='libp3parametrics.in') - TargetAdd('core_module.obj', input='libp3pnmimage.in') - TargetAdd('core_module.obj', input='libp3text.in') - TargetAdd('core_module.obj', input='libp3tform.in') - TargetAdd('core_module.obj', input='libp3putil.in') - TargetAdd('core_module.obj', input='libp3audio.in') - TargetAdd('core_module.obj', input='libp3nativenet.in') - TargetAdd('core_module.obj', input='libp3net.in') - TargetAdd('core_module.obj', input='libp3pgui.in') - TargetAdd('core_module.obj', input='libp3movies.in') - TargetAdd('core_module.obj', input='libp3dxml.in') + PyTargetAdd('core_module.obj', input='libp3recorder.in') + PyTargetAdd('core_module.obj', input='libp3pgraphnodes.in') + PyTargetAdd('core_module.obj', input='libp3pgraph.in') + PyTargetAdd('core_module.obj', input='libp3cull.in') + PyTargetAdd('core_module.obj', input='libp3grutil.in') + PyTargetAdd('core_module.obj', input='libp3chan.in') + PyTargetAdd('core_module.obj', input='libp3pstatclient.in') + PyTargetAdd('core_module.obj', input='libp3char.in') + PyTargetAdd('core_module.obj', input='libp3collide.in') + PyTargetAdd('core_module.obj', input='libp3device.in') + PyTargetAdd('core_module.obj', input='libp3dgraph.in') + PyTargetAdd('core_module.obj', input='libp3display.in') + PyTargetAdd('core_module.obj', input='libp3pipeline.in') + PyTargetAdd('core_module.obj', input='libp3event.in') + PyTargetAdd('core_module.obj', input='libp3gobj.in') + PyTargetAdd('core_module.obj', input='libp3gsgbase.in') + PyTargetAdd('core_module.obj', input='libp3linmath.in') + PyTargetAdd('core_module.obj', input='libp3mathutil.in') + PyTargetAdd('core_module.obj', input='libp3parametrics.in') + PyTargetAdd('core_module.obj', input='libp3pnmimage.in') + PyTargetAdd('core_module.obj', input='libp3text.in') + PyTargetAdd('core_module.obj', input='libp3tform.in') + PyTargetAdd('core_module.obj', input='libp3putil.in') + PyTargetAdd('core_module.obj', input='libp3audio.in') + PyTargetAdd('core_module.obj', input='libp3nativenet.in') + PyTargetAdd('core_module.obj', input='libp3net.in') + PyTargetAdd('core_module.obj', input='libp3pgui.in') + PyTargetAdd('core_module.obj', input='libp3movies.in') + PyTargetAdd('core_module.obj', input='libp3dxml.in') if PkgSkip("FREETYPE")==0: - TargetAdd('core_module.obj', input='libp3pnmtext.in') + PyTargetAdd('core_module.obj', input='libp3pnmtext.in') - TargetAdd('core_module.obj', opts=['PYTHON']) - TargetAdd('core_module.obj', opts=['IMOD:panda3d.core', 'ILIB:core']) + PyTargetAdd('core_module.obj', opts=['IMOD:panda3d.core', 'ILIB:core']) - TargetAdd('core.pyd', input='libp3dtoolbase_igate.obj') - TargetAdd('core.pyd', input='p3dtoolbase_typeHandle_ext.obj') - TargetAdd('core.pyd', input='libp3dtoolutil_igate.obj') - TargetAdd('core.pyd', input='p3dtoolutil_ext_composite.obj') - TargetAdd('core.pyd', input='libp3prc_igate.obj') - TargetAdd('core.pyd', input='p3prc_ext_composite.obj') + PyTargetAdd('core.pyd', input='libp3dtoolbase_igate.obj') + PyTargetAdd('core.pyd', input='p3dtoolbase_typeHandle_ext.obj') + PyTargetAdd('core.pyd', input='libp3dtoolutil_igate.obj') + PyTargetAdd('core.pyd', input='p3dtoolutil_ext_composite.obj') + PyTargetAdd('core.pyd', input='libp3prc_igate.obj') + PyTargetAdd('core.pyd', input='p3prc_ext_composite.obj') - TargetAdd('core.pyd', input='libp3downloader_igate.obj') - TargetAdd('core.pyd', input='p3downloader_stringStream_ext.obj') - TargetAdd('core.pyd', input='p3express_ext_composite.obj') - TargetAdd('core.pyd', input='libp3express_igate.obj') + PyTargetAdd('core.pyd', input='libp3downloader_igate.obj') + PyTargetAdd('core.pyd', input='p3downloader_stringStream_ext.obj') + PyTargetAdd('core.pyd', input='p3express_ext_composite.obj') + PyTargetAdd('core.pyd', input='libp3express_igate.obj') - TargetAdd('core.pyd', input='libp3recorder_igate.obj') - TargetAdd('core.pyd', input='libp3pgraphnodes_igate.obj') - TargetAdd('core.pyd', input='libp3pgraph_igate.obj') - TargetAdd('core.pyd', input='libp3movies_igate.obj') - TargetAdd('core.pyd', input='libp3grutil_igate.obj') - TargetAdd('core.pyd', input='libp3chan_igate.obj') - TargetAdd('core.pyd', input='libp3pstatclient_igate.obj') - TargetAdd('core.pyd', input='libp3char_igate.obj') - TargetAdd('core.pyd', input='libp3collide_igate.obj') - TargetAdd('core.pyd', input='libp3device_igate.obj') - TargetAdd('core.pyd', input='libp3dgraph_igate.obj') - TargetAdd('core.pyd', input='libp3display_igate.obj') - TargetAdd('core.pyd', input='libp3pipeline_igate.obj') - TargetAdd('core.pyd', input='libp3event_igate.obj') - TargetAdd('core.pyd', input='libp3gobj_igate.obj') - TargetAdd('core.pyd', input='libp3gsgbase_igate.obj') - TargetAdd('core.pyd', input='libp3linmath_igate.obj') - TargetAdd('core.pyd', input='libp3mathutil_igate.obj') - TargetAdd('core.pyd', input='libp3parametrics_igate.obj') - TargetAdd('core.pyd', input='libp3pnmimage_igate.obj') - TargetAdd('core.pyd', input='libp3text_igate.obj') - TargetAdd('core.pyd', input='libp3tform_igate.obj') - TargetAdd('core.pyd', input='libp3putil_igate.obj') - TargetAdd('core.pyd', input='libp3audio_igate.obj') - TargetAdd('core.pyd', input='libp3pgui_igate.obj') - TargetAdd('core.pyd', input='libp3net_igate.obj') - TargetAdd('core.pyd', input='libp3nativenet_igate.obj') - TargetAdd('core.pyd', input='libp3dxml_igate.obj') + PyTargetAdd('core.pyd', input='libp3recorder_igate.obj') + PyTargetAdd('core.pyd', input='libp3pgraphnodes_igate.obj') + PyTargetAdd('core.pyd', input='libp3pgraph_igate.obj') + PyTargetAdd('core.pyd', input='libp3movies_igate.obj') + PyTargetAdd('core.pyd', input='libp3grutil_igate.obj') + PyTargetAdd('core.pyd', input='libp3chan_igate.obj') + PyTargetAdd('core.pyd', input='libp3pstatclient_igate.obj') + PyTargetAdd('core.pyd', input='libp3char_igate.obj') + PyTargetAdd('core.pyd', input='libp3collide_igate.obj') + PyTargetAdd('core.pyd', input='libp3device_igate.obj') + PyTargetAdd('core.pyd', input='libp3dgraph_igate.obj') + PyTargetAdd('core.pyd', input='libp3display_igate.obj') + PyTargetAdd('core.pyd', input='libp3pipeline_igate.obj') + PyTargetAdd('core.pyd', input='libp3event_igate.obj') + PyTargetAdd('core.pyd', input='libp3gobj_igate.obj') + PyTargetAdd('core.pyd', input='libp3gsgbase_igate.obj') + PyTargetAdd('core.pyd', input='libp3linmath_igate.obj') + PyTargetAdd('core.pyd', input='libp3mathutil_igate.obj') + PyTargetAdd('core.pyd', input='libp3parametrics_igate.obj') + PyTargetAdd('core.pyd', input='libp3pnmimage_igate.obj') + PyTargetAdd('core.pyd', input='libp3text_igate.obj') + PyTargetAdd('core.pyd', input='libp3tform_igate.obj') + PyTargetAdd('core.pyd', input='libp3putil_igate.obj') + PyTargetAdd('core.pyd', input='libp3audio_igate.obj') + PyTargetAdd('core.pyd', input='libp3pgui_igate.obj') + PyTargetAdd('core.pyd', input='libp3net_igate.obj') + PyTargetAdd('core.pyd', input='libp3nativenet_igate.obj') + PyTargetAdd('core.pyd', input='libp3dxml_igate.obj') if PkgSkip("FREETYPE")==0: - TargetAdd('core.pyd', input="libp3pnmtext_igate.obj") + PyTargetAdd('core.pyd', input="libp3pnmtext_igate.obj") - TargetAdd('core.pyd', input='p3pipeline_pythonThread.obj') - TargetAdd('core.pyd', input='p3putil_ext_composite.obj') - TargetAdd('core.pyd', input='p3pnmimage_pfmFile_ext.obj') - TargetAdd('core.pyd', input='p3event_asyncFuture_ext.obj') - TargetAdd('core.pyd', input='p3event_pythonTask.obj') - TargetAdd('core.pyd', input='p3gobj_ext_composite.obj') - TargetAdd('core.pyd', input='p3pgraph_ext_composite.obj') - TargetAdd('core.pyd', input='p3display_graphicsStateGuardian_ext.obj') - TargetAdd('core.pyd', input='p3display_graphicsWindow_ext.obj') - TargetAdd('core.pyd', input='p3display_pythonGraphicsWindowProc.obj') + PyTargetAdd('core.pyd', input='p3pipeline_pythonThread.obj') + PyTargetAdd('core.pyd', input='p3putil_ext_composite.obj') + PyTargetAdd('core.pyd', input='p3pnmimage_pfmFile_ext.obj') + PyTargetAdd('core.pyd', input='p3event_asyncFuture_ext.obj') + PyTargetAdd('core.pyd', input='p3event_pythonTask.obj') + PyTargetAdd('core.pyd', input='p3gobj_ext_composite.obj') + PyTargetAdd('core.pyd', input='p3pgraph_ext_composite.obj') + PyTargetAdd('core.pyd', input='p3display_graphicsStateGuardian_ext.obj') + PyTargetAdd('core.pyd', input='p3display_graphicsWindow_ext.obj') + PyTargetAdd('core.pyd', input='p3display_pythonGraphicsWindowProc.obj') - TargetAdd('core.pyd', input='core_module.obj') + PyTargetAdd('core.pyd', input='core_module.obj') if not GetLinkAllStatic() and GetTarget() != 'emscripten': - TargetAdd('core.pyd', input='libp3tinyxml.ilb') - TargetAdd('core.pyd', input='libp3interrogatedb.dll') - TargetAdd('core.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('core.pyd', opts=['PYTHON', 'WINSOCK2']) + PyTargetAdd('core.pyd', input='libp3tinyxml.ilb') + PyTargetAdd('core.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('core.pyd', input=COMMON_PANDA_LIBS) + PyTargetAdd('core.pyd', opts=['WINSOCK2']) # # DIRECTORY: panda/src/vision/ @@ -4359,22 +4316,21 @@ if (PkgSkip("VISION") == 0) and (not RUNTIME): TargetAdd('libp3vision.dll', input=COMMON_PANDA_LIBS) TargetAdd('libp3vision.dll', opts=OPTS) - OPTS=['DIR:panda/src/vision', 'ARTOOLKIT', 'OPENCV', 'DX9', 'DIRECTCAM', 'JPEG', 'EXCEPTIONS', 'PYTHON'] + OPTS=['DIR:panda/src/vision', 'ARTOOLKIT', 'OPENCV', 'DX9', 'DIRECTCAM', 'JPEG', 'EXCEPTIONS'] IGATEFILES=GetDirectoryContents('panda/src/vision', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3vision.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3vision.in', opts=['IMOD:panda3d.vision', 'ILIB:libp3vision', 'SRCDIR:panda/src/vision']) - TargetAdd('libp3vision_igate.obj', input='libp3vision.in', opts=["DEPENDENCYONLY"]) - TargetAdd('vision_module.obj', input='libp3vision.in') - TargetAdd('vision_module.obj', opts=OPTS) - TargetAdd('vision_module.obj', opts=['IMOD:panda3d.vision', 'ILIB:vision', 'IMPORT:panda3d.core']) - TargetAdd('vision.pyd', input='vision_module.obj') - TargetAdd('vision.pyd', input='libp3vision_igate.obj') - TargetAdd('vision.pyd', input='libp3vision.dll') - TargetAdd('vision.pyd', input='libp3interrogatedb.dll') - TargetAdd('vision.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('vision.pyd', opts=['PYTHON']) + PyTargetAdd('vision_module.obj', input='libp3vision.in') + PyTargetAdd('vision_module.obj', opts=OPTS) + PyTargetAdd('vision_module.obj', opts=['IMOD:panda3d.vision', 'ILIB:vision', 'IMPORT:panda3d.core']) + + PyTargetAdd('vision.pyd', input='vision_module.obj') + PyTargetAdd('vision.pyd', input='libp3vision_igate.obj') + PyTargetAdd('vision.pyd', input='libp3vision.dll') + PyTargetAdd('vision.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('vision.pyd', input=COMMON_PANDA_LIBS) # # DIRECTORY: panda/src/rocket/ @@ -4388,25 +4344,25 @@ if (PkgSkip("ROCKET") == 0) and (not RUNTIME): TargetAdd('libp3rocket.dll', input=COMMON_PANDA_LIBS) TargetAdd('libp3rocket.dll', opts=OPTS) - OPTS=['DIR:panda/src/rocket', 'ROCKET', 'RTTI', 'EXCEPTIONS', 'PYTHON'] + OPTS=['DIR:panda/src/rocket', 'ROCKET', 'RTTI', 'EXCEPTIONS'] IGATEFILES=GetDirectoryContents('panda/src/rocket', ["rocketInputHandler.h", "rocketInputHandler.cxx", "rocketRegion.h", "rocketRegion.cxx", "rocketRegion_ext.h"]) TargetAdd('libp3rocket.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3rocket.in', opts=['IMOD:panda3d.rocket', 'ILIB:libp3rocket', 'SRCDIR:panda/src/rocket']) - TargetAdd('libp3rocket_igate.obj', input='libp3rocket.in', opts=["DEPENDENCYONLY"]) - TargetAdd('p3rocket_rocketRegion_ext.obj', opts=OPTS, input='rocketRegion_ext.cxx') - TargetAdd('rocket_module.obj', input='libp3rocket.in') - TargetAdd('rocket_module.obj', opts=OPTS) - TargetAdd('rocket_module.obj', opts=['IMOD:panda3d.rocket', 'ILIB:rocket', 'IMPORT:panda3d.core']) + PyTargetAdd('p3rocket_rocketRegion_ext.obj', opts=OPTS, input='rocketRegion_ext.cxx') - TargetAdd('rocket.pyd', input='rocket_module.obj') - TargetAdd('rocket.pyd', input='libp3rocket_igate.obj') - TargetAdd('rocket.pyd', input='p3rocket_rocketRegion_ext.obj') - TargetAdd('rocket.pyd', input='libp3rocket.dll') - TargetAdd('rocket.pyd', input='libp3interrogatedb.dll') - TargetAdd('rocket.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('rocket.pyd', opts=['PYTHON', 'ROCKET']) + PyTargetAdd('rocket_module.obj', input='libp3rocket.in') + PyTargetAdd('rocket_module.obj', opts=OPTS) + PyTargetAdd('rocket_module.obj', opts=['IMOD:panda3d.rocket', 'ILIB:rocket', 'IMPORT:panda3d.core']) + + PyTargetAdd('rocket.pyd', input='rocket_module.obj') + PyTargetAdd('rocket.pyd', input='libp3rocket_igate.obj') + PyTargetAdd('rocket.pyd', input='p3rocket_rocketRegion_ext.obj') + PyTargetAdd('rocket.pyd', input='libp3rocket.dll') + PyTargetAdd('rocket.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('rocket.pyd', input=COMMON_PANDA_LIBS) + PyTargetAdd('rocket.pyd', opts=['ROCKET']) # # DIRECTORY: panda/src/p3awesomium @@ -4418,22 +4374,21 @@ if PkgSkip("AWESOMIUM") == 0 and not RUNTIME: TargetAdd('libp3awesomium.dll', input=COMMON_PANDA_LIBS) TargetAdd('libp3awesomium.dll', opts=OPTS) - OPTS=['DIR:panda/src/awesomium', 'AWESOMIUM', 'PYTHON'] + OPTS=['DIR:panda/src/awesomium', 'AWESOMIUM'] IGATEFILES=GetDirectoryContents('panda/src/awesomium', ["*.h", "*_composite1.cxx"]) TargetAdd('libp3awesomium.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3awesomium.in', opts=['IMOD:panda3d.awesomium', 'ILIB:libp3awesomium', 'SRCDIR:panda/src/awesomium']) - TargetAdd('libp3awesomium_igate.obj', input='libp3awesomium.in', opts=["DEPENDENCYONLY"]) - TargetAdd('awesomium_module.obj', input='libp3awesomium.in') - TargetAdd('awesomium_module.obj', opts=OPTS) - TargetAdd('awesomium_module.obj', opts=['IMOD:panda3d.awesomium', 'ILIB:awesomium', 'IMPORT:panda3d.core']) - TargetAdd('awesomium.pyd', input='awesomium_module.obj') - TargetAdd('awesomium.pyd', input='libp3awesomium_igate.obj') - TargetAdd('awesomium.pyd', input='libp3awesomium.dll') - TargetAdd('awesomium.pyd', input='libp3interrogatedb.dll') - TargetAdd('awesomium.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('awesomium.pyd', opts=['PYTHON']) + PyTargetAdd('awesomium_module.obj', input='libp3awesomium.in') + PyTargetAdd('awesomium_module.obj', opts=OPTS) + PyTargetAdd('awesomium_module.obj', opts=['IMOD:panda3d.awesomium', 'ILIB:awesomium', 'IMPORT:panda3d.core']) + + PyTargetAdd('awesomium.pyd', input='awesomium_module.obj') + PyTargetAdd('awesomium.pyd', input='libp3awesomium_igate.obj') + PyTargetAdd('awesomium.pyd', input='libp3awesomium.dll') + PyTargetAdd('awesomium.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('awesomium.pyd', input=COMMON_PANDA_LIBS) # # DIRECTORY: panda/src/p3skel @@ -4443,11 +4398,10 @@ if (PkgSkip('SKEL')==0) and (not RUNTIME): OPTS=['DIR:panda/src/skel', 'BUILDING:PANDASKEL', 'ADVAPI'] TargetAdd('p3skel_composite1.obj', opts=OPTS, input='p3skel_composite1.cxx') - OPTS=['DIR:panda/src/skel', 'ADVAPI', 'PYTHON'] + OPTS=['DIR:panda/src/skel', 'ADVAPI'] IGATEFILES=GetDirectoryContents("panda/src/skel", ["*.h", "*_composite*.cxx"]) TargetAdd('libp3skel.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3skel.in', opts=['IMOD:panda3d.skel', 'ILIB:libp3skel', 'SRCDIR:panda/src/skel']) - TargetAdd('libp3skel_igate.obj', input='libp3skel.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/p3skel @@ -4459,17 +4413,14 @@ if (PkgSkip('SKEL')==0) and (not RUNTIME): TargetAdd('libpandaskel.dll', input=COMMON_PANDA_LIBS) TargetAdd('libpandaskel.dll', opts=OPTS) - OPTS=['PYTHON'] - TargetAdd('skel_module.obj', input='libp3skel.in') - TargetAdd('skel_module.obj', opts=OPTS) - TargetAdd('skel_module.obj', opts=['IMOD:panda3d.skel', 'ILIB:skel', 'IMPORT:panda3d.core']) + PyTargetAdd('skel_module.obj', input='libp3skel.in') + PyTargetAdd('skel_module.obj', opts=['IMOD:panda3d.skel', 'ILIB:skel', 'IMPORT:panda3d.core']) - TargetAdd('skel.pyd', input='skel_module.obj') - TargetAdd('skel.pyd', input='libp3skel_igate.obj') - TargetAdd('skel.pyd', input='libpandaskel.dll') - TargetAdd('skel.pyd', input='libp3interrogatedb.dll') - TargetAdd('skel.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('skel.pyd', opts=['PYTHON']) + PyTargetAdd('skel.pyd', input='skel_module.obj') + PyTargetAdd('skel.pyd', input='libp3skel_igate.obj') + PyTargetAdd('skel.pyd', input='libpandaskel.dll') + PyTargetAdd('skel.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('skel.pyd', input=COMMON_PANDA_LIBS) # # DIRECTORY: panda/src/distort/ @@ -4479,11 +4430,10 @@ if (PkgSkip('PANDAFX')==0) and (not RUNTIME): OPTS=['DIR:panda/src/distort', 'BUILDING:PANDAFX'] TargetAdd('p3distort_composite1.obj', opts=OPTS, input='p3distort_composite1.cxx') - OPTS=['DIR:panda/metalibs/pandafx', 'DIR:panda/src/distort', 'NVIDIACG', 'PYTHON'] + OPTS=['DIR:panda/metalibs/pandafx', 'DIR:panda/src/distort', 'NVIDIACG'] IGATEFILES=GetDirectoryContents('panda/src/distort', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3distort.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3distort.in', opts=['IMOD:panda3d.fx', 'ILIB:libp3distort', 'SRCDIR:panda/src/distort']) - TargetAdd('libp3distort_igate.obj', input='libp3distort.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/metalibs/pandafx/ @@ -4498,17 +4448,16 @@ if (PkgSkip('PANDAFX')==0) and (not RUNTIME): TargetAdd('libpandafx.dll', input=COMMON_PANDA_LIBS) TargetAdd('libpandafx.dll', opts=['ADVAPI', 'NVIDIACG']) - OPTS=['DIR:panda/metalibs/pandafx', 'DIR:panda/src/distort', 'NVIDIACG', 'PYTHON'] - TargetAdd('fx_module.obj', input='libp3distort.in') - TargetAdd('fx_module.obj', opts=OPTS) - TargetAdd('fx_module.obj', opts=['IMOD:panda3d.fx', 'ILIB:fx', 'IMPORT:panda3d.core']) + OPTS=['DIR:panda/metalibs/pandafx', 'DIR:panda/src/distort', 'NVIDIACG'] + PyTargetAdd('fx_module.obj', input='libp3distort.in') + PyTargetAdd('fx_module.obj', opts=OPTS) + PyTargetAdd('fx_module.obj', opts=['IMOD:panda3d.fx', 'ILIB:fx', 'IMPORT:panda3d.core']) - TargetAdd('fx.pyd', input='fx_module.obj') - TargetAdd('fx.pyd', input='libp3distort_igate.obj') - TargetAdd('fx.pyd', input='libpandafx.dll') - TargetAdd('fx.pyd', input='libp3interrogatedb.dll') - TargetAdd('fx.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('fx.pyd', opts=['PYTHON']) + PyTargetAdd('fx.pyd', input='fx_module.obj') + PyTargetAdd('fx.pyd', input='libp3distort_igate.obj') + PyTargetAdd('fx.pyd', input='libpandafx.dll') + PyTargetAdd('fx.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('fx.pyd', input=COMMON_PANDA_LIBS) # # DIRECTORY: panda/src/vrpn/ @@ -4521,22 +4470,21 @@ if (PkgSkip("VRPN")==0 and not RUNTIME): TargetAdd('libp3vrpn.dll', input=COMMON_PANDA_LIBS) TargetAdd('libp3vrpn.dll', opts=['VRPN']) - OPTS=['DIR:panda/src/vrpn', 'VRPN', 'PYTHON'] + OPTS=['DIR:panda/src/vrpn', 'VRPN'] IGATEFILES=GetDirectoryContents('panda/src/vrpn', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3vrpn.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3vrpn.in', opts=['IMOD:panda3d.vrpn', 'ILIB:libp3vrpn', 'SRCDIR:panda/src/vrpn']) - TargetAdd('libp3vrpn_igate.obj', input='libp3vrpn.in', opts=["DEPENDENCYONLY"]) - TargetAdd('vrpn_module.obj', input='libp3vrpn.in') - TargetAdd('vrpn_module.obj', opts=OPTS) - TargetAdd('vrpn_module.obj', opts=['IMOD:panda3d.vrpn', 'ILIB:vrpn', 'IMPORT:panda3d.core']) - TargetAdd('vrpn.pyd', input='vrpn_module.obj') - TargetAdd('vrpn.pyd', input='libp3vrpn_igate.obj') - TargetAdd('vrpn.pyd', input='libp3vrpn.dll') - TargetAdd('vrpn.pyd', input='libp3interrogatedb.dll') - TargetAdd('vrpn.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('vrpn.pyd', opts=['PYTHON']) + PyTargetAdd('vrpn_module.obj', input='libp3vrpn.in') + PyTargetAdd('vrpn_module.obj', opts=OPTS) + PyTargetAdd('vrpn_module.obj', opts=['IMOD:panda3d.vrpn', 'ILIB:vrpn', 'IMPORT:panda3d.core']) + + PyTargetAdd('vrpn.pyd', input='vrpn_module.obj') + PyTargetAdd('vrpn.pyd', input='libp3vrpn_igate.obj') + PyTargetAdd('vrpn.pyd', input='libp3vrpn.dll') + PyTargetAdd('vrpn.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('vrpn.pyd', input=COMMON_PANDA_LIBS) # # DIRECTORY: panda/src/ffmpeg @@ -4686,13 +4634,12 @@ if not RUNTIME and not PkgSkip("EGG"): TargetAdd('p3egg_composite1.obj', opts=OPTS, input='p3egg_composite1.cxx') TargetAdd('p3egg_composite2.obj', opts=OPTS, input='p3egg_composite2.cxx') - OPTS=['DIR:panda/src/egg', 'ZLIB', 'PYTHON'] + OPTS=['DIR:panda/src/egg', 'ZLIB'] IGATEFILES=GetDirectoryContents('panda/src/egg', ["*.h", "*_composite*.cxx"]) if "parser.h" in IGATEFILES: IGATEFILES.remove("parser.h") TargetAdd('libp3egg.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3egg.in', opts=['IMOD:panda3d.egg', 'ILIB:libp3egg', 'SRCDIR:panda/src/egg']) - TargetAdd('libp3egg_igate.obj', input='libp3egg.in', opts=["DEPENDENCYONLY"]) - TargetAdd('p3egg_eggGroupNode_ext.obj', opts=OPTS, input='eggGroupNode_ext.cxx') + PyTargetAdd('p3egg_eggGroupNode_ext.obj', opts=OPTS, input='eggGroupNode_ext.cxx') # # DIRECTORY: panda/src/egg2pg/ @@ -4703,11 +4650,10 @@ if not RUNTIME and not PkgSkip("EGG"): TargetAdd('p3egg2pg_composite1.obj', opts=OPTS, input='p3egg2pg_composite1.cxx') TargetAdd('p3egg2pg_composite2.obj', opts=OPTS, input='p3egg2pg_composite2.cxx') - OPTS=['DIR:panda/src/egg2pg', 'PYTHON'] + OPTS=['DIR:panda/src/egg2pg'] IGATEFILES=['load_egg_file.h'] TargetAdd('libp3egg2pg.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3egg2pg.in', opts=['IMOD:panda3d.egg', 'ILIB:libp3egg2pg', 'SRCDIR:panda/src/egg2pg']) - TargetAdd('libp3egg2pg_igate.obj', input='libp3egg2pg.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/framework/ @@ -4776,20 +4722,19 @@ if not RUNTIME and not PkgSkip("EGG"): TargetAdd('libpandaegg.dll', input=COMMON_PANDA_LIBS) TargetAdd('libpandaegg.dll', opts=['ADVAPI']) - OPTS=['DIR:panda/metalibs/pandaegg', 'DIR:panda/src/egg', 'PYTHON'] - TargetAdd('egg_module.obj', input='libp3egg2pg.in') - TargetAdd('egg_module.obj', input='libp3egg.in') - TargetAdd('egg_module.obj', opts=OPTS) - TargetAdd('egg_module.obj', opts=['IMOD:panda3d.egg', 'ILIB:egg', 'IMPORT:panda3d.core']) + OPTS=['DIR:panda/metalibs/pandaegg', 'DIR:panda/src/egg'] + PyTargetAdd('egg_module.obj', input='libp3egg2pg.in') + PyTargetAdd('egg_module.obj', input='libp3egg.in') + PyTargetAdd('egg_module.obj', opts=OPTS) + PyTargetAdd('egg_module.obj', opts=['IMOD:panda3d.egg', 'ILIB:egg', 'IMPORT:panda3d.core']) - TargetAdd('egg.pyd', input='egg_module.obj') - TargetAdd('egg.pyd', input='p3egg_eggGroupNode_ext.obj') - TargetAdd('egg.pyd', input='libp3egg_igate.obj') - TargetAdd('egg.pyd', input='libp3egg2pg_igate.obj') - TargetAdd('egg.pyd', input='libpandaegg.dll') - TargetAdd('egg.pyd', input='libp3interrogatedb.dll') - TargetAdd('egg.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('egg.pyd', opts=['PYTHON']) + PyTargetAdd('egg.pyd', input='egg_module.obj') + PyTargetAdd('egg.pyd', input='p3egg_eggGroupNode_ext.obj') + PyTargetAdd('egg.pyd', input='libp3egg_igate.obj') + PyTargetAdd('egg.pyd', input='libp3egg2pg_igate.obj') + PyTargetAdd('egg.pyd', input='libpandaegg.dll') + PyTargetAdd('egg.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('egg.pyd', input=COMMON_PANDA_LIBS) # # DIRECTORY: panda/src/x11display/ @@ -4913,20 +4858,19 @@ if (PkgSkip("EGL")==0 and PkgSkip("GLES2")==0 and PkgSkip("X11")==0 and not RUNT # DIRECTORY: panda/src/ode/ # if (PkgSkip("ODE")==0 and not RUNTIME): - OPTS=['DIR:panda/src/ode', 'BUILDING:PANDAODE', 'ODE', 'PYTHON'] + OPTS=['DIR:panda/src/ode', 'BUILDING:PANDAODE', 'ODE'] TargetAdd('p3ode_composite1.obj', opts=OPTS, input='p3ode_composite1.cxx') TargetAdd('p3ode_composite2.obj', opts=OPTS, input='p3ode_composite2.cxx') TargetAdd('p3ode_composite3.obj', opts=OPTS, input='p3ode_composite3.cxx') - OPTS=['DIR:panda/src/ode', 'ODE', 'PYTHON'] + OPTS=['DIR:panda/src/ode', 'ODE'] IGATEFILES=GetDirectoryContents('panda/src/ode', ["*.h", "*_composite*.cxx"]) IGATEFILES.remove("odeConvexGeom.h") IGATEFILES.remove("odeHeightFieldGeom.h") IGATEFILES.remove("odeHelperStructs.h") TargetAdd('libpandaode.in', opts=OPTS, input=IGATEFILES) TargetAdd('libpandaode.in', opts=['IMOD:panda3d.ode', 'ILIB:libpandaode', 'SRCDIR:panda/src/ode']) - TargetAdd('libpandaode_igate.obj', input='libpandaode.in', opts=["DEPENDENCYONLY"]) - TargetAdd('p3ode_ext_composite.obj', opts=OPTS, input='p3ode_ext_composite.cxx') + PyTargetAdd('p3ode_ext_composite.obj', opts=OPTS, input='p3ode_ext_composite.cxx') # # DIRECTORY: panda/metalibs/pandaode/ @@ -4942,18 +4886,18 @@ if (PkgSkip("ODE")==0 and not RUNTIME): TargetAdd('libpandaode.dll', input=COMMON_PANDA_LIBS) TargetAdd('libpandaode.dll', opts=['WINUSER', 'ODE']) - OPTS=['DIR:panda/metalibs/pandaode', 'ODE', 'PYTHON'] - TargetAdd('ode_module.obj', input='libpandaode.in') - TargetAdd('ode_module.obj', opts=OPTS) - TargetAdd('ode_module.obj', opts=['IMOD:panda3d.ode', 'ILIB:ode', 'IMPORT:panda3d.core']) + OPTS=['DIR:panda/metalibs/pandaode', 'ODE'] + PyTargetAdd('ode_module.obj', input='libpandaode.in') + PyTargetAdd('ode_module.obj', opts=OPTS) + PyTargetAdd('ode_module.obj', opts=['IMOD:panda3d.ode', 'ILIB:ode', 'IMPORT:panda3d.core']) - TargetAdd('ode.pyd', input='ode_module.obj') - TargetAdd('ode.pyd', input='libpandaode_igate.obj') - TargetAdd('ode.pyd', input='p3ode_ext_composite.obj') - TargetAdd('ode.pyd', input='libpandaode.dll') - TargetAdd('ode.pyd', input='libp3interrogatedb.dll') - TargetAdd('ode.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('ode.pyd', opts=['PYTHON', 'WINUSER', 'ODE']) + PyTargetAdd('ode.pyd', input='ode_module.obj') + PyTargetAdd('ode.pyd', input='libpandaode_igate.obj') + PyTargetAdd('ode.pyd', input='p3ode_ext_composite.obj') + PyTargetAdd('ode.pyd', input='libpandaode.dll') + PyTargetAdd('ode.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('ode.pyd', input=COMMON_PANDA_LIBS) + PyTargetAdd('ode.pyd', opts=['WINUSER', 'ODE']) # # DIRECTORY: panda/src/bullet/ @@ -4962,11 +4906,10 @@ if (PkgSkip("BULLET")==0 and not RUNTIME): OPTS=['DIR:panda/src/bullet', 'BUILDING:PANDABULLET', 'BULLET'] TargetAdd('p3bullet_composite.obj', opts=OPTS, input='p3bullet_composite.cxx') - OPTS=['DIR:panda/src/bullet', 'BULLET', 'PYTHON'] + OPTS=['DIR:panda/src/bullet', 'BULLET'] IGATEFILES=GetDirectoryContents('panda/src/bullet', ["*.h", "*_composite*.cxx"]) TargetAdd('libpandabullet.in', opts=OPTS, input=IGATEFILES) TargetAdd('libpandabullet.in', opts=['IMOD:panda3d.bullet', 'ILIB:libpandabullet', 'SRCDIR:panda/src/bullet']) - TargetAdd('libpandabullet_igate.obj', input='libpandabullet.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/metalibs/pandabullet/ @@ -4980,56 +4923,55 @@ if (PkgSkip("BULLET")==0 and not RUNTIME): TargetAdd('libpandabullet.dll', input=COMMON_PANDA_LIBS) TargetAdd('libpandabullet.dll', opts=['WINUSER', 'BULLET']) - OPTS=['DIR:panda/metalibs/pandabullet', 'BULLET', 'PYTHON'] - TargetAdd('bullet_module.obj', input='libpandabullet.in') - TargetAdd('bullet_module.obj', opts=OPTS) - TargetAdd('bullet_module.obj', opts=['IMOD:panda3d.bullet', 'ILIB:bullet', 'IMPORT:panda3d.core']) + OPTS=['DIR:panda/metalibs/pandabullet', 'BULLET'] + PyTargetAdd('bullet_module.obj', input='libpandabullet.in') + PyTargetAdd('bullet_module.obj', opts=OPTS) + PyTargetAdd('bullet_module.obj', opts=['IMOD:panda3d.bullet', 'ILIB:bullet', 'IMPORT:panda3d.core']) - TargetAdd('bullet.pyd', input='bullet_module.obj') - TargetAdd('bullet.pyd', input='libpandabullet_igate.obj') - TargetAdd('bullet.pyd', input='libpandabullet.dll') - TargetAdd('bullet.pyd', input='libp3interrogatedb.dll') - TargetAdd('bullet.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('bullet.pyd', opts=['PYTHON', 'WINUSER', 'BULLET']) + PyTargetAdd('bullet.pyd', input='bullet_module.obj') + PyTargetAdd('bullet.pyd', input='libpandabullet_igate.obj') + PyTargetAdd('bullet.pyd', input='libpandabullet.dll') + PyTargetAdd('bullet.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('bullet.pyd', input=COMMON_PANDA_LIBS) + PyTargetAdd('bullet.pyd', opts=['WINUSER', 'BULLET']) # # DIRECTORY: panda/src/physx/ # if (PkgSkip("PHYSX")==0): - OPTS=['DIR:panda/src/physx', 'BUILDING:PANDAPHYSX', 'PHYSX', 'NOARCH:PPC', 'PYTHON'] + OPTS=['DIR:panda/src/physx', 'BUILDING:PANDAPHYSX', 'PHYSX', 'NOARCH:PPC'] TargetAdd('p3physx_composite.obj', opts=OPTS, input='p3physx_composite.cxx') - OPTS=['DIR:panda/src/physx', 'PHYSX', 'NOARCH:PPC', 'PYTHON'] + OPTS=['DIR:panda/src/physx', 'PHYSX', 'NOARCH:PPC'] IGATEFILES=GetDirectoryContents('panda/src/physx', ["*.h", "*_composite*.cxx"]) TargetAdd('libpandaphysx.in', opts=OPTS, input=IGATEFILES) TargetAdd('libpandaphysx.in', opts=['IMOD:panda3d.physx', 'ILIB:libpandaphysx', 'SRCDIR:panda/src/physx']) - TargetAdd('libpandaphysx_igate.obj', input='libpandaphysx.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/metalibs/pandaphysx/ # if (PkgSkip("PHYSX")==0): - OPTS=['DIR:panda/metalibs/pandaphysx', 'BUILDING:PANDAPHYSX', 'PHYSX', 'NOARCH:PPC'] + OPTS=['DIR:panda/metalibs/pandaphysx', 'BUILDING:PANDAPHYSX', 'PHYSX', 'NOARCH:PPC', 'PYTHON'] TargetAdd('pandaphysx_pandaphysx.obj', opts=OPTS, input='pandaphysx.cxx') TargetAdd('libpandaphysx.dll', input='pandaphysx_pandaphysx.obj') TargetAdd('libpandaphysx.dll', input='p3physx_composite.obj') TargetAdd('libpandaphysx.dll', input=COMMON_PANDA_LIBS) - TargetAdd('libpandaphysx.dll', opts=['WINUSER', 'PHYSX', 'NOARCH:PPC', 'PYTHON']) + TargetAdd('libpandaphysx.dll', opts=['WINUSER', 'PHYSX', 'NOARCH:PPC']) - OPTS=['DIR:panda/metalibs/pandaphysx', 'PHYSX', 'NOARCH:PPC', 'PYTHON'] - TargetAdd('physx_module.obj', input='libpandaphysx.in') - TargetAdd('physx_module.obj', opts=OPTS) - TargetAdd('physx_module.obj', opts=['IMOD:panda3d.physx', 'ILIB:physx', 'IMPORT:panda3d.core']) + OPTS=['DIR:panda/metalibs/pandaphysx', 'PHYSX', 'NOARCH:PPC'] + PyTargetAdd('physx_module.obj', input='libpandaphysx.in') + PyTargetAdd('physx_module.obj', opts=OPTS) + PyTargetAdd('physx_module.obj', opts=['IMOD:panda3d.physx', 'ILIB:physx', 'IMPORT:panda3d.core']) - TargetAdd('physx.pyd', input='physx_module.obj') - TargetAdd('physx.pyd', input='libpandaphysx_igate.obj') - TargetAdd('physx.pyd', input='libpandaphysx.dll') - TargetAdd('physx.pyd', input='libp3interrogatedb.dll') - TargetAdd('physx.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('physx.pyd', opts=['PYTHON', 'WINUSER', 'PHYSX', 'NOARCH:PPC']) + PyTargetAdd('physx.pyd', input='physx_module.obj') + PyTargetAdd('physx.pyd', input='libpandaphysx_igate.obj') + PyTargetAdd('physx.pyd', input='libpandaphysx.dll') + PyTargetAdd('physx.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('physx.pyd', input=COMMON_PANDA_LIBS) + PyTargetAdd('physx.pyd', opts=['WINUSER', 'PHYSX', 'NOARCH:PPC']) # # DIRECTORY: panda/src/physics/ @@ -5040,12 +4982,11 @@ if (PkgSkip("PANDAPHYSICS")==0) and (not RUNTIME): TargetAdd('p3physics_composite1.obj', opts=OPTS, input='p3physics_composite1.cxx') TargetAdd('p3physics_composite2.obj', opts=OPTS, input='p3physics_composite2.cxx') - OPTS=['DIR:panda/src/physics', 'PYTHON'] + OPTS=['DIR:panda/src/physics'] IGATEFILES=GetDirectoryContents('panda/src/physics', ["*.h", "*_composite*.cxx"]) IGATEFILES.remove("forces.h") TargetAdd('libp3physics.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3physics.in', opts=['IMOD:panda3d.physics', 'ILIB:libp3physics', 'SRCDIR:panda/src/physics']) - TargetAdd('libp3physics_igate.obj', input='libp3physics.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/src/particlesystem/ @@ -5056,7 +4997,7 @@ if (PkgSkip("PANDAPHYSICS")==0) and (PkgSkip("PANDAPARTICLESYSTEM")==0) and (not TargetAdd('p3particlesystem_composite1.obj', opts=OPTS, input='p3particlesystem_composite1.cxx') TargetAdd('p3particlesystem_composite2.obj', opts=OPTS, input='p3particlesystem_composite2.cxx') - OPTS=['DIR:panda/src/particlesystem', 'PYTHON'] + OPTS=['DIR:panda/src/particlesystem'] IGATEFILES=GetDirectoryContents('panda/src/particlesystem', ["*.h", "*_composite*.cxx"]) IGATEFILES.remove('orientedParticle.h') IGATEFILES.remove('orientedParticleFactory.h') @@ -5065,7 +5006,6 @@ if (PkgSkip("PANDAPHYSICS")==0) and (PkgSkip("PANDAPARTICLESYSTEM")==0) and (not IGATEFILES.remove('particles.h') TargetAdd('libp3particlesystem.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3particlesystem.in', opts=['IMOD:panda3d.physics', 'ILIB:libp3particlesystem', 'SRCDIR:panda/src/particlesystem']) - TargetAdd('libp3particlesystem_igate.obj', input='libp3particlesystem.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: panda/metalibs/pandaphysics/ @@ -5083,38 +5023,37 @@ if (PkgSkip("PANDAPHYSICS")==0) and (not RUNTIME): TargetAdd('libpandaphysics.dll', input=COMMON_PANDA_LIBS) TargetAdd('libpandaphysics.dll', opts=['ADVAPI']) - OPTS=['DIR:panda/metalibs/pandaphysics', 'PYTHON'] - TargetAdd('physics_module.obj', input='libp3physics.in') + OPTS=['DIR:panda/metalibs/pandaphysics'] + PyTargetAdd('physics_module.obj', input='libp3physics.in') if (PkgSkip("PANDAPARTICLESYSTEM")==0): - TargetAdd('physics_module.obj', input='libp3particlesystem.in') - TargetAdd('physics_module.obj', opts=OPTS) - TargetAdd('physics_module.obj', opts=['IMOD:panda3d.physics', 'ILIB:physics', 'IMPORT:panda3d.core']) + PyTargetAdd('physics_module.obj', input='libp3particlesystem.in') + PyTargetAdd('physics_module.obj', opts=OPTS) + PyTargetAdd('physics_module.obj', opts=['IMOD:panda3d.physics', 'ILIB:physics', 'IMPORT:panda3d.core']) - TargetAdd('physics.pyd', input='physics_module.obj') - TargetAdd('physics.pyd', input='libp3physics_igate.obj') + PyTargetAdd('physics.pyd', input='physics_module.obj') + PyTargetAdd('physics.pyd', input='libp3physics_igate.obj') if (PkgSkip("PANDAPARTICLESYSTEM")==0): - TargetAdd('physics.pyd', input='libp3particlesystem_igate.obj') - TargetAdd('physics.pyd', input='libpandaphysics.dll') - TargetAdd('physics.pyd', input='libp3interrogatedb.dll') - TargetAdd('physics.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('physics.pyd', opts=['PYTHON']) + PyTargetAdd('physics.pyd', input='libp3particlesystem_igate.obj') + PyTargetAdd('physics.pyd', input='libpandaphysics.dll') + PyTargetAdd('physics.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('physics.pyd', input=COMMON_PANDA_LIBS) # # DIRECTORY: panda/src/speedtree/ # if (PkgSkip("SPEEDTREE")==0): - OPTS=['DIR:panda/src/speedtree', 'BUILDING:PANDASPEEDTREE', 'SPEEDTREE', 'PYTHON'] + OPTS=['DIR:panda/src/speedtree', 'BUILDING:PANDASPEEDTREE', 'SPEEDTREE'] TargetAdd('pandaspeedtree_composite1.obj', opts=OPTS, input='pandaspeedtree_composite1.cxx') IGATEFILES=GetDirectoryContents('panda/src/speedtree', ["*.h", "*_composite*.cxx"]) TargetAdd('libpandaspeedtree.in', opts=OPTS, input=IGATEFILES) TargetAdd('libpandaspeedtree.in', opts=['IMOD:libpandaspeedtree', 'ILIB:libpandaspeedtree', 'SRCDIR:panda/src/speedtree']) - TargetAdd('libpandaspeedtree_igate.obj', input='libpandaspeedtree.in', opts=["DEPENDENCYONLY"]) - TargetAdd('libpandaspeedtree_module.obj', input='libpandaspeedtree.in') - TargetAdd('libpandaspeedtree_module.obj', opts=OPTS) - TargetAdd('libpandaspeedtree_module.obj', opts=['IMOD:libpandaspeedtree', 'ILIB:libpandaspeedtree']) + + PyTargetAdd('libpandaspeedtree_module.obj', input='libpandaspeedtree.in') + PyTargetAdd('libpandaspeedtree_module.obj', opts=OPTS) + PyTargetAdd('libpandaspeedtree_module.obj', opts=['IMOD:libpandaspeedtree', 'ILIB:libpandaspeedtree']) TargetAdd('libpandaspeedtree.dll', input='pandaspeedtree_composite1.obj') - TargetAdd('libpandaspeedtree.dll', input='libpandaspeedtree_igate.obj') + PyTargetAdd('libpandaspeedtree.dll', input='libpandaspeedtree_igate.obj') TargetAdd('libpandaspeedtree.dll', input='libpandaspeedtree_module.obj') TargetAdd('libpandaspeedtree.dll', input=COMMON_PANDA_LIBS) TargetAdd('libpandaspeedtree.dll', opts=['SPEEDTREE']) @@ -5177,7 +5116,7 @@ if (not RUNTIME and GetTarget() == 'android'): TargetAdd('libppython.dll', input='libp3framework.dll') TargetAdd('libppython.dll', input='libp3android.dll') TargetAdd('libppython.dll', input=COMMON_PANDA_LIBS) - TargetAdd('libppython.dll', opts=['MODULE', 'ANDROID', 'PYTHON']) + TargetAdd('libppython.dll', opts=['MODULE', 'ANDROID']) # # DIRECTORY: panda/src/androiddisplay/ @@ -5234,7 +5173,7 @@ if (not RUNTIME and (GetTarget() in ('windows', 'darwin') or PkgSkip("X11")==0) # if (PkgSkip("DIRECT")==0): - OPTS=['DIR:direct/src/directbase', 'PYTHON'] + OPTS=['DIR:direct/src/directbase'] TargetAdd('p3directbase_directbase.obj', opts=OPTS+['BUILDING:DIRECT'], input='directbase.cxx') # @@ -5242,21 +5181,20 @@ if (PkgSkip("DIRECT")==0): # if (PkgSkip("DIRECT")==0): - OPTS=['DIR:direct/src/dcparser', 'BUILDING:DIRECT_DCPARSER', 'WITHINPANDA', 'BISONPREFIX_dcyy', 'PYTHON'] + OPTS=['DIR:direct/src/dcparser', 'BUILDING:DIRECT_DCPARSER', 'WITHINPANDA', 'BISONPREFIX_dcyy'] CreateFile(GetOutputDir()+"/include/dcParser.h") - TargetAdd('p3dcparser_dcParser.obj', opts=OPTS, input='dcParser.yxx') - TargetAdd('dcParser.h', input='p3dcparser_dcParser.obj', opts=['DEPENDENCYONLY']) - TargetAdd('p3dcparser_dcLexer.obj', opts=OPTS, input='dcLexer.lxx') - TargetAdd('p3dcparser_composite1.obj', opts=OPTS, input='p3dcparser_composite1.cxx') - TargetAdd('p3dcparser_composite2.obj', opts=OPTS, input='p3dcparser_composite2.cxx') + PyTargetAdd('p3dcparser_dcParser.obj', opts=OPTS, input='dcParser.yxx') + #TargetAdd('dcParser.h', input='p3dcparser_dcParser.obj', opts=['DEPENDENCYONLY']) + PyTargetAdd('p3dcparser_dcLexer.obj', opts=OPTS, input='dcLexer.lxx') + PyTargetAdd('p3dcparser_composite1.obj', opts=OPTS, input='p3dcparser_composite1.cxx') + PyTargetAdd('p3dcparser_composite2.obj', opts=OPTS, input='p3dcparser_composite2.cxx') - OPTS=['DIR:direct/src/dcparser', 'WITHINPANDA', 'PYTHON'] + OPTS=['DIR:direct/src/dcparser', 'WITHINPANDA'] IGATEFILES=GetDirectoryContents('direct/src/dcparser', ["*.h", "*_composite*.cxx"]) if "dcParser.h" in IGATEFILES: IGATEFILES.remove("dcParser.h") if "dcmsgtypes.h" in IGATEFILES: IGATEFILES.remove('dcmsgtypes.h') TargetAdd('libp3dcparser.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3dcparser.in', opts=['IMOD:panda3d.direct', 'ILIB:libp3dcparser', 'SRCDIR:direct/src/dcparser']) - TargetAdd('libp3dcparser_igate.obj', input='libp3dcparser.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: direct/src/deadrec/ @@ -5266,27 +5204,25 @@ if (PkgSkip("DIRECT")==0): OPTS=['DIR:direct/src/deadrec', 'BUILDING:DIRECT'] TargetAdd('p3deadrec_composite1.obj', opts=OPTS, input='p3deadrec_composite1.cxx') - OPTS=['DIR:direct/src/deadrec', 'PYTHON'] + OPTS=['DIR:direct/src/deadrec'] IGATEFILES=GetDirectoryContents('direct/src/deadrec', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3deadrec.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3deadrec.in', opts=['IMOD:panda3d.direct', 'ILIB:libp3deadrec', 'SRCDIR:direct/src/deadrec']) - TargetAdd('libp3deadrec_igate.obj', input='libp3deadrec.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: direct/src/distributed/ # if (PkgSkip("DIRECT")==0): - OPTS=['DIR:direct/src/distributed', 'DIR:direct/src/dcparser', 'WITHINPANDA', 'BUILDING:DIRECT', 'OPENSSL', 'PYTHON'] + OPTS=['DIR:direct/src/distributed', 'DIR:direct/src/dcparser', 'WITHINPANDA', 'BUILDING:DIRECT', 'OPENSSL'] TargetAdd('p3distributed_config_distributed.obj', opts=OPTS, input='config_distributed.cxx') - TargetAdd('p3distributed_cConnectionRepository.obj', opts=OPTS, input='cConnectionRepository.cxx') - TargetAdd('p3distributed_cDistributedSmoothNodeBase.obj', opts=OPTS, input='cDistributedSmoothNodeBase.cxx') + PyTargetAdd('p3distributed_cConnectionRepository.obj', opts=OPTS, input='cConnectionRepository.cxx') + PyTargetAdd('p3distributed_cDistributedSmoothNodeBase.obj', opts=OPTS, input='cDistributedSmoothNodeBase.cxx') - OPTS=['DIR:direct/src/distributed', 'WITHINPANDA', 'OPENSSL', 'PYTHON'] + OPTS=['DIR:direct/src/distributed', 'WITHINPANDA', 'OPENSSL'] IGATEFILES=GetDirectoryContents('direct/src/distributed', ["*.h", "*.cxx"]) TargetAdd('libp3distributed.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3distributed.in', opts=['IMOD:panda3d.direct', 'ILIB:libp3distributed', 'SRCDIR:direct/src/distributed']) - TargetAdd('libp3distributed_igate.obj', input='libp3distributed.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: direct/src/interval/ @@ -5296,11 +5232,10 @@ if (PkgSkip("DIRECT")==0): OPTS=['DIR:direct/src/interval', 'BUILDING:DIRECT'] TargetAdd('p3interval_composite1.obj', opts=OPTS, input='p3interval_composite1.cxx') - OPTS=['DIR:direct/src/interval', 'PYTHON'] + OPTS=['DIR:direct/src/interval'] IGATEFILES=GetDirectoryContents('direct/src/interval', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3interval.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3interval.in', opts=['IMOD:panda3d.direct', 'ILIB:libp3interval', 'SRCDIR:direct/src/interval']) - TargetAdd('libp3interval_igate.obj', input='libp3interval.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: direct/src/showbase/ @@ -5312,11 +5247,10 @@ if (PkgSkip("DIRECT")==0): if GetTarget() == 'darwin': TargetAdd('p3showbase_showBase_assist.obj', opts=OPTS, input='showBase_assist.mm') - OPTS=['DIR:direct/src/showbase', 'PYTHON'] + OPTS=['DIR:direct/src/showbase'] IGATEFILES=GetDirectoryContents('direct/src/showbase', ["*.h", "showBase.cxx"]) TargetAdd('libp3showbase.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3showbase.in', opts=['IMOD:panda3d.direct', 'ILIB:libp3showbase', 'SRCDIR:direct/src/showbase']) - TargetAdd('libp3showbase_igate.obj', input='libp3showbase.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: direct/src/motiontrail/ @@ -5327,11 +5261,10 @@ if (PkgSkip("DIRECT")==0): TargetAdd('p3motiontrail_cMotionTrail.obj', opts=OPTS, input='cMotionTrail.cxx') TargetAdd('p3motiontrail_config_motiontrail.obj', opts=OPTS, input='config_motiontrail.cxx') - OPTS=['DIR:direct/src/motiontrail', 'PYTHON'] + OPTS=['DIR:direct/src/motiontrail'] IGATEFILES=GetDirectoryContents('direct/src/motiontrail', ["*.h", "cMotionTrail.cxx"]) TargetAdd('libp3motiontrail.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3motiontrail.in', opts=['IMOD:panda3d.direct', 'ILIB:libp3motiontrail', 'SRCDIR:direct/src/motiontrail']) - TargetAdd('libp3motiontrail_igate.obj', input='libp3motiontrail.in', opts=["DEPENDENCYONLY"]) # # DIRECTORY: direct/metalibs/direct/ @@ -5349,56 +5282,54 @@ if (PkgSkip("DIRECT")==0): TargetAdd('libp3direct.dll', input=COMMON_PANDA_LIBS) TargetAdd('libp3direct.dll', opts=['ADVAPI', 'OPENSSL', 'WINUSER', 'WINGDI']) - OPTS=['PYTHON'] - TargetAdd('direct_module.obj', input='libp3dcparser.in') - TargetAdd('direct_module.obj', input='libp3showbase.in') - TargetAdd('direct_module.obj', input='libp3deadrec.in') - TargetAdd('direct_module.obj', input='libp3interval.in') - TargetAdd('direct_module.obj', input='libp3distributed.in') - TargetAdd('direct_module.obj', input='libp3motiontrail.in') - TargetAdd('direct_module.obj', opts=OPTS) - TargetAdd('direct_module.obj', opts=['IMOD:panda3d.direct', 'ILIB:direct', 'IMPORT:panda3d.core']) + PyTargetAdd('direct_module.obj', input='libp3dcparser.in') + PyTargetAdd('direct_module.obj', input='libp3showbase.in') + PyTargetAdd('direct_module.obj', input='libp3deadrec.in') + PyTargetAdd('direct_module.obj', input='libp3interval.in') + PyTargetAdd('direct_module.obj', input='libp3distributed.in') + PyTargetAdd('direct_module.obj', input='libp3motiontrail.in') + PyTargetAdd('direct_module.obj', opts=['IMOD:panda3d.direct', 'ILIB:direct', 'IMPORT:panda3d.core']) - TargetAdd('direct.pyd', input='libp3dcparser_igate.obj') - TargetAdd('direct.pyd', input='libp3showbase_igate.obj') - TargetAdd('direct.pyd', input='libp3deadrec_igate.obj') - TargetAdd('direct.pyd', input='libp3interval_igate.obj') - TargetAdd('direct.pyd', input='libp3distributed_igate.obj') - TargetAdd('direct.pyd', input='libp3motiontrail_igate.obj') + PyTargetAdd('direct.pyd', input='libp3dcparser_igate.obj') + PyTargetAdd('direct.pyd', input='libp3showbase_igate.obj') + PyTargetAdd('direct.pyd', input='libp3deadrec_igate.obj') + PyTargetAdd('direct.pyd', input='libp3interval_igate.obj') + PyTargetAdd('direct.pyd', input='libp3distributed_igate.obj') + PyTargetAdd('direct.pyd', input='libp3motiontrail_igate.obj') # These are part of direct.pyd, not libp3direct.dll, because they rely on # the Python libraries. If a C++ user needs these modules, we can move them # back and filter out the Python-specific code. - TargetAdd('direct.pyd', input='p3dcparser_composite1.obj') - TargetAdd('direct.pyd', input='p3dcparser_composite2.obj') - TargetAdd('direct.pyd', input='p3dcparser_dcParser.obj') - TargetAdd('direct.pyd', input='p3dcparser_dcLexer.obj') - TargetAdd('direct.pyd', input='p3distributed_config_distributed.obj') - TargetAdd('direct.pyd', input='p3distributed_cConnectionRepository.obj') - TargetAdd('direct.pyd', input='p3distributed_cDistributedSmoothNodeBase.obj') + PyTargetAdd('direct.pyd', input='p3dcparser_composite1.obj') + PyTargetAdd('direct.pyd', input='p3dcparser_composite2.obj') + PyTargetAdd('direct.pyd', input='p3dcparser_dcParser.obj') + PyTargetAdd('direct.pyd', input='p3dcparser_dcLexer.obj') + PyTargetAdd('direct.pyd', input='p3distributed_config_distributed.obj') + PyTargetAdd('direct.pyd', input='p3distributed_cConnectionRepository.obj') + PyTargetAdd('direct.pyd', input='p3distributed_cDistributedSmoothNodeBase.obj') - TargetAdd('direct.pyd', input='direct_module.obj') - TargetAdd('direct.pyd', input='libp3direct.dll') - TargetAdd('direct.pyd', input='libp3interrogatedb.dll') - TargetAdd('direct.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('direct.pyd', opts=['PYTHON', 'OPENSSL', 'WINUSER', 'WINGDI', 'WINSOCK2']) + PyTargetAdd('direct.pyd', input='direct_module.obj') + PyTargetAdd('direct.pyd', input='libp3direct.dll') + PyTargetAdd('direct.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('direct.pyd', input=COMMON_PANDA_LIBS) + PyTargetAdd('direct.pyd', opts=['OPENSSL', 'WINUSER', 'WINGDI', 'WINSOCK2']) # # DIRECTORY: direct/src/dcparse/ # if (PkgSkip("PYTHON")==0 and PkgSkip("DIRECT")==0 and not RTDIST and not RUNTIME): - OPTS=['DIR:direct/src/dcparse', 'DIR:direct/src/dcparser', 'WITHINPANDA', 'ADVAPI', 'PYTHON'] - TargetAdd('dcparse_dcparse.obj', opts=OPTS, input='dcparse.cxx') - TargetAdd('p3dcparse.exe', input='p3dcparser_composite1.obj') - TargetAdd('p3dcparse.exe', input='p3dcparser_composite2.obj') - TargetAdd('p3dcparse.exe', input='p3dcparser_dcParser.obj') - TargetAdd('p3dcparse.exe', input='p3dcparser_dcLexer.obj') - TargetAdd('p3dcparse.exe', input='dcparse_dcparse.obj') - TargetAdd('p3dcparse.exe', input='libp3direct.dll') - TargetAdd('p3dcparse.exe', input=COMMON_PANDA_LIBS) - TargetAdd('p3dcparse.exe', input='libp3pystub.lib') - TargetAdd('p3dcparse.exe', opts=['ADVAPI', 'PYTHON']) + OPTS=['DIR:direct/src/dcparse', 'DIR:direct/src/dcparser', 'WITHINPANDA', 'ADVAPI'] + PyTargetAdd('dcparse_dcparse.obj', opts=OPTS, input='dcparse.cxx') + PyTargetAdd('p3dcparse.exe', input='p3dcparser_composite1.obj') + PyTargetAdd('p3dcparse.exe', input='p3dcparser_composite2.obj') + PyTargetAdd('p3dcparse.exe', input='p3dcparser_dcParser.obj') + PyTargetAdd('p3dcparse.exe', input='p3dcparser_dcLexer.obj') + PyTargetAdd('p3dcparse.exe', input='dcparse_dcparse.obj') + PyTargetAdd('p3dcparse.exe', input='libp3direct.dll') + PyTargetAdd('p3dcparse.exe', input=COMMON_PANDA_LIBS) + PyTargetAdd('p3dcparse.exe', input='libp3pystub.lib') + PyTargetAdd('p3dcparse.exe', opts=['ADVAPI']) # # DIRECTORY: direct/src/plugin/ @@ -5447,7 +5378,7 @@ if (RTDIST or RUNTIME): if (PkgSkip("PYTHON")==0 and RTDIST): # Freeze VFSImporter and its dependency modules into p3dpython. # Mark panda3d.core as a dependency to make sure to build that first. - TargetAdd('p3dpython_frozen.obj', input='VFSImporter.py', opts=['DIR:direct/src/showbase', 'FREEZE_STARTUP', 'PYTHON']) + TargetAdd('p3dpython_frozen.obj', input='VFSImporter.py', opts=['DIR:direct/src/showbase', 'FREEZE_STARTUP']) TargetAdd('p3dpython_frozen.obj', dep='core.pyd') OPTS += ['PYTHON'] @@ -5479,7 +5410,7 @@ if (RTDIST or RUNTIME): TargetAdd('p3dpythonw.exe', input=COMMON_PANDA_LIBS) TargetAdd('p3dpythonw.exe', input='libp3tinyxml.ilb') TargetAdd('p3dpythonw.exe', input='libp3interrogatedb.dll') - TargetAdd('p3dpythonw.exe', opts=['SUBSYSTEM:WINDOWS', 'PYTHON', 'WINUSER']) + TargetAdd('p3dpythonw.exe', opts=['SUBSYSTEM:WINDOWS', 'WINUSER']) if (PkgSkip("OPENSSL")==0 and RTDIST and False): OPTS=['DIR:direct/src/plugin', 'DIR:panda/src/express', 'OPENSSL'] @@ -6570,45 +6501,41 @@ if (PkgSkip("CONTRIB")==0 and not RUNTIME): TargetAdd('libpandaai.dll', input='p3ai_composite1.obj') TargetAdd('libpandaai.dll', input=COMMON_PANDA_LIBS) - OPTS=['DIR:contrib/src/ai', 'PYTHON'] + OPTS=['DIR:contrib/src/ai'] IGATEFILES=GetDirectoryContents('contrib/src/ai', ["*.h", "*_composite*.cxx"]) TargetAdd('libpandaai.in', opts=OPTS, input=IGATEFILES) TargetAdd('libpandaai.in', opts=['IMOD:panda3d.ai', 'ILIB:libpandaai', 'SRCDIR:contrib/src/ai']) - TargetAdd('libpandaai_igate.obj', input='libpandaai.in', opts=["DEPENDENCYONLY"]) - TargetAdd('ai_module.obj', input='libpandaai.in') - TargetAdd('ai_module.obj', opts=OPTS) - TargetAdd('ai_module.obj', opts=['IMOD:panda3d.ai', 'ILIB:ai', 'IMPORT:panda3d.core']) + PyTargetAdd('ai_module.obj', input='libpandaai.in') + PyTargetAdd('ai_module.obj', opts=OPTS) + PyTargetAdd('ai_module.obj', opts=['IMOD:panda3d.ai', 'ILIB:ai', 'IMPORT:panda3d.core']) - TargetAdd('ai.pyd', input='ai_module.obj') - TargetAdd('ai.pyd', input='libpandaai_igate.obj') - TargetAdd('ai.pyd', input='libpandaai.dll') - TargetAdd('ai.pyd', input='libp3interrogatedb.dll') - TargetAdd('ai.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('ai.pyd', opts=['PYTHON']) + PyTargetAdd('ai.pyd', input='ai_module.obj') + PyTargetAdd('ai.pyd', input='libpandaai_igate.obj') + PyTargetAdd('ai.pyd', input='libpandaai.dll') + PyTargetAdd('ai.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('ai.pyd', input=COMMON_PANDA_LIBS) # # DIRECTORY: contrib/src/rplight/ # if not PkgSkip("CONTRIB") and not PkgSkip("PYTHON") and not RUNTIME: - OPTS=['DIR:contrib/src/rplight', 'BUILDING:RPLIGHT', 'PYTHON'] + OPTS=['DIR:contrib/src/rplight', 'BUILDING:RPLIGHT'] TargetAdd('p3rplight_composite1.obj', opts=OPTS, input='p3rplight_composite1.cxx') IGATEFILES=GetDirectoryContents('contrib/src/rplight', ["*.h", "*_composite*.cxx"]) TargetAdd('libp3rplight.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3rplight.in', opts=['IMOD:panda3d._rplight', 'ILIB:libp3rplight', 'SRCDIR:contrib/src/rplight']) - TargetAdd('libp3rplight_igate.obj', input='libp3rplight.in', opts=["DEPENDENCYONLY"]) - TargetAdd('rplight_module.obj', input='libp3rplight.in') - TargetAdd('rplight_module.obj', opts=OPTS) - TargetAdd('rplight_module.obj', opts=['IMOD:panda3d._rplight', 'ILIB:_rplight', 'IMPORT:panda3d.core']) + PyTargetAdd('rplight_module.obj', input='libp3rplight.in') + PyTargetAdd('rplight_module.obj', opts=OPTS) + PyTargetAdd('rplight_module.obj', opts=['IMOD:panda3d._rplight', 'ILIB:_rplight', 'IMPORT:panda3d.core']) - TargetAdd('_rplight.pyd', input='rplight_module.obj') - TargetAdd('_rplight.pyd', input='libp3rplight_igate.obj') - TargetAdd('_rplight.pyd', input='p3rplight_composite1.obj') - TargetAdd('_rplight.pyd', input='libp3interrogatedb.dll') - TargetAdd('_rplight.pyd', input=COMMON_PANDA_LIBS) - TargetAdd('_rplight.pyd', opts=['PYTHON']) + PyTargetAdd('_rplight.pyd', input='rplight_module.obj') + PyTargetAdd('_rplight.pyd', input='libp3rplight_igate.obj') + PyTargetAdd('_rplight.pyd', input='p3rplight_composite1.obj') + PyTargetAdd('_rplight.pyd', input='libp3interrogatedb.dll') + PyTargetAdd('_rplight.pyd', input=COMMON_PANDA_LIBS) # # Generate the models directory and samples directory @@ -6876,6 +6803,7 @@ def MakeInstallerNSIS(file, title, installdir): 'SOURCE' : '..', 'PYVER' : SDK["PYTHONVERSION"][6:9], 'REGVIEW' : regview, + 'EXT_SUFFIX' : GetExtensionSuffix(), } if GetHost() == 'windows': @@ -6887,7 +6815,7 @@ def MakeInstallerNSIS(file, title, installdir): for item in nsis_defs.items(): cmd += ' -D%s="%s"' % item - cmd += ' "makepanda\installer.nsi"' + cmd += ' "makepanda\\installer.nsi"' oscmd(cmd) def MakeDebugSymbolArchive(zipname, dirname): @@ -7288,8 +7216,9 @@ def MakeInstallerOSX(): if ((base != "extensions") and (base != "extensions_native")): compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/direct/"+base) + suffix = GetExtensionSuffix() for base in os.listdir(GetOutputDir()+"/panda3d"): - if base.endswith('.py') or base.endswith('.so'): + if base.endswith('.py') or (base.endswith(suffix) and '.' not in base[:-len(suffix)]): libname = "dstroot/pythoncode/Developer/Panda3D/panda3d/" + base # We really need to specify -R in order not to follow symlinks # On OSX, just specifying -P is not enough to do that. @@ -7577,8 +7506,9 @@ def MakeInstallerAndroid(): if not base.endswith(suffix): continue modname = base[:-len(suffix)] - source = os.path.join(source_dir, base) - copy_library(source, "libpy.panda3d.{}.so".format(modname)) + if '.' not in modname: + source = os.path.join(source_dir, base) + copy_library(source, "libpy.panda3d.{}.so".format(modname)) # Same for standard Python modules. import _ctypes diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index cf89b85e59..7d19a00a19 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -3239,6 +3239,8 @@ def WriteEmbeddedStringFile(basename, inputs, string_name=None): ######################################################################## ORIG_EXT = {} +PYABI_SPECIFIC = set() +WARNED_FILES = set() def GetOrigExt(x): return ORIG_EXT[x] @@ -3249,14 +3251,42 @@ def SetOrigExt(x, v): def GetExtensionSuffix(): if sys.version_info >= (3, 0): suffix = sysconfig.get_config_var('EXT_SUFFIX') - if suffix: + if suffix == '.so': + # On my FreeBSD system, this is not set correctly, but SOABI is. + soabi = sysconfig.get_config_var('SOABI') + if soabi: + return '.%s.so' % (soabi) + elif suffix: return suffix + target = GetTarget() if target == 'windows': return '.pyd' else: return '.so' +def GetPythonABI(): + soabi = sysconfig.get_config_var('SOABI') + if soabi: + return soabi + + soabi = 'cpython-%d%d' % (sys.version_info[:2]) + + debug_flag = sysconfig.get_config_var('Py_DEBUG') + if (debug_flag is None and hasattr(sys, 'gettotalrefcount')) or debug_flag: + soabi += 'd' + + malloc_flag = sysconfig.get_config_var('WITH_PYMALLOC') + if malloc_flag is None or malloc_flag: + soabi += 'm' + + if sys.version_info < (3, 3): + usize = sysconfig.get_config_var('Py_UNICODE_SIZE') + if (usize is None and sys.maxunicode == 0x10ffff) or usize == 4: + soabi += 'u' + + return soabi + def CalcLocation(fn, ipath): if fn.startswith("panda3d/") and fn.endswith(".py"): return OUTPUTDIR + "/" + fn @@ -3327,11 +3357,25 @@ def CalcLocation(fn, ipath): return fn -def FindLocation(fn, ipath): +def FindLocation(fn, ipath, pyabi=None): if (GetLinkAllStatic() and fn.endswith(".dll")): fn = fn[:-4] + ".lib" loc = CalcLocation(fn, ipath) base, ext = os.path.splitext(fn) + + # If this is a target created with PyTargetAdd, we need to make sure it + # it put in a Python-version-specific directory. + if loc in PYABI_SPECIFIC: + if loc.startswith(OUTPUTDIR + "/tmp"): + if pyabi is not None: + loc = OUTPUTDIR + "/tmp/" + pyabi + loc[len(OUTPUTDIR) + 4:] + else: + raise RuntimeError("%s is a Python-specific target, use PyTargetAdd instead of TargetAdd" % (fn)) + + elif ext != ".pyd" and loc not in WARNED_FILES: + WARNED_FILES.add(loc) + print("%sWARNING:%s file depends on Python but is not in an ABI-specific directory: %s%s%s" % (GetColor("red"), GetColor(), GetColor("green"), loc, GetColor())) + ORIG_EXT[loc] = ext return loc @@ -3377,6 +3421,11 @@ def FindLocation(fn, ipath): ## be inserted: bison generates an OBJ and a secondary header ## file, interrogate generates an IN and a secondary IGATE.OBJ. ## +## PyTargetAdd is a special version for targets that depend on Python. +## It will create a target for each Python version we are building with, +## ensuring that builds with different Python versions won't conflict +## when we build for multiple Python ABIs side-by-side. +## ######################################################################## class Target: @@ -3385,7 +3434,7 @@ class Target: TARGET_LIST = [] TARGET_TABLE = {} -def TargetAdd(target, dummy=0, opts=[], input=[], dep=[], ipath=None, winrc=None): +def TargetAdd(target, dummy=0, opts=[], input=[], dep=[], ipath=None, winrc=None, pyabi=None): if (dummy != 0): exit("Syntax error in TargetAdd "+target) if ipath is None: ipath = opts @@ -3393,11 +3442,10 @@ def TargetAdd(target, dummy=0, opts=[], input=[], dep=[], ipath=None, winrc=None if (type(input) == str): input = [input] if (type(dep) == str): dep = [dep] - if os.path.splitext(target)[1] == '.pyd' and PkgSkip("PYTHON"): - # It makes no sense to build Python modules with python disabled. - return + if target.endswith(".pyd") and not pyabi: + raise RuntimeError("Use PyTargetAdd to build .pyd targets") - full = FindLocation(target, [OUTPUTDIR + "/include"]) + full = FindLocation(target, [OUTPUTDIR + "/include"], pyabi=pyabi) if (full not in TARGET_TABLE): t = Target() @@ -3416,7 +3464,7 @@ def TargetAdd(target, dummy=0, opts=[], input=[], dep=[], ipath=None, winrc=None ipath = [OUTPUTDIR + "/tmp"] + GetListOption(ipath, "DIR:") + [OUTPUTDIR+"/include"] for x in input: - fullinput = FindLocation(x, ipath) + fullinput = FindLocation(x, ipath, pyabi=pyabi) t.inputs.append(fullinput) # Don't re-link a library or binary if just its dependency dlls have been altered. # This should work out fine in most cases, and often reduces recompilation time. @@ -3455,7 +3503,7 @@ def TargetAdd(target, dummy=0, opts=[], input=[], dep=[], ipath=None, winrc=None t.deps[fulln] = 1 for x in dep: - fulldep = FindLocation(x, ipath) + fulldep = FindLocation(x, ipath, pyabi=pyabi) t.deps[fulldep] = 1 if winrc and GetTarget() == 'windows': @@ -3472,3 +3520,32 @@ def TargetAdd(target, dummy=0, opts=[], input=[], dep=[], ipath=None, winrc=None if target.endswith(".pz") and not CrossCompiling(): t.deps[FindLocation("pzip.exe", [])] = 1 + + if target.endswith(".in"): + # Also add a target to compile the _igate.cxx file into an _igate.obj. + outbase = os.path.basename(target)[:-3] + woutc = OUTPUTDIR + "/tmp/" + outbase + "_igate.cxx" + CxxDependencyCache[woutc] = [] + PyTargetAdd(outbase + "_igate.obj", opts=opts+['PYTHON','BIGOBJ'], input=woutc, dep=target) + + +def PyTargetAdd(target, opts=[], **kwargs): + if PkgSkip("PYTHON"): + return + + if 'PYTHON' not in opts: + opts = opts + ['PYTHON'] + + abi = GetPythonABI() + + MakeDirectory(OUTPUTDIR + "/tmp/" + abi) + + # Mark this target as being a Python-specific target. + orig = CalcLocation(target, [OUTPUTDIR + "/include"]) + PYABI_SPECIFIC.add(orig) + + if orig.startswith(OUTPUTDIR + "/tmp/") and os.path.exists(orig): + print("Removing file %s" % (orig)) + os.unlink(orig) + + TargetAdd(target, opts=opts, pyabi=abi, **kwargs) diff --git a/makepanda/makewheel.py b/makepanda/makewheel.py index 74ee15d7f1..b74ad0116d 100644 --- a/makepanda/makewheel.py +++ b/makepanda/makewheel.py @@ -498,7 +498,7 @@ __version__ = '{0}' for file in os.listdir(panda3d_dir): if file == '__init__.py': pass - elif file.endswith(ext_suffix) or file.endswith('.py'): + elif file.endswith('.py') or (file.endswith(ext_suffix) and '.' not in file[:-len(ext_suffix)]): source_path = os.path.join(panda3d_dir, file) if file.endswith('.pyd') and platform.startswith('cygwin'):