-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
451 lines (339 loc) · 14.2 KB
/
Makefile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
##############################################################################
#
# Keyspace Makefile
#
##############################################################################
all: release
##############################################################################
#
# Directories
#
##############################################################################
BASE_DIR = .
KEYSPACE_DIR = .
BIN_DIR = $(BASE_DIR)/bin
SCRIPT_DIR = $(BASE_DIR)/script
DIST_DIR = $(BASE_DIR)/dist
VERSION = `$(BASE_DIR)/script/version.sh 3 $(SRC_DIR)/Version.h`
VERSION_MAJOR = `$(BASE_DIR)/script/version.sh 1 $(SRC_DIR)/Version.h`
VERSION_MAJMIN = `$(BASE_DIR)/script/version.sh 3 $(SRC_DIR)/Version.h`
PACKAGE_NAME = keyspace-server
PACKAGE_DIR = $(BASE_DIR)/packages
PACKAGE_FILE = $(PACKAGE_NAME)-$(VERSION).deb
PACKAGE_REPOSITORY = /var/www/debian.scalien.com/
BUILD_ROOT = $(BASE_DIR)/build
SRC_DIR = $(BASE_DIR)/src
DEB_DIR = $(BUILD_ROOT)/deb
BUILD_DEBUG_DIR = $(BUILD_ROOT)/debug
BUILD_RELEASE_DIR = $(BUILD_ROOT)/release
INSTALL_BIN_DIR = /usr/local/bin
INSTALL_LIB_DIR = /usr/local/lib
INSTALL_INCLUDE_DIR = /usr/local/include/
##############################################################################
#
# Platform selector
#
##############################################################################
ifeq ($(shell uname),Darwin)
PLATFORM=Darwin
else
ifeq ($(shell uname),FreeBSD)
PLATFORM=Darwin
else
ifeq ($(shell uname),OpenBSD)
PLATFORM=Darwin
else
PLATFORM=Linux
endif
endif
endif
ARCH=$(shell arch)
export PLATFORM
PLATFORM_UCASE=$(shell echo $(PLATFORM) | tr [a-z] [A-Z])
export PLATFORM_UCASE
include Makefile.$(PLATFORM)
##############################################################################
#
# Compiler/linker options
#
##############################################################################
CC = gcc
CXX = g++
RANLIB = ranlib
DEBUG_CFLAGS = -g -DDEBUG #-pg
DEBUG_LDFLAGS = #-pg -lc_p
RELEASE_CFLAGS = -O2 #-g
LIBNAME = libkeyspaceclient
SONAME = $(LIBNAME).$(SOEXT).$(VERSION_MAJOR)
SOLIB = $(LIBNAME).$(SOEXT)
ALIB = $(LIBNAME).a
ifeq ($(BUILD), debug)
BUILD_DIR = $(BUILD_DEBUG_DIR)
CFLAGS = $(BASE_CFLAGS) $(DEBUG_CFLAGS)
CXXFLAGS = $(BASE_CXXFLAGS) $(DEBUG_CFLAGS)
LDFLAGS = $(BASE_LDFLAGS) $(DEBUG_LDFLAGS)
else
BUILD_DIR = $(BUILD_RELEASE_DIR)
CFLAGS = $(BASE_CFLAGS) $(RELEASE_CFLAGS)
CXXFLAGS = $(BASE_CXXFLAGS) $(RELEASE_CFLAGS)
LDFLAGS = $(BASE_LDFLAGS) $(RELEASE_LDFLAGS)
endif
##############################################################################
#
# Build rules
#
##############################################################################
include Makefile.dirs
include Makefile.objects
include Makefile.clientlib
KEYSPACE_LIBS =
SYSTEM_OBJECTS = \
$(BUILD_DIR)/System/Events/Scheduler.o \
$(BUILD_DIR)/System/IO/Endpoint.o \
$(BUILD_DIR)/System/IO/IOProcessor_$(PLATFORM).o \
$(BUILD_DIR)/System/IO/Socket.o \
$(BUILD_DIR)/System/Log.o \
$(BUILD_DIR)/System/Common.o \
OBJECTS = \
$(ALL_OBJECTS) \
$(BUILD_DIR)/Main.o
TEST_OBJECTS = \
$(BUILD_DIR)/Test/keyspace_client_test.o \
$(BUILD_DIR)/Test/KeyspaceClientTest.o
SWIG_WRAPPER_OBJECT = \
$(BUILD_DIR)/Application/Keyspace/Client/KeyspaceClientWrap.o
CLIENT_DIR = \
Application/Keyspace/Client
CLIENT_WRAPPER_FILES = \
$(SRC_DIR)/$(CLIENT_DIR)/keyspace_client.i \
$(SRC_DIR)/$(CLIENT_DIR)/KeyspaceClientWrap.h \
$(SRC_DIR)/$(CLIENT_DIR)/KeyspaceClientWrap.cpp
CLIENTLIBS = \
$(BIN_DIR)/$(ALIB) \
$(BIN_DIR)/$(SOLIB)
EXECUTABLES = \
$(BIN_DIR)/keyspaced \
$(BIN_DIR)/clienttest
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) -o $@ -c $<
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $<
$(BIN_DIR)/%.so: $(BIN_DIR)/%.a
$(CC) $(SOLINK) -o $@ $< $(SOLIBS)
# libraries
$(BIN_DIR)/$(ALIB): $(BUILD_DIR) $(CLIENTLIB_OBJECTS)
$(AR) -r $@ $(CLIENTLIB_OBJECTS)
$(RANLIB) $@
$(BIN_DIR)/$(SOLIB): $(BUILD_DIR) $(CLIENTLIB_OBJECTS)
$(CC) $(SOLINK) -o $@ $(CLIENTLIB_OBJECTS) $(LDFLAGS)
# python wrapper
PYTHON_DIR = python
PYTHON_LIB = _keyspace_client.so
PYTHON_CONFIG = python-config
PYTHON_CLIENT_DIR = \
$(CLIENT_DIR)/Python
PYTHON_CLIENT_WRAPPER = \
$(PYTHON_CLIENT_DIR)/keyspace_client_python
PYTHONLIB = \
$(BIN_DIR)/$(PYTHON_DIR)/$(PYTHON_LIB)
$(SRC_DIR)/$(PYTHON_CLIENT_WRAPPER).cpp: $(CLIENT_WRAPPER_FILES)
-swig -python -c++ -outdir $(SRC_DIR)/$(PYTHON_CLIENT_DIR) -o $@ -I$(SRC_DIR)/$(PYTHON_CLIENT_DIR) $(SRC_DIR)/$(CLIENT_DIR)/keyspace_client.i
$(BUILD_DIR)/$(PYTHON_CLIENT_WRAPPER).o: $(BUILD_DIR) $(SRC_DIR)/$(PYTHON_CLIENT_WRAPPER).cpp
$(CXX) $(CXXFLAGS) `$(PYTHON_CONFIG) --includes` -o $@ -c $(SRC_DIR)/$(PYTHON_CLIENT_WRAPPER).cpp
$(BIN_DIR)/$(PYTHON_DIR)/$(PYTHON_LIB): $(BIN_DIR)/$(ALIB) $(SWIG_WRAPPER_OBJECT) $(BUILD_DIR)/$(PYTHON_CLIENT_WRAPPER).o
-mkdir -p $(BIN_DIR)/$(PYTHON_DIR)
$(CXX) $(SWIG_LDFLAGS) -o $@ $(BUILD_DIR)/$(PYTHON_CLIENT_WRAPPER).o $(SWIG_WRAPPER_OBJECT) $(BIN_DIR)/$(ALIB)
-cp -rf $(SRC_DIR)/$(PYTHON_CLIENT_DIR)/keyspace.py $(BIN_DIR)/$(PYTHON_DIR)
-cp -rf $(SRC_DIR)/$(PYTHON_CLIENT_DIR)/keyspace_client.py $(BIN_DIR)/$(PYTHON_DIR)
# java wrapper
JAVA_DIR = java
JAVA_PACKAGE_DIR = com/scalien/keyspace
JAVA_PACKAGE = com.scalien.keyspace
JAVA_LIB = libkeyspace_client.$(SOEXT)
JAVA_JAR_FILE = keyspace.jar
JAVA_INCLUDE =
JAVA_CLIENT_DIR = \
$(CLIENT_DIR)/Java
JAVA_CLIENT_WRAPPER = \
$(JAVA_CLIENT_DIR)/keyspace_client_java
JAVALIB = \
$(BIN_DIR)/$(JAVA_DIR)/$(JAVA_JAR_FILE) $(BIN_DIR)/$(JAVA_DIR)/$(JAVA_LIB)
$(SRC_DIR)/$(JAVA_CLIENT_WRAPPER).cpp: $(CLIENT_WRAPPER_FILES)
-swig -java -c++ -package $(JAVA_PACKAGE) -outdir $(SRC_DIR)/$(JAVA_CLIENT_DIR) -o $@ -I$(SRC_DIR)/$(JAVA_CLIENT_DIR) $(SRC_DIR)/$(CLIENT_DIR)/keyspace_client.i
$(BUILD_DIR)/$(JAVA_CLIENT_WRAPPER).o: $(BUILD_DIR) $(SRC_DIR)/$(JAVA_CLIENT_WRAPPER).cpp
$(CXX) $(CXXFLAGS) $(JAVA_INCLUDE) -o $@ -c $(SRC_DIR)/$(JAVA_CLIENT_WRAPPER).cpp
$(BIN_DIR)/$(JAVA_DIR)/$(JAVA_LIB): $(BIN_DIR)/$(ALIB) $(SWIG_WRAPPER_OBJECT) $(BUILD_DIR)/$(JAVA_CLIENT_WRAPPER).o
-mkdir -p $(BIN_DIR)/$(JAVA_DIR)
$(CXX) $(SWIG_LDFLAGS) -o $@ $(BUILD_DIR)/$(JAVA_CLIENT_WRAPPER).o $(SWIG_WRAPPER_OBJECT) $(BIN_DIR)/$(ALIB)
$(BIN_DIR)/$(JAVA_DIR)/$(JAVA_JAR_FILE): $(SRC_DIR)/$(JAVA_CLIENT_WRAPPER).cpp
-mkdir -p $(BIN_DIR)/$(JAVA_DIR)/$(JAVA_PACKAGE_DIR)
-cp -rf $(SRC_DIR)/$(JAVA_CLIENT_DIR)/*.java $(BIN_DIR)/$(JAVA_DIR)/$(JAVA_PACKAGE_DIR)
-cd $(BIN_DIR)/$(JAVA_DIR) && javac $(JAVA_PACKAGE_DIR)/Client.java && jar cf $(JAVA_JAR_FILE) $(JAVA_PACKAGE_DIR)/*.class && rm -rf com
# php wrapper
PHP_DIR = php
PHP_LIB = keyspace_client.so
PHP_INCLUDE =
PHP_CONFIG = php-config
PHP_CLIENT_DIR = $(CLIENT_DIR)/PHP
PHP_CLIENT_WRAPPER = $(PHP_CLIENT_DIR)/keyspace_client_php
PHPLIB = $(BIN_DIR)/$(PHP_DIR)/$(PHP_LIB)
$(SRC_DIR)/$(PHP_CLIENT_WRAPPER).cpp: $(CLIENT_WRAPPER_FILES)
-swig -php5 -c++ -outdir $(SRC_DIR)/$(PHP_CLIENT_DIR) -o $@ -I$(SRC_DIR)/$(PHP_CLIENT_DIR) $(SRC_DIR)/$(CLIENT_DIR)/keyspace_client.i
-script/fix_swig_php.sh $(SRC_DIR)/$(PHP_CLIENT_DIR)
$(BUILD_DIR)/$(PHP_CLIENT_WRAPPER).o: $(BUILD_DIR) $(SRC_DIR)/$(PHP_CLIENT_WRAPPER).cpp
$(CXX) $(CXXFLAGS) $(PHP_INCLUDE) `$(PHP_CONFIG) --includes` -I$(SRC_DIR)/$(PHP_CLIENT_DIR) -o $@ -c $(SRC_DIR)/$(PHP_CLIENT_WRAPPER).cpp
$(BIN_DIR)/$(PHP_DIR)/$(PHP_LIB): $(BIN_DIR)/$(ALIB) $(SWIG_WRAPPER_OBJECT) $(BUILD_DIR)/$(PHP_CLIENT_WRAPPER).o
-mkdir -p $(BIN_DIR)/$(PHP_DIR)
$(CXX) $(SWIG_LDFLAGS) -o $@ $(BUILD_DIR)/$(PHP_CLIENT_WRAPPER).o $(SWIG_WRAPPER_OBJECT) $(BIN_DIR)/$(ALIB)
-cp -rf $(SRC_DIR)/$(PHP_CLIENT_DIR)/keyspace.php $(BIN_DIR)/$(PHP_DIR)
-cp -rf $(SRC_DIR)/$(PHP_CLIENT_DIR)/keyspace_client.php $(BIN_DIR)/$(PHP_DIR)
# ruby wrapper
RUBY_DIR = ruby
RUBY_LIB = keyspace_client.$(BUNDLEEXT)
RUBY_INCLUDE = -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/Headers/ -I/usr/include/ruby-1.9.0/ruby/ruby.h
RUBY_CLIENT_DIR = $(CLIENT_DIR)/Ruby
RUBY_CLIENT_WRAPPER = $(RUBY_CLIENT_DIR)/keyspace_client_ruby
RUBYLIB = $(BIN_DIR)/$(RUBY_DIR)/$(RUBY_LIB)
$(SRC_DIR)/$(RUBY_CLIENT_WRAPPER).cpp: $(CLIENT_WRAPPER_FILES)
-swig -ruby -c++ -outdir $(SRC_DIR)/$(RUBY_CLIENT_DIR) -o $@ -I$(SRC_DIR)/$(RUBY_CLIENT_DIR) $(SRC_DIR)/$(CLIENT_DIR)/keyspace_client.i
$(BUILD_DIR)/$(RUBY_CLIENT_WRAPPER).o: $(BUILD_DIR) $(SRC_DIR)/$(RUBY_CLIENT_WRAPPER).cpp
$(CXX) $(CXXFLAGS) $(RUBY_INCLUDE) -I$(SRC_DIR)/$(RUBY_CLIENT_DIR) -o $@ -c $(SRC_DIR)/$(RUBY_CLIENT_WRAPPER).cpp
$(BIN_DIR)/$(RUBY_DIR)/$(RUBY_LIB): $(BIN_DIR)/$(ALIB) $(SWIG_WRAPPER_OBJECT) $(BUILD_DIR)/$(RUBY_CLIENT_WRAPPER).o
-mkdir -p $(BIN_DIR)/$(RUBY_DIR)
$(CXX) $(SWIG_LDFLAGS) -o $@ $(BUILD_DIR)/$(RUBY_CLIENT_WRAPPER).o $(SWIG_WRAPPER_OBJECT) $(BIN_DIR)/$(ALIB)
-cp -rf $(SRC_DIR)/$(RUBY_CLIENT_DIR)/keyspace.rb $(BIN_DIR)/$(RUBY_DIR)
# perl wrapper
PERL_DIR = perl
PERL_LIB = keyspace_client.$(BUNDLEEXT)
PERL_INCLUDE = -I/opt/local/lib/perl5/5.8.9/darwin-2level/CORE/ -I/usr/lib/perl/5.10/CORE/
PERL_CLIENT_DIR = $(CLIENT_DIR)/Perl
PERL_CLIENT_WRAPPER = $(PERL_CLIENT_DIR)/keyspace_client_perl
PERLLIB = $(BIN_DIR)/$(PERL_DIR)/$(PERL_LIB)
$(SRC_DIR)/$(PERL_CLIENT_WRAPPER).cpp: $(CLIENT_WRAPPER_FILES)
-swig -perl -c++ -outdir $(SRC_DIR)/$(PERL_CLIENT_DIR) -o $@ -I$(SRC_DIR)/$(PERL_CLIENT_DIR) $(SRC_DIR)/$(CLIENT_DIR)/keyspace_client.i
$(BUILD_DIR)/$(PERL_CLIENT_WRAPPER).o: $(BUILD_DIR) $(SRC_DIR)/$(PERL_CLIENT_WRAPPER).cpp
$(CXX) $(CXXFLAGS) $(PERL_INCLUDE) -I$(SRC_DIR)/$(PERL_CLIENT_DIR) -o $@ -c $(SRC_DIR)/$(PERL_CLIENT_WRAPPER).cpp
$(BIN_DIR)/$(PERL_DIR)/$(PERL_LIB): $(BIN_DIR)/$(ALIB) $(SWIG_WRAPPER_OBJECT) $(BUILD_DIR)/$(PERL_CLIENT_WRAPPER).o
-mkdir -p $(BIN_DIR)/$(PERL_DIR)
$(CXX) $(SWIG_LDFLAGS) -o $@ $(BUILD_DIR)/$(PERL_CLIENT_WRAPPER).o $(SWIG_WRAPPER_OBJECT) $(BIN_DIR)/$(ALIB)
-cp -rf $(SRC_DIR)/$(PERL_CLIENT_DIR)/keyspace.pm $(BIN_DIR)/$(PERL_DIR)
-cp -rf $(SRC_DIR)/$(PERL_CLIENT_DIR)/keyspace_client.pm $(BIN_DIR)/$(PERL_DIR)
# executables
$(BIN_DIR)/keyspaced: $(BUILD_DIR) $(LIBS) $(OBJECTS)
$(CXX) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
$(BIN_DIR)/clienttest: $(BUILD_DIR) $(TEST_OBJECTS) $(BIN_DIR)/$(ALIB)
$(CXX) $(LDFLAGS) -o $@ $(TEST_OBJECTS) $(LIBS) $(BIN_DIR)/$(ALIB)
$(BIN_DIR)/bdbtool: $(BUILD_DIR) $(LIBS) $(ALL_OBJECTS) $(BUILD_DIR)/Application/Tools/BDBTool/BDBTool.o
$(CXX) $(LDFLAGS) -o $@ $(ALL_OBJECTS) $(LIBS) $(BUILD_DIR)/Application/Tools/BDBTool/BDBTool.o
##############################################################################
#
# Targets
#
##############################################################################
debug:
$(MAKE) targets BUILD="debug"
release:
$(MAKE) targets BUILD="release"
clienttest:
$(MAKE) targets BUILD="release"
clientlib:
$(MAKE) clientlibs BUILD="release"
pythonlib: $(BUILD_DIR) $(CLIENTLIBS) $(PYTHONLIB)
javalib: $(BUILD_DIR) $(CLIENTLIBS) $(JAVALIB)
phplib: $(BUILD_DIR) $(CLIENTLIBS) $(PHPLIB)
rubylib: $(BUILD_DIR) $(CLIENTLIBS) $(RUBYLIB)
perllib: $(BUILD_DIR) $(CLIENTLIBS) $(PERLLIB)
targets: $(BUILD_DIR) executables clientlibs
clientlibs: $(BUILD_DIR) $(CLIENTLIBS)
executables: $(BUILD_DIR) $(EXECUTABLES)
install: release
-cp -fr $(BIN_DIR)/$(ALIB) $(INSTALL_LIB_DIR)
-cp -fr $(BIN_DIR)/$(SOLIB) $(INSTALL_LIB_DIR)/$(SOLIB).$(VERSION)
-ln -sf $(INSTALL_LIB_DIR)/$(SOLIB).$(VERSION) $(INSTALL_LIB_DIR)/$(LIBNAME).$(SOEXT).$(VERSION_MAJOR)
-ln -sf $(INSTALL_LIB_DIR)/$(SOLIB).$(VERSION) $(INSTALL_LIB_DIR)/$(LIBNAME).$(SOEXT)
-cp -fr $(SRC_DIR)/Application/Keyspace/Client/keyspace_client.h $(INSTALL_INCLUDE_DIR)
-cp -fr $(BIN_DIR)/keyspaced $(INSTALL_BIN_DIR)
-cp -fr $(SCRIPT_DIR)/safe_keyspaced $(INSTALL_BIN_DIR)
uninstall:
-rm $(INSTALL_LIB_DIR)/$(ALIB)
-rm $(INSTALL_LIB_DIR)/$(SOLIB).$(VERSION)
-rm $(INSTALL_LIB_DIR)/$(SOLIB)
-rm $(INSTALL_INCLUDE_DIR)/Application/Keyspace/Client/keyspace_client.h
-rm $(INSTALL_BIN_DIR)/keyspaced
-rm $(INSTALL_BIN_DIR)/safe_keyspaced
##############################################################################
#
# Clean
#
##############################################################################
clean: clean-debug clean-release clean-libs clean-executables
-rm -rf $(BUILD_ROOT)
-rm -rf $(DEB_DIR)
clean-debug:
-rm -f $(BASE_DIR)/keyspace
-rm -r -f $(BUILD_DEBUG_DIR)
clean-release:
-rm -f $(BASE_DIR)/keyspace
-rm -r -f $(BUILD_RELEASE_DIR)
clean-libs: clean-pythonlib clean-phplib clean-javalib clean-rubylib clean-perllib
-rm $(CLIENTLIBS)
clean-pythonlib:
-rm $(BIN_DIR)/$(PYTHON_DIR)/*
clean-javalib:
-rm $(BUILD_DIR)/$(JAVA_CLIENT_DIR)/*
-rm -rf $(BIN_DIR)/$(JAVA_DIR)/*
clean-phplib:
-rm $(BUILD_DIR)/$(PHP_CLIENT_DIR)/*
-rm $(BIN_DIR)/$(PHP_DIR)/*
clean-rubylib:
-rm $(BUILD_DIR)/$(RUBY_CLIENT_DIR)/*
-rm $(BIN_DIR)/$(RUBY_DIR)/*
clean-perllib:
-rm $(BUILD_DIR)/$(PERL_CLIENT_DIR)/*
-rm $(BIN_DIR)/$(PERL_DIR)/*
clean-pythonlib-swig:
-rm $(SRC_DIR)/$(PYTHON_CLIENT_WRAPPER).cpp
clean-javalib-swig:
-rm $(SRC_DIR)/$(JAVA_CLIENT_WRAPPER).cpp
clean-phplib-swig:
-rm $(SRC_DIR)/$(PHP_CLIENT_WRAPPER).cpp
clean-rubylib-swig:
-rm $(SRC_DIR)/$(RUBY_CLIENT_WRAPPER).cpp
clean-perllib-swig:
-rm $(SRC_DIR)/$(PERL_CLIENT_WRAPPER).cpp
clean-swig: clean-pythonlib-swig clean-javalib-swig clean-phplib-swig clean-rubylib-swig clean-perllib-swig
clean-executables:
-rm $(EXECUTABLES)
clean-clientlib:
-rm $(TEST_OBJECTS)
-rm $(BIN_DIR)/clienttest
-rm $(BIN_DIR)/clientlib.a
distclean: clean distclean-libs
distclean-libs: distclean-keyspace
distclean-keyspace:
cd $(KEYSPACE_DIR); $(MAKE) distclean
##############################################################################
#
# Build packages
#
##############################################################################
deb: clean release
-$(SCRIPT_DIR)/mkcontrol.sh $(SCRIPT_DIR)/DEBIAN/control $(PACKAGE_NAME) $(VERSION) $(shell dpkg-architecture -qDEB_BUILD_ARCH)
-mkdir -p $(DEB_DIR)/etc/init.d
-mkdir -p $(DEB_DIR)/etc/default
-mkdir -p $(DEB_DIR)/usr/bin
-cp -fr $(SCRIPT_DIR)/DEBIAN $(DEB_DIR)
-cp -fr $(SCRIPT_DIR)/keyspace.conf $(DEB_DIR)/etc
-cp -fr $(SCRIPT_DIR)/keyspace $(DEB_DIR)/etc/init.d
-cp -fr $(SCRIPT_DIR)/default $(DEB_DIR)/etc/default/keyspace
-cp -fr $(SCRIPT_DIR)/safe_keyspaced $(DEB_DIR)/usr/bin
-cp -fr $(BIN_DIR)/keyspaced $(DEB_DIR)/usr/bin
-rm -f $(BUILD_ROOT)/.*
-mkdir -p $(DIST_DIR)
-rm -f $(DIST_DIR)/$(PACKAGE_FILE)
-cd $(DIST_DIR)
-fakeroot dpkg -b $(DEB_DIR) $(DIST_DIR)/$(PACKAGE_FILE)
deb-install: deb
-mkdir -p $(PACKAGE_REPOSITORY)/conf
-cp -fr $(SCRIPT_DIR)/debian-distributions $(PACKAGE_REPOSITORY)/conf/distributions
-reprepro -Vb $(PACKAGE_REPOSITORY) includedeb etch $(DIST_DIR)/$(PACKAGE_FILE)