gdp / Makefile @ master
History | View | Annotate | Download (5.97 KB)
1 | 055d3009 | Eric Allman | # |
---|---|---|---|
2 | # ----- BEGIN LICENSE BLOCK ----- |
||
3 | # GDP: Global Data Plane |
||
4 | # From the Ubiquitous Swarm Lab, 490 Cory Hall, U.C. Berkeley. |
||
5 | # |
||
6 | c87dd166 | Eric Allman | # Copyright (c) 2015-2019, Regents of the University of California. |
7 | 6bd5476b | Eric Allman | # All rights reserved. |
8 | 055d3009 | Eric Allman | # |
9 | 6bd5476b | Eric Allman | # Permission is hereby granted, without written agreement and without |
10 | # license or royalty fees, to use, copy, modify, and distribute this |
||
11 | # software and its documentation for any purpose, provided that the above |
||
12 | # copyright notice and the following two paragraphs appear in all copies |
||
13 | # of this software. |
||
14 | 055d3009 | Eric Allman | # |
15 | 6bd5476b | Eric Allman | # IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, |
16 | # SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST |
||
17 | # PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, |
||
18 | # EVEN IF REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||
19 | 055d3009 | Eric Allman | # |
20 | 6bd5476b | Eric Allman | # REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT |
21 | 055d3009 | Eric Allman | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
22 | 6bd5476b | Eric Allman | # FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, |
23 | # IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO |
||
24 | # OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, |
||
25 | # OR MODIFICATIONS. |
||
26 | 055d3009 | Eric Allman | # ----- END LICENSE BLOCK ----- |
27 | # |
||
28 | |||
29 | bd34b3a7 | Eric Allman | # DESTDIR is just for staging. LOCALROOT should be /usr or /usr/local. |
30 | DESTDIR= |
||
31 | LOCALROOT= /usr |
||
32 | INSTALLROOT= ${DESTDIR}${LOCALROOT} |
||
33 | 5e95f5f4 | Eric Allman | DOCROOT= ${INSTALLROOT}/share/doc/gdp |
34 | DOCDIR= ${DOCROOT}/`${ADM}/gdp-get-version.sh mm` |
||
35 | 06acf435 | Eric Allman | CLEANEXTRA= gdp-client*.deb gdp-server*.deb gdp-python*.deb \ |
36 | 7adbb63b | Eric Allman | README*.html \ |
37 | libs/*.a libs/*.so* libs/*.dylib \ |
||
38 | 29e6f6d0 | Christopher Brooks | |
39 | 646872a2 | Eric Allman | all: all-nodoc |
40 | |||
41 | all-nodoc: |
||
42 | 9d3867c0 | Eric Allman | (cd ep && ${MAKE} all) |
43 | (cd gdp && ${MAKE} all) |
||
44 | (cd gdplogd && ${MAKE} all) |
||
45 | (cd apps && ${MAKE} all) |
||
46 | (cd util && ${MAKE} all) |
||
47 | (cd examples && ${MAKE} all) |
||
48 | (cd scgilib && ${MAKE} all) |
||
49 | 47c6ea64 | Eric Allman | |
50 | 646872a2 | Eric Allman | all-withdoc: all-nodoc |
51 | 9d3867c0 | Eric Allman | (cd doc && ${MAKE} all) # needs pandoc |
52 | 646872a2 | Eric Allman | |
53 | all-clientonly: |
||
54 | 9d3867c0 | Eric Allman | (cd ep && ${MAKE} all) |
55 | (cd gdp && ${MAKE} all) |
||
56 | (cd apps && ${MAKE} all) |
||
57 | 646872a2 | Eric Allman | |
58 | 29e6f6d0 | Christopher Brooks | # Build without avahi, the zero-conf facility that |
59 | # can be tricky to compile under Mac OS X. |
||
60 | all_noavahi: |
||
61 | 9d3867c0 | Eric Allman | (cd ep && ${MAKE} all) |
62 | (cd gdp && ${MAKE} all_noavahi) |
||
63 | (cd scgilib && ${MAKE} all) |
||
64 | (cd gdplogd && ${MAKE} all_noavahi) |
||
65 | (cd apps && ${MAKE} all_noavahi) |
||
66 | (cd util && ${MAKE} all) |
||
67 | (cd examples && ${MAKE} all_noavahi) |
||
68 | 29e6f6d0 | Christopher Brooks | |
69 | 47c6ea64 | Eric Allman | clean: |
70 | 9d3867c0 | Eric Allman | (cd doc && ${MAKE} clean) |
71 | (cd ep && ${MAKE} clean) |
||
72 | (cd gdp && ${MAKE} clean) |
||
73 | (cd scgilib && ${MAKE} clean) |
||
74 | (cd gdplogd && ${MAKE} clean) |
||
75 | (cd apps && ${MAKE} clean) |
||
76 | (cd util && ${MAKE} clean) |
||
77 | (cd examples && ${MAKE} clean) |
||
78 | 7adbb63b | Eric Allman | rm -f ${CLEANEXTRA} |
79 | e18fea5e | Eric Allman | |
80 | 390904c6 | Eric Allman | # Install libraries needed to run (but not compile) applications |
81 | # (FIXME: this installs static as well as shared libraries) |
||
82 | install-lib: |
||
83 | c9ba48c9 | Eric Allman | (cd ep && ${MAKE} install-lib DESTDIR=${DESTDIR} LOCALROOT=${LOCALROOT}) |
84 | (cd gdp && ${MAKE} install-lib DESTDIR=${DESTDIR} LOCALROOT=${LOCALROOT}) |
||
85 | |||
86 | install-include: |
||
87 | (cd ep && ${MAKE} install-include DESTDIR=${DESTDIR} LOCALROOT=${LOCALROOT}) |
||
88 | (cd gdp && ${MAKE} install-include DESTDIR=${DESTDIR} LOCALROOT=${LOCALROOT}) |
||
89 | 390904c6 | Eric Allman | |
90 | 4006c00b | Eric Allman | # Install code used by GDP-based application developers (including old names). |
91 | # For the time being client installs include development files. |
||
92 | c9ba48c9 | Eric Allman | install-dev-c install-client: install-include install-lib |
93 | (cd gdp && ${MAKE} install DESTDIR=${DESTDIR} LOCALROOT=${LOCALROOT}) |
||
94 | 9d3867c0 | Eric Allman | (cd apps && ${MAKE} install DESTDIR=${DESTDIR} LOCALROOT=${LOCALROOT}) |
95 | 3ccf4025 | Nitesh Mor | |
96 | 2786071d | Eric Allman | # Install code used by the log server |
97 | 390904c6 | Eric Allman | install-gdplogd: install-lib |
98 | 9d3867c0 | Eric Allman | (cd gdplogd && ${MAKE} install DESTDIR=${DESTDIR} LOCALROOT=${LOCALROOT}) |
99 | (cd util && ${MAKE} install DESTDIR=${DESTDIR} LOCALROOT=${LOCALROOT}) |
||
100 | 3ccf4025 | Nitesh Mor | |
101 | 390904c6 | Eric Allman | # Install all documentation |
102 | 3ccf4025 | Nitesh Mor | install-doc: |
103 | 9d3867c0 | Eric Allman | (cd doc && ${MAKE} install DESTDIR=${DESTDIR} LOCALROOT=${LOCALROOT}) |
104 | 5e95f5f4 | Eric Allman | mkdir -p ${DOCDIR} |
105 | cp -rp examples ${DOCDIR} |
||
106 | 3ccf4025 | Nitesh Mor | |
107 | c9ba48c9 | Eric Allman | # Used only for language installs (???) |
108 | install-local: |
||
109 | (cd ep && ${MAKE} install-local DESTDIR=${DESTDIR} LOCALROOT=${LOCALROOT}) |
||
110 | (cd gdp && ${MAKE} install-local DESTDIR=${DESTDIR} LOCALROOT=${LOCALROOT}) |
||
111 | |||
112 | a0f9ebba | Nitesh Mor | # Split it into sub-targets to mimic our distribution, also |
113 | # used by the debian packaging scripts. So if you change it here, |
||
114 | # make sure you don't break the packaging. |
||
115 | 4006c00b | Eric Allman | install: install-dev-c install-gdplogd install-doc |
116 | bd34b3a7 | Eric Allman | |
117 | f33e594e | Eric Allman | GDPROOT= ~gdp |
118 | GDPALL= adm/start-* \ |
||
119 | adm/run-* \ |
||
120 | apps/gcl-create \ |
||
121 | apps/gdp-rest \ |
||
122 | 6e2cccae | Eric Allman | apps/gdp-reader \ |
123 | apps/gdp-writer \ |
||
124 | f33e594e | Eric Allman | gdplogd/gdplogd \ |
125 | |||
126 | a7ab7f37 | Eric Allman | CSRCS= ep/*.[ch] \ |
127 | gdp/*.[ch] \ |
||
128 | d7ad3b75 | Eric Allman | gdplogd/*.[ch] \ |
129 | a7ab7f37 | Eric Allman | scgilib/scgilib.[ch] \ |
130 | apps/*.[ch] \ |
||
131 | |||
132 | a194934d | Eric Allman | CTAGS= ctags |
133 | |||
134 | 910eb631 | Eric Allman | tags: .FORCE |
135 | d0da2db7 | Eric Allman | ${CTAGS} ${CSRCS} |
136 | 6123ed04 | Alec Dara-Abrams | |
137 | 910e16dc | Eric Allman | .FORCE: |
138 | |||
139 | 4006c00b | Eric Allman | # Install Python interface in system paths. Optional (including old name) |
140 | install-dev-python install-python: install-dev-c |
||
141 | 9d3867c0 | Eric Allman | (cd lang/python && $(MAKE) install) |
142 | 6df5f94d | Nitesh Mor | |
143 | 296eeac9 | Christopher Brooks | # Build the Java interface to the GDP. Optional for the GDP per se. |
144 | all_Java: |
||
145 | 9d3867c0 | Eric Allman | (cd lang/java && ${MAKE} clean all) |
146 | 296eeac9 | Christopher Brooks | |
147 | install_Java: |
||
148 | 9d3867c0 | Eric Allman | (cd lang/java && ${MAKE} clean install) |
149 | 296eeac9 | Christopher Brooks | |
150 | clean_Java: |
||
151 | 9d3867c0 | Eric Allman | (cd lang/java && ${MAKE} clean) |
152 | 296eeac9 | Christopher Brooks | |
153 | 6123ed04 | Alec Dara-Abrams | # Build the Node.js/JavaScript GDP accessing apps and the Node.js/JS |
154 | # RESTful GDP interface. Optional for the GDP per se. |
||
155 | all_JavaScript: |
||
156 | 9d3867c0 | Eric Allman | (cd lang/js && ${MAKE} clean all) |
157 | 6123ed04 | Alec Dara-Abrams | |
158 | clean_JavaScript: |
||
159 | 9d3867c0 | Eric Allman | (cd lang/js && ${MAKE} clean) |
160 | 968edcba | Eric Allman | |
161 | # Build the debian-style package. Must be done on the oldest system |
||
162 | # around because of dependencies. |
||
163 | |||
164 | 990d8ebf | Nitesh Mor | debian-package: all |
165 | adm/deb-pkg/client/package.sh |
||
166 | adm/deb-pkg/server/package.sh |
||
167 | lang/python/deb-pkg/package.sh |
||
168 | 34e05ead | Nitesh Mor | |
169 | 055d3009 | Eric Allman | |
170 | ADM= adm |
||
171 | UPDATE_LICENSE= ${ADM}/update-license.sh |
||
172 | 74c71346 | Eric Allman | GET_VERSION_INFO= ${ADM}/get-version-info.sh |
173 | 055d3009 | Eric Allman | |
174 | update-license: |
||
175 | ${UPDATE_LICENSE} Makefile *.[ch] |
||
176 | 9d3867c0 | Eric Allman | (cd ep && ${MAKE} update-license) |
177 | (cd gdp && ${MAKE} update-license) |
||
178 | (cd gdplogd && ${MAKE} update-license) |
||
179 | (cd apps && ${MAKE} update-license) |
||
180 | (cd doc && ${MAKE} update-license) |
||
181 | (cd lang && ${MAKE} update-license) |
||
182 | (cd test && ${MAKE} update-license) |
||
183 | (cd examples && ${MAKE} update-license) |
||
184 | (cd util && ${MAKE} update-license) |
||
185 | a5c5c509 | Eric Allman | |
186 | 74c71346 | Eric Allman | git-version.txt: .FORCE |
187 | ${GET_VERSION_INFO} > /dev/null |
||
188 | |||
189 | a5c5c509 | Eric Allman | # Not made by default |
190 | a194934d | Eric Allman | READMES_HTML= \ |
191 | README.html \ |
||
192 | README-admin.html \ |
||
193 | README-CAAPI.html \ |
||
194 | README-compiling.html \ |
||
195 | README-deb.html \ |
||
196 | README-developers.html \ |
||
197 | |||
198 | a5c5c509 | Eric Allman | PANDOC= pandoc |
199 | 7f982ac3 | Eric Allman | PANFLAGS= -s -c doc/gdpdoc.css |
200 | a5c5c509 | Eric Allman | |
201 | a194934d | Eric Allman | .SUFFIXES: .md .html |
202 | |||
203 | .md.html: |
||
204 | a5c5c509 | Eric Allman | ${PANDOC} ${PANFLAGS} -o $@ $< |
205 | 34e05ead | Nitesh Mor | |
206 | a194934d | Eric Allman | README_html: ${READMES_HTML} |