Browse Source

*** empty log message ***

David Rose 25 years ago
parent
commit
84af991fc0
3 changed files with 24 additions and 6 deletions
  1. 15 5
      dtool/Config.pp
  2. 8 0
      dtool/pptempl/Global.unix.pp
  3. 1 1
      dtool/pptempl/Template.unix.pp

+ 15 - 5
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

+ 8 - 0
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]

+ 1 - 1
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 $@