[GRASS-dev] Re: [GRASSGUI] trying to compile wxPython digitizer
woklist at kyngchaos.com
Sun Aug 19 20:23:54 CEST 2007
Ah, I missed a few points.
- this driver is loaded by python, not GRASS, so the library form is
probably correct. Though maybe not a library, but a "module" - OSX
has a distinction between libraries loaded by the system dyld, and
bundle modules loaded by programs (usually used for plugins). I
think Python does this. There should be a way to automatically do
this, but I think it involves using setup.py. (MapServer does this
for Python Mapscript)
- It's also C++, so the GRASS make system can't deal with it directly
(like r.terraflow). So it *does* need the manual compile and link
stuff in the makefile. But still can use GRASS make variables for
most of it.
- GRASS libraries should be specified with the makefile variables, ie
- the ARCH_DISTDIR include is in the makefile includes, so it doesn't
need to be here.
I started fiddling with it, then noticed this stuff. The SWIG stuff
should probably be separated into optional make targets, for the
developer side. Then the default make target will assume that these
SWIG bits are made.
On Aug 19, 2007, at 12:29 PM, William Kyngesburye wrote:
>> Makefile below ==========================
> [I'm responding to the OSX bit below, but felt I could answer some
> other questions also]
>> MODULE_TOPDIR = ../../..
>> include $(MODULE_TOPDIR)/include/Make/Lib.make
>> include $(MODULE_TOPDIR)/include/Make/Doxygen.make
>> >>>> NOTE: This seems to imply putting the source directory for
>> display_driver somewhere in the GRASS source tree, but I can't
>> figure out where it is supposed to go. I've tried putting it at
>> the root, in lib, and another place or two. My GRASS source tree
>> happens to be in /Users/cmbarton/grass_dev/grass6.
> MODULE_TOPDIR is the GRASS source top. Whereever you put the
> display driver source, the MODULE_TOPDIR = should backtrack to get
> to the source top.
> Someone else could probably answer off the top of their head, but a
> little poking around reveals: display/drivers in the GRASS source.
>> CFLAGS=-c -fpic -I/usr/include/python$(PYTHONVERSION) -I./ -I$
>> (ARCH_DISTDIR)/include `wx-config --cxxflags`
>> >>>> NOTE: My Python includes are in a completely different place.
>> I'm not sure what ARCH_DISTDIR refers to but am guessing that this
>> needs to be set to match each system.
> ARCH_DISTDIR is where binaries are built into, dist-[platform] off
> the grass top dir. The includes above (Lib.make, ...) should set
> all the necessary make variables for you.
>> LDFLAGS=-shared -L$(ARCH_LIBDIR) -lgrass_vect -lgrass_gis `wx-
>> config --libs`
>> >>>> NOTE: This may need to be changed for Mac OS X if I am
>> correctly remembering some discussions crossing the dev list.
> -dynamiclib for OSX. But whatever it is for a platform, this is
> already in the GRASS makefile parts that are included, so -shared/-
> dynamiclib should be left out here. But it looks like display
> drivers are built as programs anyways, not libraries. Try using
> the PNG driver makefile as an example.
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
"History is an illusion caused by the passage of time, and time is an
illusion caused by the passage of history."
- Hitchhiker's Guide to the Galaxy
More information about the grass-dev