Print this page
OS-2051 serial console login should set TERM appropriately
Split |
Close |
Expand all |
Collapse all |
--- old/src/Makefile
+++ new/src/Makefile
1 1 #
2 2 # Copyright (c) 2012, Joyent, Inc. All rights reserved.
3 3 #
4 4
5 5 include Makefile.defs
6 6
7 7 #
8 8 # ROOT is used only when building and running the below tools.
9 9 #
10 10 ROOT = $(PWD)/..
11 11 JSSTYLE = $(ROOT)/tools/jsstyle/jsstyle
12 12 JSLINT = $(ROOT)/tools/javascriptlint/build/install/jsl
13 13 CSTYLE = $(ROOT)/tools/cstyle
14 14
15 15 #
16 16 # Tool options
17 17 #
18 18 JSSTYLE_OPTS = -o indent=4,strict-indent=1,doxygen,unparenthesized-return=0,continuation-at-front=1,leading-right-paren-ok=1
19 19
20 20 JSSTYLE_OLDSKOOL_OPTS =
21 21
22 22 #
23 23 # Installation configuration. Note that DESTDIR in particular is also
24 24 # assumed to contain various build tools, headers, libraries, and other
25 25 # artifacts of the platform build from which we incorporate runtime
26 26 # dependency information. The default DESTDIR is for standalone builds
27 27 # only (i.e., without the rest of the platform) and is unlikely to work
28 28 # without extra effort; it is overridden when make is invoked in this
29 29 # subdirectory.
30 30 #
31 31 DESTDIR = ../proto
32 32
33 33 #
34 34 # DESTNAME is used for the manifest target. We set it to something
35 35 # obvious here so that if it's not set, the manifest target doesn't do
36 36 # bad things.
37 37 #
38 38 DESTNAME = live.manifest
39 39
40 40 SMARTDCBINDIR = $(DESTDIR)/smartdc/bin
41 41 SMARTDCLIBDIR = $(DESTDIR)/smartdc/lib
42 42
43 43 #
44 44 # Per-target variable definitions go here. See Makefile.defs and the targets
45 45 # below and in Makefile.targ to see what's useful to append to or override.
46 46 # If you need to create your own target anyway, you can either modify
47 47 # variables here or incorporate your changes directly into the target; we
48 48 # prefer modifying the generic variable to the extent that the change fits
49 49 # naturally with an existing one so that we can pick up general changes in
50 50 # Makefile.defs even for custom targets.
51 51 #
52 52 bootparams : LIBS += -ldevinfo
53 53 bootparams : WARN_FLAGS += -Wno-unused
54 54 diskinfo : LIBS += -ldladm -ldiskmgt -lnvpair
55 55 zfs_recv : LIBS += -lsocket
56 56 zfs_send : LIBS += -lsocket
57 57 vmbundle : CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
58 58 sdc-on-tty : CFLAGS += $(OPT_FLAG)
59 59 zoneevent : LIBS += -lnvpair -lsysevent
60 60
61 61 # These files will get run through jsstyle and jslint on 'make check'
62 62 JS_CHECK_TARGETS=\
63 63 node_modules/{system,onlyif}.js \
64 64 vm/sbin/*.js \
65 65 vm/node_modules/{qmp,VM,dladm}.js \
66 66 img/lib/*.js \
67 67 img/sbin/imgadm
68 68
69 69 JS_CHECK_OLDSKOOL_TARGETS = \
70 70 disklayout.js \
71 71 mkzpool.js \
72 72 node_modules/disklayout.js
73 73
74 74 # These files will get run through cstyle on 'make check'
75 75 C_CHECK_TARGETS=\
76 76 qemu-exec.c \
77 77 vmunbundle.c \
78 78 zfs_recv.c \
79 79 zfs_send.c \
80 80 zoneevent.c
81 81
82 82 #
83 83 # Generic flags we apply by default to everything.
84 84 #
85 85 CFLAGS += $(WARN_FLAGS)
86 86 CXXFLAGS = $(CFLAGS)
87 87
88 88 #
89 89 # Node native add-on patterns. For add-ons with a single source file in the
90 90 # root of the add-on tree and no headers of its own, follow the EXPAT.NODE
91 91 # pattern here and below in the targets. More complex examples (source
92 92 # subdirectory, headers, multiple C++ sources) follow; see associated comments
93 93 # if you are looking for a pattern to copy.
94 94 #
95 95 EXPAT_OBJDIR = node-expat/build/Release
96 96 EXPAT.NODE = $(EXPAT_OBJDIR)/node-expat.node
97 97
98 98 $(EXPAT.NODE) : WARN_FLAGS += -Wno-unused
99 99 $(EXPAT.NODE) : CPPFLAGS += $(NODE_CPPFLAGS)
100 100 $(EXPAT.NODE) : CXXFLAGS += $(NODE_CFLAGS)
101 101 $(EXPAT.NODE) : LDFLAGS += $(NODE_LDFLAGS)
102 102 $(EXPAT.NODE) : LIBS += -lexpat
103 103
104 104 #
105 105 # The kstat Node add-on follows the same pattern as EXPAT.NODE.
106 106 #
107 107 KSTAT_OBJDIR = node-kstat/build/Release
108 108 KSTAT.NODE = $(KSTAT_OBJDIR)/kstat.node
109 109
110 110 $(KSTAT.NODE) : WARN_FLAGS += -Wno-unused -Wno-write-strings -Wno-sign-compare
111 111 $(KSTAT.NODE) : CPPFLAGS += $(NODE_CPPFLAGS)
112 112 $(KSTAT.NODE) : CXXFLAGS += $(NODE_CFLAGS)
113 113 $(KSTAT.NODE) : LDFLAGS += $(NODE_LDFLAGS)
114 114 $(KSTAT.NODE) : LIBS += -lkstat
115 115
116 116 #
117 117 # The dtrace-provider add-on uses a combination of C, assembly and C++ files in
118 118 # multiple directories.
119 119 #
120 120 DTRACE_PROVIDER_OBJDIR = node-dtrace-provider/build/Release
121 121 DTRACE_PROVIDER_SRCDIR = node-dtrace-provider
122 122 DTRACE_PROVIDER.NODE = $(DTRACE_PROVIDER_OBJDIR)/dtrace-provider.node
123 123
124 124 DTRACE_PROVIDER_SRCS += \
125 125 dtrace_probe.cc \
126 126 dtrace_provider.cc
127 127
128 128 DTRACE_PROVIDER_LIBUSDT_SRCS += \
129 129 libusdt/usdt.c \
130 130 libusdt/usdt_dof_file.c \
131 131 libusdt/usdt_probe.c \
132 132 libusdt/usdt_dof.c \
133 133 libusdt/usdt_dof_sections.c
134 134
135 135 DTRACE_PROVIDER_LIBUSDT_ASM_SRCS += \
136 136 libusdt/usdt_tracepoints_i386.s
137 137
138 138 DTRACE_PROVIDER_HDRS += \
139 139 node-dtrace-provider/dtrace_provider.h \
140 140 node-dtrace-provider/libusdt/usdt_internal.h \
141 141 node-dtrace-provider/libusdt/usdt.h
142 142
143 143 DTRACE_PROVIDER_OBJS += \
144 144 $(DTRACE_PROVIDER_SRCS:%.cc=$(DTRACE_PROVIDER_OBJDIR)/%.o) \
145 145 $(DTRACE_PROVIDER_LIBUSDT_SRCS:%.c=$(DTRACE_PROVIDER_OBJDIR)/%.o) \
146 146 $(DTRACE_PROVIDER_LIBUSDT_ASM_SRCS:%.s=$(DTRACE_PROVIDER_OBJDIR)/%.o)
147 147
148 148 $(DTRACE_PROVIDER.NODE) : WARN_FLAGS += -Wno-unused -Wno-sign-compare
149 149 $(DTRACE_PROVIDER.NODE) : CFLAGS += $(NODE_CFLAGS)
150 150 $(DTRACE_PROVIDER.NODE) : CPPFLAGS += \
151 151 $(NODE_CPPFLAGS) \
152 152 -Inode-dtrace-provider/libusdt
153 153 $(DTRACE_PROVIDER.NODE) : CXXFLAGS += $(NODE_CFLAGS)
154 154 $(DTRACE_PROVIDER.NODE) : LDFLAGS += $(NODE_LDFLAGS)
155 155
156 156 CLEANFILES += $(DTRACE_PROVIDER.NODE) $(DTRACE_PROVIDER_OBJS)
157 157
158 158 #
159 159 # The sqlite3 add-on uses a combination of C + C++ files in multiple
160 160 # directories, and has multiple header directories as well.
161 161 #
162 162 SQLITE3_OBJDIR = node-sqlite3/build/Release
163 163 SQLITE3_SRCDIR = node-sqlite3/src
164 164 SQLITE3_LIBSRCDIR = node-sqlite3/deps/sqlite3
165 165 SQLITE3_BINDINGS.NODE = $(SQLITE3_OBJDIR)/node_sqlite3.node
166 166
167 167 SQLITE3_SRCS += \
168 168 database.cc \
169 169 node_sqlite3.cc \
170 170 statement.cc
171 171
172 172 SQLITE3_LIBSRCS += sqlite3.c
173 173
174 174 SQLITE3_NODEHDRS += \
175 175 async.h \
176 176 macros.h \
177 177 statement.h \
178 178 threading.h
179 179
180 180 SQLITE3_LIBHDRS += \
181 181 sqlite3.h \
182 182 sqlite3ext.h
183 183
184 184 SQLITE3_OBJS = \
185 185 $(SQLITE3_SRCS:%.cc=$(SQLITE3_OBJDIR)/%.o) \
186 186 $(SQLITE3_LIBSRCS:%.c=$(SQLITE3_OBJDIR)/%.o)
187 187 SQLITE3_HDRS = \
188 188 $(SQLITE3_NODEHDRS:%=$(SQLITE3_SRCDIR)/%) \
189 189 $(SQLITE3_LIBHDRS:%=$(SQLITE3_LIBSRCDIR)/%)
190 190 CLEANFILES += $(SQLITE3_OBJS)
191 191
192 192 SQLITE3_FLAGS = \
193 193 -fdata-sections \
194 194 -ffunction-sections \
195 195 -fno-omit-frame-pointer \
196 196 -fno-strict-aliasing \
197 197 -fno-exceptions
198 198
199 199 $(SQLITE3_BINDINGS.NODE) : WARN_FLAGS = -Wall -Werror
200 200 $(SQLITE3_BINDINGS.NODE) : CPPFLAGS += \
201 201 $(NODE_CPPFLAGS) \
202 202 -I$(SQLITE3_LIBSRCDIR) \
203 203 -D_SQLITE_THREADSAFE=1 \
204 204 -D_SQLITE_ENABLE_FTS3 \
205 205 -D_SQLITE_ENABLE_RTREE \
206 206 -D_LARGEFILE_SOURCE \
207 207 -D_FILE_OFFSET_BITS=64 \
208 208 -D_REENTRANT \
209 209 -D_NDEBUG \
210 210 -D_POSIX_PTHREAD_SEMANTICS
211 211 $(SQLITE3_BINDINGS.NODE) : CFLAGS += \
212 212 $(NODE_CFLAGS) \
213 213 $(SQLITE3_FLAGS)
214 214 $(SQLITE3_BINDINGS.NODE) : LDFLAGS += \
215 215 $(NODE_LDFLAGS) \
216 216 -Wl,-soname=node_sqlite3.node
217 217 $(SQLITE3_BINDINGS.NODE) : LIBS += -lpthread
218 218
219 219 #
220 220 # The zsock add-on places its single source file in a subdirectory.
221 221 #
222 222 ZSOCK_OBJDIR = node-zsock/build/Release
223 223 ZSOCK_SRCDIR = node-zsock/src
224 224 ZSOCK_BINDINGS.NODE = $(ZSOCK_OBJDIR)/zsock_bindings.node
225 225
226 226 $(ZSOCK_BINDINGS.NODE) : WARN_FLAGS = -Wall -Werror
227 227 $(ZSOCK_BINDINGS.NODE) : CPPFLAGS += \
228 228 $(NODE_CPPFLAGS) \
229 229 -D_REENTRANT \
230 230 -D_POSIX_PTHREAD_SEMANTICS \
231 231 -D_XOPEN_SOURCE_EXTENDED=1 \
232 232 -D__EXTENSIONS__ \
233 233 -DSunOS
234 234 $(ZSOCK_BINDINGS.NODE) : CXXFLAGS += \
235 235 $(NODE_CFLAGS) \
236 236 -std=c++98
237 237 $(ZSOCK_BINDINGS.NODE) : LDFLAGS += $(NODE_LDFLAGS)
238 238 $(ZSOCK_BINDINGS.NODE) : LIBS += -lsocket -lnsl -lcontract
239 239
240 240 #
241 241 # The zutil add-on places its multiple source files in a subdirectory, and
242 242 # builds them against some headers that it also supplies and needs to depend on.
243 243 # Because we must build intermediate object files, this requires a
244 244 # different target pattern as well; see below.
245 245 #
246 246 ZUTIL_OBJDIR = node-zutil/build/Release
247 247 ZUTIL_SRCDIR = node-zutil/src
248 248 ZUTIL_BINDINGS.NODE = $(ZUTIL_OBJDIR)/zutil_bindings.node
249 249
250 250 ZUTIL_SRCS += \
251 251 zone.cc \
252 252 zonecfg.cc \
253 253 zutil_bindings.cc
254 254
255 255 ZUTIL_HDRS += \
256 256 zone.h \
257 257 zonecfg.h \
258 258 zutil_common.h
259 259
260 260 ZUTIL_BINDINGS_OBJS = $(ZUTIL_SRCS:%.cc=$(ZUTIL_OBJDIR)/%.o)
261 261 ZUTIL_BINDINGS_HDRS = $(ZUTIL_HDRS:%=$(ZUTIL_SRCDIR)/%)
262 262 CLEANFILES += $(ZUTIL_BINDINGS_OBJS)
263 263
264 264 $(ZUTIL_BINDINGS.NODE) : WARN_FLAGS += -Wno-unused
265 265 $(ZUTIL_BINDINGS.NODE) : CPPFLAGS += $(NODE_CPPFLAGS) -DSunOS
266 266 $(ZUTIL_BINDINGS.NODE) : CXXFLAGS += $(NODE_CFLAGS)
267 267 $(ZUTIL_BINDINGS.NODE) : LDFLAGS += $(NODE_LDFLAGS)
268 268 $(ZUTIL_BINDINGS.NODE) : LIBS += -lzonecfg
269 269
270 270 #
271 271 # List of targets. TARGETS, SMARTDC_TARGETS, and SMARTDC_LIB_TARGETS must
272 272 # include only those files that are safe to remove when the clean target is
273 273 # built.
274 274 #
275 275 TARGETS = \
276 276 bootparams \
277 277 diskinfo \
278 278 disklayout \
279 279 disklist \
280 280 disk_size \
281 281 mkzpool \
282 282 removable_disk \
283 283 vmunbundle \
284 284 zfs_recv \
↓ open down ↓ |
284 lines elided |
↑ open up ↑ |
285 285 zfs_send \
286 286 zoneevent \
287 287 $(EXPAT.NODE) \
288 288 $(DTRACE_PROVIDER.NODE) \
289 289 $(KSTAT.NODE) \
290 290 $(SYSLOG.NODE) \
291 291 $(SQLITE3_BINDINGS.NODE) \
292 292 $(ZSOCK_BINDINGS.NODE) \
293 293 $(ZUTIL_BINDINGS.NODE)
294 294
295 +USR_LIB_TARGETS = \
296 + measure_terminal
297 +
295 298 SMARTDC_TARGETS = \
296 299 qemu-exec
297 300
298 301 SMARTDC_LIB_TARGETS = \
299 302 sdc-on-tty
300 303
301 -all: $(TARGETS) sysinfo $(SMARTDC_TARGETS) $(SMARTDC_LIB_TARGETS)
304 +all: $(TARGETS) $(USR_LIB_TARGETS) sysinfo $(SMARTDC_TARGETS) \
305 + $(SMARTDC_LIB_TARGETS)
302 306
303 307 install: all
304 308 mkdir -p $(DESTDIR)/usr/bin
305 309 cp -p $(TARGETS) sysinfo $(DESTDIR)/usr/bin
310 + cp -p $(USR_LIB_TARGETS) sysinfo $(DESTDIR)/usr/lib
306 311 mkdir -p $(DESTDIR)/smartdc/bin
307 312 cp -p $(SMARTDC_TARGETS) $(DESTDIR)/smartdc/bin
308 313 mkdir -p $(DESTDIR)/smartdc/lib
309 314 cp -p $(SMARTDC_LIB_TARGETS) $(DESTDIR)/smartdc/lib
310 315 mkdir -m 0755 -p $(PREFIX_NODE)/node_modules
311 316 cp -Pr node_modules/* $(PREFIX_NODE)/node_modules
312 317 cp $(KSTAT.NODE) $(PREFIX_NODE)/node_modules/
313 318 rm -rf $(DESTDIR)/usr/vm
314 319 cp -PR vm $(DESTDIR)/usr/
315 320 mkdir -m 0755 -p $(DESTDIR)/usr/vm/node_modules
316 321 mkdir -p $(PREFIX_NODE)/node_modules/{zsock,zutil}/build/Release
317 322 mkdir -p $(DESTDIR)/usr/vm/test/tests
318 323 cp -Pr vm/common $(DESTDIR)/usr/vm/test/
319 324 cp -Pr vm/node-tap $(DESTDIR)/usr/vm/test/
320 325 cp -Pr vm/tests $(DESTDIR)/usr/vm/test/
321 326 cp vm/runtest $(DESTDIR)/usr/vm/test/
322 327 cp vm/runtests $(DESTDIR)/usr/vm/test/
323 328 cp -Pr node-zsock/{package.json,lib} \
324 329 $(PREFIX_NODE)/node_modules/zsock
325 330 cp -Pr node-zutil/{package.json,lib} \
326 331 $(PREFIX_NODE)/node_modules/zutil
327 332 cp $(SQLITE3_BINDINGS.NODE) \
328 333 $(PREFIX_NODE)/node_modules
329 334 (sed -e "s|var sqlite3.*;|var sqlite3 = module.exports = exports = require('./node_sqlite3');|" | \
330 335 sed -e "s|var trace = require.*;|var trace = require('./sqlite3_trace')|") \
331 336 < node-sqlite3/lib/sqlite3.js \
332 337 > $(PREFIX_NODE)/node_modules/sqlite3.js
333 338 cp node-sqlite3/lib/trace.js $(PREFIX_NODE)/node_modules/sqlite3_trace.js
334 339 cp $(ZSOCK_BINDINGS.NODE) \
335 340 $(PREFIX_NODE)/node_modules/zsock/build/Release
336 341 cp $(ZUTIL_BINDINGS.NODE) \
337 342 $(PREFIX_NODE)/node_modules/zutil/build/Release
338 343 cp $(EXPAT.NODE) $(PREFIX_NODE)/node_modules/expat_binding.node
339 344 cp $(DTRACE_PROVIDER.NODE) $(PREFIX_NODE)/node_modules/dtrace-provider.node
340 345 sed -e "s|require('./build.*DTraceProviderBindings')|require('/usr/node/node_modules/dtrace-provider.node')|" \
341 346 < $(DTRACE_PROVIDER_SRCDIR)/dtrace-provider.js \
342 347 > $(PREFIX_NODE)/node_modules/dtrace-provider.js
343 348 sed -e "s|var expat.*;|var expat = require('./expat_binding');|" \
344 349 < node-expat/lib/node-expat.js \
345 350 > $(PREFIX_NODE)/node_modules/node-expat.js
346 351 cp zoneevent $(DESTDIR)/usr/vm/sbin/zoneevent
347 352 cp zfs_send $(DESTDIR)/usr/vm/sbin/zfs_send
348 353 cp zfs_recv $(DESTDIR)/usr/vm/sbin/zfs_recv
349 354 cp vmunbundle $(DESTDIR)/usr/vm/sbin/vmunbundle
350 355 mkdir -p $(DESTDIR)/lib/svc/manifest/system
351 356 cp vm/smf/system-vmadmd.xml \
352 357 $(DESTDIR)/lib/svc/manifest/system/system-vmadmd.xml
353 358 cp vm/smf/system-metadata.xml \
354 359 $(DESTDIR)/lib/svc/manifest/system/system-metadata.xml
355 360 mv $(DESTDIR)/usr/vm/sbin/vmadmd.js $(DESTDIR)/usr/vm/sbin/vmadmd
356 361 mv $(DESTDIR)/usr/vm/sbin/vmadm.js $(DESTDIR)/usr/vm/sbin/vmadm
357 362 mv $(DESTDIR)/usr/vm/sbin/add-userscript.js \
358 363 $(DESTDIR)/usr/vm/sbin/add-userscript
359 364 mv $(DESTDIR)/usr/vm/sbin/metadata.js $(DESTDIR)/usr/vm/sbin/metadata
360 365 mkdir -p $(DESTDIR)/usr/share/man/man1
361 366 sed -e "s|require('dtrace-provider')|require('/usr/node/node_modules/dtrace-provider')|" \
362 367 < node-bunyan/lib/bunyan.js \
363 368 > $(PREFIX_NODE)/node_modules/bunyan.js
364 369 cp node-bunyan/docs/bunyan.1 $(DESTDIR)/usr/share/man/man1/bunyan.1
365 370 mkdir -p $(DESTDIR)/usr/bin
366 371 sed -e 's|^#!/usr/bin/env node.*$$|#!/usr/node/bin/node|' \
367 372 < node-bunyan/bin/bunyan \
368 373 > $(DESTDIR)/usr/bin/bunyan
369 374 cp node-panic/lib/panic.js $(PREFIX_NODE)/node_modules/panic.js
370 375 cp node-panic/lib/subr.js $(PREFIX_NODE)/node_modules/subr.js
371 376 rm -rf $(DESTDIR)/usr/img
372 377 mkdir -m 0755 -p $(DESTDIR)/usr/img
373 378 cp img/README.md $(DESTDIR)/usr/img/README.md
374 379 cp img/package.json $(DESTDIR)/usr/img/package.json
375 380 cp -PR img/etc $(DESTDIR)/usr/img/
376 381 cp -PR img/lib $(DESTDIR)/usr/img/
377 382 cp -PR img/man $(DESTDIR)/usr/img/
378 383 cp -PR img/node_modules $(DESTDIR)/usr/img/
379 384 cp -PR img/sbin $(DESTDIR)/usr/img/
380 385 cp -PR img/test $(DESTDIR)/usr/img/
381 386 rm -rf $(DESTDIR)/usr/fw
382 387 mkdir -m 0755 -p $(DESTDIR)/usr/fw
383 388 cp -PR fw/etc $(DESTDIR)/usr/fw/
384 389 cp -PR fw/lib $(DESTDIR)/usr/fw/
385 390 cp -PR fw/node_modules $(DESTDIR)/usr/fw/
386 391 cp -PR fw/sbin $(DESTDIR)/usr/fw/
387 392
388 393 check: $(JSLINT)
389 394 @echo "==> Running cstyle..."
390 395 @# cstyle doesn't echo as it goes so we add an echo to each line below
391 396 @(for file in $(C_CHECK_TARGETS); do \
392 397 echo $(PWD)/$$file; \
393 398 $(CSTYLE) $$file; \
394 399 done)
395 400 @printf "\nC files ok!\n"
396 401 @printf "\n==> Running JavaScriptLint...\n"
397 402 @$(JSLINT) --nologo --conf=$(ROOT)/tools/jsl.node.conf \
398 403 $(JS_CHECK_TARGETS) $(JS_CHECK_OLDSKOOL_TARGETS)
399 404 @printf "\n==> Running jsstyle...\n"
400 405 @# jsstyle doesn't echo as it goes so we add an echo to each line below
401 406 (for file in $(JS_CHECK_TARGETS); do \
402 407 echo $(PWD)/$$file; \
403 408 $(JSSTYLE) $(JSSTYLE_OPTS) $$file; \
404 409 [[ $$? == "0" ]] || exit 1; \
405 410 done)
406 411 (for file in $(JS_CHECK_OLDSKOOL_TARGETS); do \
407 412 echo $(PWD)/$$file; \
408 413 $(JSSTYLE) $(JSSTYLE_OLDSKOOL_OPTS) $$file; \
409 414 [[ $$? == "0" ]] || exit 1; \
410 415 done)
411 416 @printf "\nJS style ok!\n"
412 417
413 418 .PHONY: manifest
414 419 manifest:
415 420 (cat manifest && cd vm && \
416 421 echo "# list of tests is autogenerated by smartos-live/src/Makefile" && \
417 422 find tests/ -type f -exec echo "{}" "0444 root bin" \;) \
418 423 | sed -e "s|^tests/|f usr/vm/test/tests/|" \
419 424 > $(DESTDIR)/$(DESTNAME) \
420 425
421 426 $(JSLINT):
422 427 (cd $(ROOT); $(MAKE) jsl)
423 428
424 429 clean:
425 430 -rm -f $(TARGETS) $(SMARTDC_TARGETS) $(SMARTDC_LIB_TARGETS) *.o \
426 431 $(CLEANFILES)
427 432 -rm -rf node-sqlite3/build
428 433
429 434 include Makefile.targ
430 435
431 436 #
432 437 # Custom rules for building our various real targets follow. Generic rules
433 438 # belong in Makefile.targ.
434 439 #
435 440 disklayout: disklayout.js
436 441 cp disklayout.js disklayout
437 442 chmod 0755 disklayout
438 443
439 444 disklist: disklist.sh
440 445 cp disklist.sh disklist
441 446 chmod 0755 disklist
442 447
443 448 mkzpool: mkzpool.js
444 449 cp mkzpool.js mkzpool
445 450 chmod 0755 mkzpool
446 451
447 452 sysinfo:
448 453 touch sysinfo
449 454
450 455 #
451 456 # Node native add-on target patterns. Follow these patterns when adding a new
452 457 # add-on and see the comment and definitions for EXPAT.NODE above as well.
453 458 #
454 459 $(EXPAT.NODE): node-expat/node-expat.cc
455 460 @mkdir -p $(EXPAT_OBJDIR)
456 461 $(GXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
457 462
458 463 #
459 464 # The next two are used to build libusdt files into
460 465 # $(DTRACE_PROVIDER_OBJDIR)/libusdt/*.o, instead of building libusdt.a
461 466 #
462 467 $(DTRACE_PROVIDER_OBJDIR)/%.o: $(DTRACE_PROVIDER_SRCDIR)/%.c \
463 468 $(DTRACE_PROVIDER_HDRS)
464 469 @mkdir -p $(DTRACE_PROVIDER_OBJDIR)/libusdt
465 470 $(GCC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
466 471
467 472 $(DTRACE_PROVIDER_OBJDIR)/%.o: $(DTRACE_PROVIDER_SRCDIR)/%.s
468 473 @mkdir -p $(DTRACE_PROVIDER_OBJDIR)/libusdt
469 474 $(GCC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
470 475
471 476 $(DTRACE_PROVIDER_OBJDIR)/%.o: $(DTRACE_PROVIDER_SRCDIR)/%.cc \
472 477 $(DTRACE_PROVIDER_HDRS)
473 478 @mkdir -p $(DTRACE_PROVIDER_OBJDIR)
474 479 $(GXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ -c $<
475 480
476 481 $(DTRACE_PROVIDER.NODE): $(DTRACE_PROVIDER_OBJS)
477 482 @mkdir -p $(DTRACE_PROVIDER_OBJDIR)
478 483 $(GXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $(DTRACE_PROVIDER_OBJS) $(LIBS)
479 484
480 485 $(KSTAT.NODE): node-kstat/kstat.cc
481 486 @mkdir -p $(KSTAT_OBJDIR)
482 487 $(GXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
483 488
484 489 $(SQLITE3_OBJDIR)/%.o: $(SQLITE3_SRCDIR)/%.cc $(SQLITE3_HDRS)
485 490 @mkdir -p $(SQLITE3_OBJDIR)
486 491 $(GXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
487 492
488 493 $(SQLITE3_OBJDIR)/%.o: $(SQLITE3_LIBSRCDIR)/%.c $(SQLITE3_HDRS)
489 494 @mkdir -p $(SQLITE3_OBJDIR)
490 495 $(GCC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
491 496
492 497 $(SQLITE3_BINDINGS.NODE): $(SQLITE3_OBJS)
493 498 $(GXX) $(LDFLAGS) -o $@ $(SQLITE3_OBJS) $(LIBS)
494 499
495 500 $(ZSOCK_BINDINGS.NODE): $(ZSOCK_SRCDIR)/zsock.cc
496 501 @mkdir -p $(ZSOCK_OBJDIR)
497 502 $(GXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
498 503
499 504 #
500 505 # The zutil add-on requires a slightly more complex 2-phase build.
501 506 #
502 507 $(ZUTIL_OBJDIR)/%.o: $(ZUTIL_SRCDIR)/%.cc $(ZUTIL_BINDINGS_HDRS)
503 508 @mkdir -p $(ZUTIL_OBJDIR)
504 509 $(GXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
505 510
506 511 $(ZUTIL_BINDINGS.NODE): $(ZUTIL_BINDINGS_OBJS)
507 512 $(GXX) $(LDFLAGS) -o $@ $(ZUTIL_BINDINGS_OBJS) $(LIBS)
↓ open down ↓ |
192 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX