1# **********************************************************************
2# *
3# * PostGIS - Spatial Types for PostgreSQL
4# * http://postgis.net
5# * Copyright 2008 Mark Cave-Ayland
6# *
7# * This is free software; you can redistribute and/or modify it under
8# * the terms of the GNU General Public Licence. See the COPYING file.
9# *
10# **********************************************************************
11
12CC=@CC@
13CFLAGS= -I../liblwgeom @CPPFLAGS@ @CFLAGS@ @PGSQL_BE_CPPFLAGS@ @PROJ_CPPFLAGS@ @PICFLAGS@ @GETTEXT_CFLAGS@
14LDFLAGS=@GETTEXT_LDFLAGS@ @LIBINTL@
15
16YACC=@YACC@
17LEX=@LEX@
18
19# Standalone COMMON objects
20SA_OBJS = \
21	gserialized_gist.o \
22	lwgeom_transform.o \
23	lwgeom_cache.o \
24	lwgeom_pg.o \
25	shared_gserialized.o
26
27
28SA_HEADERS = \
29	lwgeom_pg.h \
30	lwgeom_transform.h \
31	lwgeom_cache.h \
32	gserialized_gist.h \
33	pgsql_compat.h
34
35all: libpgcommon.a
36
37# nothing to install or uninstall
38install uninstall:
39
40libpgcommon.a: $(SA_OBJS) $(SA_HEADERS)
41	ar rs libpgcommon.a $(SA_OBJS)
42
43maintainer-clean: clean
44
45clean:
46	$(MAKE) -C cunit clean
47	rm -f $(SA_OBJS)
48	rm -f $(NM_OBJS)
49	rm -f libpgcommon.a
50
51distclean: clean
52	$(MAKE) -C cunit distclean
53	rm -f Makefile
54
55check: check-unit
56
57check-regress:
58
59check-unit: libpgcommon.a
60	$(MAKE) -C cunit check
61
62# Command to build each of the .o files
63$(SA_OBJS): %.o: %.c
64	$(CC) $(CFLAGS) -c -o $@ $<
65
66$(SA_OBJS): ../postgis_config.h
67
68