1
MODULE_TOPDIR = ../../..
3
include $(MODULE_TOPDIR)/include/Make/Lib.make
5
# substitute OSX arch flags for wxpython
6
ifneq ($(MACOSX_ARCHS),)
7
CFLAGS := $(subst $(MACOSX_ARCHS),,$(CFLAGS)) $(MACOSX_ARCHS_WXPYTHON)
8
CXXFLAGS := $(subst $(MACOSX_ARCHS),,$(CXXFLAGS)) $(MACOSX_ARCHS_WXPYTHON)
9
LDFLAGS := $(subst $(MACOSX_ARCHS),,$(LDFLAGS)) $(MACOSX_ARCHS_WXPYTHON)
12
LIB_NAME = grass6_wxnviz
14
SHLIB = $(OBJDIR)/_$(LIB_NAME).so
16
ETCDIR = $(ETC)/wxpython
20
ifneq ($(USE_WXWIDGETS),)
21
ifneq ($(USE_PYTHON),)
22
ifneq ($(strip $(CXX)),)
23
ifneq ($(strip $(OPENGLLIB)),)
30
$(LIB_NAME).i: nviz.i nviz_types.i nviz.h
31
cat nviz.i nviz_types.i > $(LIB_NAME).i
32
echo "/* auto-generated swig typedef file */" >> $(LIB_NAME).i
33
cat nviz.h >> $(LIB_NAME).i
35
$(LIB_NAME).py: $(SHLIB)
37
$(SHLIB): $(LIB_NAME).i
38
python setup.py build_ext --swig=$(SWIG) --swig-opts=-c++ --build-lib=$(OBJDIR) --build-temp=$(OBJDIR)
40
.NOTPARALLEL: $(LIB_NAME).py $(LIB_NAME)_wrap.cpp
42
install_nviz: $(ETCDIR)/nviz/_$(LIB_NAME).so $(ETCDIR)/nviz/$(LIB_NAME).py
44
$(ETCDIR)/nviz/_$(LIB_NAME).so: $(SHLIB)
47
$(ETCDIR)/nviz/$(LIB_NAME).py: $(LIB_NAME).py