~ubuntu-branches/ubuntu/trusty/postgis/trusty-security

« back to all changes in this revision

Viewing changes to liblwgeom/cunit/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2009-12-11 13:10:34 UTC
  • mfrom: (1.1.9 upstream) (5.2.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20091211131034-wmsz69wxvt95pe5r
Tags: 1.4.0-2
* Upload to unstable.
* Better parameterized debian/rules against postgis $(VERSION).
* Added dblatex and libcunit1-dev among build-deps.
* Added postgis_comments.sql to contrib/ SQL templates.
* Dropping 8.3 support, no more supported for squeeze.
  (closes: #559587)
* Do not stop on error in postrm if the target dir does not exist.
  (closes: #560409)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# **********************************************************************
 
2
# * $Id: Makefile.in
 
3
# *
 
4
# * PostGIS - Spatial Types for PostgreSQL
 
5
# * http://postgis.refractions.net
 
6
# * Copyright 2008 Paul Ramsey, Mark Cave-Ayland
 
7
# *
 
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.
 
10
# *
 
11
# **********************************************************************
 
12
 
 
13
CC=gcc
 
14
CFLAGS=-g -O2  -Wall -Wmissing-prototypes
 
15
 
 
16
CUNIT_LDFLAGS= -lcunit
 
17
CUNIT_CPPFLAGS= -I..
 
18
 
 
19
OBJS=   cu_tester.o \
 
20
        cu_algorithm.o \
 
21
        cu_measures.o
 
22
 
 
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
 
27
else
 
28
 
 
29
# Build the unit tester
 
30
all: cu_tester
 
31
 
 
32
# Build and run the unit tester
 
33
check: cu_tester
 
34
        @./cu_tester
 
35
 
 
36
endif
 
37
 
 
38
# Build the main unit test executable
 
39
cu_tester: ../liblwgeom.a $(OBJS)
 
40
        $(CC) -o $@ $(OBJS) ../liblwgeom.a -lm $(CUNIT_LDFLAGS)
 
41
 
 
42
# Command to build each of the .o files
 
43
$(OBJS): %.o: %.c
 
44
        $(CC) $(CFLAGS) $(CUNIT_CPPFLAGS) -c -o $@ $<
 
45
 
 
46
# Clean target
 
47
clean:
 
48
        @rm $(OBJS)
 
49
        @rm cu_tester
 
50
 
 
51
# Requirements message
 
52
requirements_not_met_cunit:
 
53
        @echo
 
54
        @echo "WARNING:"
 
55
        @echo
 
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."
 
58
        @echo