1
# **********************************************************************
4
# * PostGIS - Spatial Types for PostgreSQL
5
# * http://postgis.refractions.net
6
# * Copyright 2008 Paul Ramsey, Mark Cave-Ayland
8
# * This is free software; you can redistribute and/or modify it under
9
# * the terms of the GNU General Public Licence. See the COPYING file.
11
# **********************************************************************
14
CFLAGS=-g -O2 -Wall -Wmissing-prototypes
16
CUNIT_LDFLAGS= -lcunit
23
# If we couldn't find the cunit library then display a helpful message
24
ifeq ($(CUNIT_LDFLAGS),)
25
all: requirements_not_met_cunit
26
check: requirements_not_met_cunit
29
# Build the unit tester
32
# Build and run the unit tester
38
# Build the main unit test executable
39
cu_tester: ../liblwgeom.a $(OBJS)
40
$(CC) -o $@ $(OBJS) ../liblwgeom.a -lm $(CUNIT_LDFLAGS)
42
# Command to build each of the .o files
44
$(CC) $(CFLAGS) $(CUNIT_CPPFLAGS) -c -o $@ $<
51
# Requirements message
52
requirements_not_met_cunit:
56
@echo "configure was unable to find CUnit which is required for unit testing."
57
@echo "In order to enable unit testing, you must install CUnit and then re-run configure."