summaryrefslogtreecommitdiff
path: root/Examples/guile/class
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/guile/class')
-rw-r--r--Examples/guile/class/Makefile8
-rw-r--r--Examples/guile/class/example.cxx10
2 files changed, 9 insertions, 9 deletions
diff --git a/Examples/guile/class/Makefile b/Examples/guile/class/Makefile
index 8de4f292b..48426a8fb 100644
--- a/Examples/guile/class/Makefile
+++ b/Examples/guile/class/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile guile_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' guile_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='my-guile' INTERFACE='$(INTERFACE)' guile_static_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' guile_clean
diff --git a/Examples/guile/class/example.cxx b/Examples/guile/class/example.cxx
index 1e8e203dd..046304519 100644
--- a/Examples/guile/class/example.cxx
+++ b/Examples/guile/class/example.cxx
@@ -1,4 +1,4 @@
-/* File : example.c */
+/* File : example.cxx */
#include "example.h"
#define M_PI 3.14159265358979323846
@@ -11,18 +11,18 @@ void Shape::move(double dx, double dy) {
int Shape::nshapes = 0;
-double Circle::area(void) {
+double Circle::area() {
return M_PI*radius*radius;
}
-double Circle::perimeter(void) {
+double Circle::perimeter() {
return 2*M_PI*radius;
}
-double Square::area(void) {
+double Square::area() {
return width*width;
}
-double Square::perimeter(void) {
+double Square::perimeter() {
return 4*width;
}