Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
diana:windows:building:shapefile [2010-02-26 10:58:58] dages created |
diana:windows:building:shapefile [2022-05-31 09:29:31] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
First, get the latest source from http:// | First, get the latest source from http:// | ||
- | This library does not have a build system to speak of. The Makefile is so broken it's not even funny. | + | This library does not have a build system to speak of. The Makefile is so broken it's not even funny. |
- | | + | |
+ | |||
+ | SHPLIB_VERSION = 1.2.10 | ||
+ | |||
+ | | ||
+ | CFLAGS ?= -O2 -pipe | ||
+ | INSTALL ?= install -c -p -m 644 | ||
+ | LD ?= ld | ||
+ | LIBTOOL ?= libtool | ||
+ | MKDIR ?= install -d -m 755 | ||
+ | SED ?= sed | ||
+ | |||
+ | | ||
+ | |||
+ | LIBNAME = libshp | ||
+ | SOURCES = shpopen.c shptree.c dbfopen.c | ||
+ | |||
+ | LA = $(LIBNAME).la | ||
+ | LAI = .libs/$(LIBNAME).lai | ||
+ | LO = $(SOURCES: | ||
+ | |||
+ | | ||
+ | |||
+ | $(LA): $(LO) | ||
+ | $(LIBTOOL) --tag=CC --mode=link $(LD) $(LDFLAGS) -o $@ $^ | ||
+ | |||
+ | | ||
+ | $(MKDIR) $(PREFIX)/ | ||
+ | $(LIBTOOL) --mode=install $(INSTALL) $(LA) $(PREFIX)/ | ||
+ | $(LIBTOOL) --mode=finish $(PREFIX)/ | ||
+ | $(MKDIR) $(PREFIX)/ | ||
+ | $(INSTALL) shapefil.h $(PREFIX)/ | ||
+ | |||
+ | clean: | ||
+ | -rm -f $(LA) $(LAI) $(LO) | ||
+ | -rm -rf .libs | ||
+ | |||
+ | .SUFFIXES: | ||
+ | .SUFFIXES: .c .lo .la .lai | ||
+ | |||
+ | .c.lo: | ||
+ | $(LIBTOOL) --tag=CC --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -DPACKAGE=\" | ||
+ | |||
+ | .la.lai: | ||
+ | sed -e " | ||
+ | (I would have uploaded it as an attachment, but dokuwiki won't let me) | ||
+ | Make sure your editor didn't mangle the indentation: | ||
+ | |||
+ | Note that if you downloaded a different version than 1.2.10, you should change the value of '' | ||
+ | |||
+ | Now you can simply build and install: | ||
+ | |||
+ | $ make CC=gcc PREFIX=/ | ||
+ | $ echo " | ||
+ | $ cat LICENSE.LGPL >>/ | ||