[GRASS-SVN] r30686 - grass/trunk/gui/wxpython/vdigit
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Mar 22 00:47:10 EDT 2008
Author: glynn
Date: 2008-03-22 00:47:10 -0400 (Sat, 22 Mar 2008)
New Revision: 30686
Modified:
grass/trunk/gui/wxpython/vdigit/Makefile
Log:
Follow GRASS Makefile conventions
Use normal compilation rules from Rules.make
Modified: grass/trunk/gui/wxpython/vdigit/Makefile
===================================================================
--- grass/trunk/gui/wxpython/vdigit/Makefile 2008-03-22 04:09:37 UTC (rev 30685)
+++ grass/trunk/gui/wxpython/vdigit/Makefile 2008-03-22 04:47:10 UTC (rev 30686)
@@ -1,42 +1,35 @@
MODULE_TOPDIR = ../../..
-include $(MODULE_TOPDIR)/include/Make/Platform.make
include $(MODULE_TOPDIR)/include/Make/Lib.make
-CXXFLAGS += $(SHLIB_CFLAGS) $(GDALCFLAGS) $(PYTHONCFLAGS) $(WXWIDGETSCXXFLAGS)
+LIB_NAME = grass6_wxvdigit
+SOURCES := $(wildcard *.cpp) $(LIB_NAME)_wrap.cpp
+SHLIB_OBJS := $(patsubst %.cpp, $(OBJDIR)/%.o, $(SOURCES))
-LDFLAGS += $(SHLIB_LDFLAGS) -L$(ARCH_LIBDIR) $(VECTLIB) $(GISLIB) $(GDALLIBS) $(VEDITLIB) $(WXWIDGETSLIB) $(PYTHONLDFLAGS) -lgdi
+EXTRA_CFLAGS = $(SHLIB_CFLAGS) $(GDALCFLAGS) $(PYTHONCFLAGS) $(WXWIDGETSCXXFLAGS)
+EXTRA_LIBS = $(VECTLIB) $(GISLIB) $(GDALLIBS) $(VEDITLIB) $(WXWIDGETSLIB) $(PYTHONLDFLAGS) -lgdi
LOCAL_HEADERS = digit.h driver.h
-SOURCES = driver.cpp digit.cpp cats.cpp line.cpp vertex.cpp select.cpp grass6_wxvdigit_wrap.cpp
-OBJARCH = OBJ.$(ARCH)
-OBJ := $(patsubst %.cpp, $(OBJARCH)/%.o, $(SOURCES))
-
ETCDIR = $(ETC)/wxpython
-SHLIB = $(OBJARCH)/_grass6_wxvdigit$(SHLIB_SUFFIX)
+SHLIB = $(OBJDIR)/_$(LIB_NAME)$(SHLIB_SUFFIX)
-EXTRA_CLEAN_FILES = $(SHLIB) grass6_wxvdigit.i grass6_wxvdigit.py grass6_wxvdigit_wrap.cpp
+EXTRA_CLEAN_FILES = $(SHLIB) $(LIB_NAME).i $(LIB_NAME).py $(LIB_NAME)_wrap.cpp
default: install_vdigit
-grass6_wxvdigit.i: digit.i dig_types.i driver.h digit.h
- cat digit.i > grass6_wxvdigit.i
- cat dig_types.i >> grass6_wxvdigit.i
- echo "/* auto-generate swig typedef file */" >> grass6_wxvdigit.i
- cat driver.h >> grass6_wxvdigit.i
- cat digit.h >> grass6_wxvdigit.i
+$(LIB_NAME).i: digit.i dig_types.i driver.h digit.h
+ cat digit.i dig_types.i > $(LIB_NAME).i
+ echo "/* auto-generated swig typedef file */" >> $(LIB_NAME).i
+ cat driver.h digit.h >> $(LIB_NAME).i
-grass6_wxvdigit.py grass6_wxvdigit_wrap.cpp: grass6_wxvdigit.i
- $(SWIG) -c++ -python -shadow -o $@ $<
+$(LIB_NAME).py $(LIB_NAME)_wrap.cpp: $(LIB_NAME).i
+ $(SWIG) -c++ -python -shadow -o $(LIB_NAME)_wrap.cpp $<
-$(OBJARCH)/%.o: %.cpp $(LOCAL_HEADERS)
- $(CXX) $(CXXFLAGS) -c $< -o $@
+$(SHLIB): $(SHLIB_OBJS)
+ $(SHLIB_LD) -o $@ $(LDFLAGS) $^ $(EXTRA_LIBS)
-$(SHLIB): $(OBJ)
- $(SHLIB_LD) $(LDFLAGS) $(OBJ) -o $(SHLIB)
-
-install_vdigit: $(SHLIB) grass6_wxvdigit.py
+install_vdigit: $(SHLIB) $(LIB_NAME).py
$(INSTALL) $(SHLIB) $(ETCDIR)/vdigit/
- $(INSTALL_DATA) grass6_wxvdigit.py $(ETCDIR)/vdigit/
+ $(INSTALL_DATA) $(LIB_NAME).py $(ETCDIR)/vdigit/
More information about the grass-commit
mailing list