~ubuntu-branches/ubuntu/karmic/grass/karmic

« back to all changes in this revision

Viewing changes to gui/wxpython/nviz/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2009-07-13 13:34:03 UTC
  • mfrom: (3.1.15 karmic)
  • Revision ID: james.westby@ubuntu.com-20090713133403-0x81m7hb1q06zu13
Tags: 6.4.0~rc5-2
* Added a grass menu item (Hamish).
* Added a grass.menu.in template with related icon.
* Added a simple x-grass wrapper to allow running grass without a pre-running
  controlling terminal. At least it works within ordinary WMs launchers.
  (closes: #503371)
* Added newlocation.dpatch patch to manage correctly new locations.
  (closes: #533738)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
include $(MODULE_TOPDIR)/include/Make/Lib.make
4
4
 
5
 
SHLIB_LD = $(CXX) -shared
 
5
ifeq ($(findstring darwin,$(ARCH)),darwin)
 
6
ifneq ($(WX_ISOSX64BIT),1)
 
7
CFLAGS := $(subst -arch ppc64,,$(subst -arch x86_64,,$(CFLAGS)))
 
8
LDFLAGS := $(subst -arch ppc64,,$(subst -arch x86_64,,$(LDFLAGS)))
 
9
endif
 
10
endif
6
11
 
7
12
LIB_NAME = grass6_wxnviz
8
 
SOURCES := $(wildcard *.cpp) $(LIB_NAME)_wrap.cpp
9
 
SHLIB_OBJS := $(patsubst %.cpp, $(OBJDIR)/%.o, $(SOURCES))
10
 
 
11
 
EXTRA_CFLAGS = $(SHLIB_CFLAGS) $(GDALCFLAGS) $(PYTHONCFLAGS) $(WXWIDGETSCXXFLAGS) $(XCFLAGS) $(XMINC)
12
 
EXTRA_LIBS = $(GISLIB) $(OGSFLIB) $(NVIZLIB) $(OPENGLLIB) $(OPENGLULIB)
13
 
ifeq ($(findstring darwin,$(ARCH)),darwin)
14
 
EXTRA_LIBS := -bundle -undefined dynamic_lookup $(EXTRA_LIBS)
15
 
else
16
 
EXTRA_LIBS := $(PYTHONLDFLAGS) $(WXWIDGETSLIB) $(EXTRA_LIBS)
17
 
endif
18
 
 
19
 
LOCAL_HEADERS = nviz.h
 
13
 
 
14
SHLIB = $(OBJDIR)/_$(LIB_NAME).so
20
15
 
21
16
ETCDIR = $(ETC)/wxpython
22
17
 
23
 
SHLIB = $(OBJDIR)/_$(LIB_NAME).so
24
 
 
25
 
EXTRA_CLEAN_FILES = $(SHLIB) $(LIB_NAME).i $(LIB_NAME).py $(LIB_NAME)_wrap.cpp
26
 
 
27
18
default:
28
19
 
29
20
ifneq ($(USE_WXWIDGETS),)
41
32
        echo "/* auto-generated swig typedef file */" >> $(LIB_NAME).i
42
33
        cat nviz.h >> $(LIB_NAME).i
43
34
 
44
 
$(LIB_NAME).py $(LIB_NAME)_wrap.cpp: $(LIB_NAME).i
45
 
        $(SWIG) -c++ -python -shadow -o $(LIB_NAME)_wrap.cpp $<
46
 
 
47
 
$(SHLIB): $(SHLIB_OBJS)
48
 
ifeq ($(findstring darwin,$(ARCH)),darwin)
49
 
        $(CXX) -o $@ $(LDFLAGS) $^ $(EXTRA_LIBS)
50
 
else
51
 
        $(SHLIB_LD) -o $@ $(LDFLAGS) $^ $(EXTRA_LIBS)
52
 
endif
53
 
 
54
 
install_nviz:
55
 
        $(MAKE) $(ETCDIR)/nviz/_$(LIB_NAME).so $(ETCDIR)/nviz/$(LIB_NAME).py
 
35
$(LIB_NAME).py: $(SHLIB)
 
36
 
 
37
$(SHLIB): $(LIB_NAME).i
 
38
        python setup.py build_ext --swig=$(SWIG) --swig-opts=-c++ --build-lib=$(OBJDIR) --build-temp=$(OBJDIR)
 
39
 
 
40
.NOTPARALLEL: $(LIB_NAME).py $(LIB_NAME)_wrap.cpp
 
41
 
 
42
install_nviz: $(ETCDIR)/nviz/_$(LIB_NAME).so $(ETCDIR)/nviz/$(LIB_NAME).py
56
43
 
57
44
$(ETCDIR)/nviz/_$(LIB_NAME).so: $(SHLIB)
58
45
        $(INSTALL) $< $@
60
47
$(ETCDIR)/nviz/$(LIB_NAME).py: $(LIB_NAME).py
61
48
        $(INSTALL_DATA) $< $@
62
49
 
63
 
.PHONY: install_nviz
64