File: Makefile

package info (click to toggle)
openmama 2.2.2.1-10
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 32,064 kB
  • ctags: 34,353
  • sloc: cpp: 86,630; ansic: 78,639; java: 45,677; cs: 40,365; sh: 8,894; makefile: 1,397; python: 654; xml: 509; lex: 222
file content (129 lines) | stat: -rw-r--r-- 4,194 bytes parent folder | download | duplicates (2)
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
# $Id$
#
# OpenMAMA: The open middleware agnostic messaging API
# Copyright (C) 2011 NYSE Technologies, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
#

# Lots of semicolons used in command lines in this Makefile,
# by default the shell continues after errors, so we add this to
# ensure it stops when it should:
SHELL += -e

# Pick up the install directory as set by configure
PREFIX :=$(shell cat prefix.txt)

.PHONY: all docs mama mama-install mama-clean mamajni mamajni-install mamajni-clean\
		mamda mamda-install mamda-clean mamdajni mamdajni-install mamdajni-clean\
		common common-install common-clean test

all: common mama mamajni mamda mamdajni docs

install: common-install mama-install mamajni-install mamda-install mamdajni-install

clean: common-clean mama-clean mamajni-clean mamda-clean mamdajni-clean


#####################################################
# COMMON
#####################################################
common: 
	cd common/c_cpp ; make ; cd -

common-install:
	cd common/c_cpp ; make install -j1 -l80 ; cd -

common-clean:
	cd common/c_cpp ; make clean -j1 -l80 ; cd -


#####################################################
# MAMA
#####################################################
mama: common
	cd mama/c_cpp ; make ; cd -

mama-install: common-install
	cd mama/c_cpp ; make install -j1 -l80 ; cd -

mama-clean:
	cd mama/c_cpp ; make clean; cd -


#####################################################
# MAMAJNI
#####################################################
mamajni: mama
	cd mama/jni ; ant -f build.xml ; make ; cd -

mamajni-install: mama-install mamajni
	cd mama/jni ; ant -f build.xml ; make install -j1 -l80 ; cd -
	$(eval MAMAJNI_BUILD := mama/jni/$(shell ls -1 mama/jni | grep mamajni))
	cp $(MAMAJNI_BUILD)/lib/*.jar $(PREFIX)/lib
	mkdir -p $(PREFIX)/examples/mamajni
	cp $(MAMAJNI_BUILD)/examples/*.java $(PREFIX)/examples/mamajni

mamajni-clean: mama-clean
	cd mama/jni ; ant -f build.xml clean ; make clean ; cd -
	$(eval MAMAJNI_BUILD := mama/jni/$(shell ls -1 mama/jni | grep mamajni))
	rm -r $(MAMAJNI_BUILD)


#####################################################
# MAMDA
#####################################################
mamda: mama
	cd mamda/c_cpp ; make ; cd -

mamda-install: mama-install
	cd mamda/c_cpp ; make install -j1 -l80 ; cd -

mamda-clean: mama-clean
	cd mamda/c_cpp ; make clean; cd -


#####################################################
# MAMDAJAVA
#####################################################
mamdajni: mamajni
	cd mamda/java ; ant -f build.xml dist; cd -

mamdajni-install: mamajni-install
	cd mamda/java ; ant -f build.xml dist ; cd -
	$(eval MAMDAJNI_BUILD := mamda/java/mamda)
	cp $(MAMDAJNI_BUILD)/bin/* $(PREFIX)/bin
	cp $(MAMDAJNI_BUILD)/lib/*.jar $(PREFIX)/lib
	mkdir -p $(PREFIX)/examples/mamdajni
	cp -r $(MAMDAJNI_BUILD)/examples/com/wombat/mamda/examples/*.java $(PREFIX)/examples/mamdajni

mamdajni-clean: mamajni-clean
	cd mamda/java ; ant -f build.xml clean ; cd -
	$(eval MAMDAJNI_BUILD := mamda/java/mamda)
	rm -r $(MAMDAJNI_BUILD)


#####################################################
# DOCS
#####################################################
docs:
	echo "Building API Docs in mama"
	cd mama/c_cpp ; doxygen doxyconfig-c ; cd -
	cd mama/c_cpp ; doxygen doxyconfig-cpp ; cd -
	cd mama/jni ; ant -f build.xml -DwithDocs=true javadoc ; cd -
	echo "Building API Docs in mamda"
	cd mamda/c_cpp ; doxygen doxyconfig-cpp ; cd -
	cd mamda/java ; ant -f build.xml -DwithDocs=true javadoc ; cd -