diff --git a/dtool/Config.pp b/dtool/Config.pp index eb857cf367..dfeb8ad9f7 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -108,14 +108,24 @@ // nonempty string to force the package to be marked as installed). -// Do you want to generate a C-callable interrogate interface? This -// is not presently used by any VR Studio code. -#define INTERROGATE_C_INTERFACE - // Do you want to generate a Python-callable interrogate interface? -// This is done only if HAVE_PYTHON, below, is also true. +// This is only necessary if you plan to make calls into Panda from a +// program written in Python. This is done only if HAVE_PYTHON, +// below, is also true. #define INTERROGATE_PYTHON_INTERFACE 1 +// Do you want to generate a C-callable interrogate interface? This +// generates an interface similar to the Python interface above, with +// a C calling convention. It should be useful for most other kinds +// of scripting language; the VR Studio used to use this to make calls +// into Panda from Squeak. This is not presently used by any VR +// Studio code. +#define INTERROGATE_C_INTERFACE + +// What additional options should be passed to interrogate when +// generating either of the above two interfaces? Generally, you +// probably don't want to mess with this. +#define INTERROGATE_OPTIONS -fnames -string -refcount -assert -promiscuous // Is Python installed, and should Python interfaces be generated? If // Python is installed, which directory is it in? (If the directory diff --git a/dtool/pptempl/Global.unix.pp b/dtool/pptempl/Global.unix.pp index c72b8d1c22..68baf05747 100644 --- a/dtool/pptempl/Global.unix.pp +++ b/dtool/pptempl/Global.unix.pp @@ -36,3 +36,11 @@ Warning: Variable $[upcase $[tree]]_INSTALL is not set! #else #define install_parser_inc_dir $[install_headers_dir]/parser-inc #endif + +#defer interrogate_options \ + -DCPPPARSER -D__cplusplus $[SYSTEM_IGATE_FLAGS] \ + -S$[install_parser_inc_dir] $[target_ipath:%=-I%] \ + $[filter -D%,$[get_cflags] $[C++FLAGS]] \ + $[INTERROGATE_OPTIONS] \ + $[if $[INTERROGATE_PYTHON_INTERFACE],-python] \ + $[if $[INTERROGATE_C_INTERFACE],-c] diff --git a/dtool/pptempl/Template.unix.pp b/dtool/pptempl/Template.unix.pp index 711f499375..25b0562e92 100644 --- a/dtool/pptempl/Template.unix.pp +++ b/dtool/pptempl/Template.unix.pp @@ -202,7 +202,7 @@ $[install_igatedb_dir]/$[igatedb] : $[so_dir]/$[igatedb] lib$[TARGET]_igatescan = $[igatescan] $[so_dir]/$[igatedb] $[so_dir]/$[igateoutput] : $[filter-out .c .cxx,$[igatescan]] - interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] -DCPPPARSER -D__cplusplus $[SYSTEM_IGATE_FLAGS] -S$[install_parser_inc_dir] $[target_ipath:%=-I%] $[filter -D%,$[get_cflags] $[C++FLAGS]] -module "$[igatemod]" -library "$[igatelib]" -fnames -string -refcount -assert -promiscuous -python $(lib$[TARGET]_igatescan) + interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan) $[igateoutput:%.cxx=$[so_dir]/%.o] : $[so_dir]/$[igateoutput] #define target $@