summaryrefslogtreecommitdiff
path: root/Examples/go/extend/Makefile
blob: a9f2d8d7df69141c9b808abc26e6de902f61d0b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
TOP        = ../..
SWIG       = $(TOP)/../preinst-swig
CXXSRCS    = extend.cxx
GOSRCS     = ceo.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