File: Makefile

package info (click to toggle)
postgis 2.5.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 75,792 kB
  • sloc: ansic: 139,314; sql: 136,281; xml: 48,954; sh: 4,906; perl: 4,509; makefile: 2,897; python: 1,198; yacc: 441; cpp: 305; lex: 132
file content (33 lines) | stat: -rw-r--r-- 780 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
CFLAGS += -g -Wall -O2 -pedantic -Wno-long-long -I$(shell pg_config --includedir-server)
CC = gcc
MODULE_FILENAME = $(PWD)/libWFS_locks.so

ifneq ($(findstring 7.1,$(shell pg_config --version)),)
	USE_VERSION=71
else
	ifneq ($(findstring 7.2,$(VERSION)),)
		USE_VERSION=72
	else
		ifneq ($(findstring 7.3,$(VERSION)),)
			USE_VERSION=73
		else
			ifneq ($(findstring 7.4,$(VERSION)),)
				USE_VERSION=74
			else
				USE_VERSION=80
			endif
		endif
	endif
endif


all: libWFS_locks.so WFS_locks.sql

libWFS_locks.so: WFS_locks.c
	$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $<

WFS_locks.sql: WFS_locks.sql.in
	cpp -P -traditional-cpp -DUSE_VERSION=$(USE_VERSION) $< | sed -e 's:@MODULE_FILENAME@:$(MODULE_FILENAME):g' | grep -v '^#' > $@

clean:
	rm -f libWFS_locks.so WFS_locks.sql