source: subversion/applications/utils/mod_tile/Makefile @ 25781

Last change on this file since 25781 was 25777, checked in by jonb, 9 years ago

mod_tile: explicitly link renderd against pthread library

File size: 2.5 KB
Line 
1UNAME := $(shell uname)
2OSARCH= $(shell uname -m)
3
4APXS      = $(shell which apxs || which apxs2 || echo "need apxs"; exit 1)
5$(if $(wildcard $(APXS)),,$(error "cannot find apxs or apxs2")) 
6
7builddir     = .
8top_dir:=$(shell ${APXS} -q exp_installbuilddir)
9top_dir:=$(shell /usr/bin/dirname ${top_dir})
10
11top_srcdir   = ${top_dir}
12top_builddir = ${top_dir}
13
14include ${top_builddir}/build/special.mk
15
16CXX := g++
17CXXFLAGS += -Wall
18
19APACHECTL = $(shell which apachectl || which apache2ctl)
20EXTRA_CFLAGS = -I$(builddir)
21
22EXTRA_CPPFLAGS += -g -O2 -Wall
23
24all: local-shared-build renderd speedtest render_list render_old convert_meta render_expired
25
26install: ${DESTDIR}/etc/renderd.conf
27
28
29${DESTDIR}/etc/renderd.conf:
30ifeq ($(UNAME), Darwin)
31        cp renderd.conf ${DESTDIR}/etc/renderd.conf
32else
33        cp -u renderd.conf ${DESTDIR}/etc/renderd.conf
34endif
35
36
37clean:
38        rm -f *.o *.lo *.slo *.la .libs/*
39        rm -f renderd render_expired render_list speedtest render_old convert_meta
40        make -C iniparser3.0b veryclean
41
42RENDER_CPPFLAGS += -g -O2 -Wall
43RENDER_CPPFLAGS += -I/usr/local/include/mapnik -I/usr/local/include/
44RENDER_CPPFLAGS += $(shell freetype-config --cflags)
45
46RENDER_LDFLAGS += -g
47RENDER_LDFLAGS += -lpthread
48
49ifeq ($(OSARCH), x86_64)
50RENDER_LDFLAGS += -L/usr/local/lib64
51else
52RENDER_LDFLAGS += -L/usr/local/lib
53endif
54
55RENDER_LDFLAGS += -lmapnik -Liniparser3.0b -liniparser
56
57ifeq ($(UNAME), Darwin)
58RENDER_LDFLAGS += -licuuc -lboost_regex
59endif
60
61renderd: store.c daemon.c gen_tile.cpp dir_utils.c protocol.h render_config.h dir_utils.h store.h iniparser3.0b/libiniparser.a
62        $(CXX) -o $@ $^ $(RENDER_LDFLAGS) $(RENDER_CPPFLAGS)
63
64speedtest: render_config.h protocol.h dir_utils.c dir_utils.h
65
66render_list: render_config.h protocol.h dir_utils.c dir_utils.h render_list.c
67        $(CC) $(EXTRA_CPPFLAGS) -o $@ $^ -lpthread
68
69render_expired: render_config.h protocol.h dir_utils.c dir_utils.h render_expired.c
70        $(CC) $(EXTRA_CPPFLAGS) -o $@ $^ -lpthread
71
72render_old: render_config.h protocol.h dir_utils.c dir_utils.h render_old.c
73        $(CC) $(EXTRA_CPPFLAGS) -o $@ $^ -lpthread
74
75convert_meta: render_config.h protocol.h dir_utils.c dir_utils.h store.c
76
77iniparser: iniparser3.0b/libiniparser.a
78
79iniparser3.0b/libiniparser.a: iniparser3.0b/src/iniparser.c
80        make -C iniparser3.0b libiniparser.a
81
82MYSQL_CFLAGS += -g -O2 -Wall
83MYSQL_CFLAGS += $(shell mysql_config --cflags)
84
85MYSQL_LDFLAGS += $(shell mysql_config --libs)
86
87mysql2file: mysql2file.c
88        $(CC) $(MYSQL_CFLAGS) $(MYSQL_LDFLAGS) -o $@ $^
89
90deb:
91        debuild
92
93# Not sure why this is not created automatically
94.deps:
95        touch .deps
Note: See TracBrowser for help on using the repository browser.