swig/Examples/go/callback/Makefile
Michael Schaller 85037c3a33 [Go] Updated the 'callback' and 'extend' examples to match the 'director' one.
After the documentation update on how to utilize the director feature with
commit @17b1c1c the 'callback' and 'extend' examples needed an update as well.
2015-08-09 14:37:16 +02:00

24 lines
757 B
Makefile

TOP = ../..
SWIG = $(TOP)/../preinst-swig
CXXSRCS = callback.cxx
GOSRCS = gocallback.go
TARGET = example
INTERFACE = example.i
SWIGOPT =
check: build
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
build:
if [ -n '$(SRCDIR)' ]; then \
cp $(GOSRCS:%=$(SRCDIR)/%) .; \
fi
@# Note: example.go gets generated by SWIG
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' GOSRCS='example.go $(GOSRCS)' \
SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_cpp
clean:
if [ -n '$(SRCDIR)' ]; then \
rm $(GOSRCS) || true; \
fi
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' go_clean