Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 430 lines (373 sloc) 13.16 kB
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
1 #
2 # Copyright (c) 2012, Joyent, Inc. All rights reserved.
3 #
4
5 include Makefile.defs
6
7 #
8 # ROOT is used only when building and running the below tools.
9 #
10 ROOT = $(PWD)/..
11 JSSTYLE = $(ROOT)/tools/jsstyle/jsstyle
12 JSLINT = $(ROOT)/tools/javascriptlint/build/install/jsl
13 CSTYLE = $(ROOT)/tools/cstyle
14
15 #
16 # Tool options
17 #
6d04605 @joshwilsdon OS-1348 fix 'make check' target and also have it javascriptlint build…
joshwilsdon authored
18 JSSTYLE_OPTS = -o indent=4,strict-indent=1,doxygen,unparenthesized-return=0,continuation-at-front=1,leading-right-paren-ok=1
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
19
b80860d @wesolows STOR-26 Storage configuration with many disks should create sane RAID…
wesolows authored
20 JSSTYLE_OLDSKOOL_OPTS =
21
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
22 #
23 # Installation configuration. Note that DESTDIR in particular is also
24 # assumed to contain various build tools, headers, libraries, and other
25 # artifacts of the platform build from which we incorporate runtime
26 # dependency information. The default DESTDIR is for standalone builds
27 # only (i.e., without the rest of the platform) and is unlikely to work
28 # without extra effort; it is overridden when make is invoked in this
29 # subdirectory.
30 #
31 DESTDIR = ../proto
32
2efe68c @joshwilsdon OS-1362 move VM tests into the platform
joshwilsdon authored
33 #
34 # DESTNAME is used for the manifest target. We set it to something
35 # obvious here so that if it's not set, the manifest target doesn't do
36 # bad things.
37 #
38 DESTNAME = live.manifest
39
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
40 SMARTDCBINDIR = $(DESTDIR)/smartdc/bin
41 SMARTDCLIBDIR = $(DESTDIR)/smartdc/lib
42
43 #
44 # Per-target variable definitions go here. See Makefile.defs and the targets
45 # below and in Makefile.targ to see what's useful to append to or override.
46 # If you need to create your own target anyway, you can either modify
47 # variables here or incorporate your changes directly into the target; we
48 # prefer modifying the generic variable to the extent that the change fits
49 # naturally with an existing one so that we can pick up general changes in
50 # Makefile.defs even for custom targets.
51 #
52 bootparams : LIBS += -ldevinfo
53 bootparams : WARN_FLAGS += -Wno-unused
54 diskinfo : LIBS += -ldladm -ldiskmgt -lnvpair
55 zfs_recv : LIBS += -lsocket
56 zfs_send : LIBS += -lsocket
57 vmbundle : CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
58 sdc-on-tty : CFLAGS += $(OPT_FLAG)
59 zoneevent : LIBS += -lnvpair -lsysevent
7b183d4 @orlandov OS-913: Add metadata agent to illumos-live
orlandov authored
60
0b02de7 @joshwilsdon OS-1251 fix and restyle img* bits to pass jsstyle and jslint (with 'm…
joshwilsdon authored
61 # These files will get run through jsstyle and jslint on 'make check'
62 JS_CHECK_TARGETS=\
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
63 node_modules/{system,onlyif}.js \
64 vm/sbin/*.js \
65 vm/node_modules/{qmp,VM,dladm}.js \
66 img/node_modules/*.js \
67 img/sbin/imgadm
0b02de7 @joshwilsdon OS-1251 fix and restyle img* bits to pass jsstyle and jslint (with 'm…
joshwilsdon authored
68
b80860d @wesolows STOR-26 Storage configuration with many disks should create sane RAID…
wesolows authored
69 JS_CHECK_OLDSKOOL_TARGETS = \
70 disklayout.js \
71 mkzpool.js \
72 node_modules/disklayout.js
73
0b02de7 @joshwilsdon OS-1251 fix and restyle img* bits to pass jsstyle and jslint (with 'm…
joshwilsdon authored
74 # These files will get run through cstyle on 'make check'
75 C_CHECK_TARGETS=\
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
76 qemu-exec.c \
77 vmunbundle.c \
78 zfs_recv.c \
79 zfs_send.c \
80 zoneevent.c
0b02de7 @joshwilsdon OS-1251 fix and restyle img* bits to pass jsstyle and jslint (with 'm…
joshwilsdon authored
81
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
82 #
83 # Generic flags we apply by default to everything.
84 #
85 CFLAGS += $(WARN_FLAGS)
86 CXXFLAGS = $(CFLAGS)
7edf44a @joshwilsdon Initial import, moved from old illumos-extra repo.
joshwilsdon authored
87
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
88 #
89 # Node native add-on patterns. For add-ons with a single source file in the
90 # root of the add-on tree and no headers of its own, follow the EXPAT.NODE
91 # pattern here and below in the targets. More complex examples (source
92 # subdirectory, headers, multiple C++ sources) follow; see associated comments
93 # if you are looking for a pattern to copy.
94 #
95 EXPAT_OBJDIR = node-expat/build/Release
96 EXPAT.NODE = $(EXPAT_OBJDIR)/node-expat.node
97
98 $(EXPAT.NODE) : WARN_FLAGS += -Wno-unused
99 $(EXPAT.NODE) : CPPFLAGS += $(NODE_CPPFLAGS)
100 $(EXPAT.NODE) : CXXFLAGS += $(NODE_CFLAGS)
101 $(EXPAT.NODE) : LDFLAGS += $(NODE_LDFLAGS)
102 $(EXPAT.NODE) : LIBS += -lexpat
103
104 #
105 # The kstat Node add-on follows the same pattern as EXPAT.NODE.
106 #
107 KSTAT_OBJDIR = node-kstat/build/Release
108 KSTAT.NODE = $(KSTAT_OBJDIR)/kstat.node
109
110 $(KSTAT.NODE) : WARN_FLAGS += -Wno-unused -Wno-write-strings -Wno-sign-compare
111 $(KSTAT.NODE) : CPPFLAGS += $(NODE_CPPFLAGS)
112 $(KSTAT.NODE) : CXXFLAGS += $(NODE_CFLAGS)
113 $(KSTAT.NODE) : LDFLAGS += $(NODE_LDFLAGS)
114 $(KSTAT.NODE) : LIBS += -lkstat
115
116 #
117 # Likewise the syslog add-on.
118 #
119 SYSLOG_OBJDIR = node-syslog/build/Release
120 SYSLOG.NODE = $(SYSLOG_OBJDIR)/syslog.node
121
122 $(SYSLOG.NODE) : WARN_FLAGS += -Wno-unused
123 $(SYSLOG.NODE) : CPPFLAGS += $(NODE_CPPFLAGS)
124 $(SYSLOG.NODE) : CXXFLAGS += $(NODE_CFLAGS)
125 $(SYSLOG.NODE) : LDFLAGS += $(NODE_LDFLAGS)
126
127 #
d2c68d2 @joshwilsdon OS-1262 - fixed js files to handle changes required for running under…
joshwilsdon authored
128 # The sqlite3 add-on uses a combination of C + C++ files in multiple
129 # directories, and has multiple header directories as well.
130 #
131 SQLITE3_OBJDIR = node-sqlite3/build/Release
132 SQLITE3_SRCDIR = node-sqlite3/src
133 SQLITE3_LIBSRCDIR = node-sqlite3/deps/sqlite3
134 SQLITE3_BINDINGS.NODE = $(SQLITE3_OBJDIR)/node_sqlite3.node
135
136 SQLITE3_SRCS += \
137 database.cc \
138 node_sqlite3.cc \
139 statement.cc
140
141 SQLITE3_LIBSRCS += sqlite3.c
142
143 SQLITE3_NODEHDRS += \
144 async.h \
145 macros.h \
146 statement.h \
147 threading.h
148
149 SQLITE3_LIBHDRS += \
150 sqlite3.h \
151 sqlite3ext.h
152
153 SQLITE3_OBJS = \
154 $(SQLITE3_SRCS:%.cc=$(SQLITE3_OBJDIR)/%.o) \
155 $(SQLITE3_LIBSRCS:%.c=$(SQLITE3_OBJDIR)/%.o)
156 SQLITE3_HDRS = \
157 $(SQLITE3_NODEHDRS:%=$(SQLITE3_SRCDIR)/%) \
158 $(SQLITE3_LIBHDRS:%=$(SQLITE3_LIBSRCDIR)/%)
159 CLEANFILES += $(SQLITE3_OBJS)
160
161 SQLITE3_FLAGS = \
162 -fdata-sections \
163 -ffunction-sections \
164 -fno-omit-frame-pointer \
165 -fno-strict-aliasing \
166 -fno-exceptions
167
168 $(SQLITE3_BINDINGS.NODE) : WARN_FLAGS = -Wall -Werror
169 $(SQLITE3_BINDINGS.NODE) : CPPFLAGS += \
170 $(NODE_CPPFLAGS) \
171 -I$(SQLITE3_LIBSRCDIR) \
172 -D_SQLITE_THREADSAFE=1 \
173 -D_SQLITE_ENABLE_FTS3 \
174 -D_SQLITE_ENABLE_RTREE \
175 -D_LARGEFILE_SOURCE \
176 -D_FILE_OFFSET_BITS=64 \
177 -D_REENTRANT \
178 -D_NDEBUG \
179 -D_POSIX_PTHREAD_SEMANTICS
180 $(SQLITE3_BINDINGS.NODE) : CFLAGS += \
181 $(NODE_CFLAGS) \
182 $(SQLITE3_FLAGS)
183 $(SQLITE3_BINDINGS.NODE) : LDFLAGS += \
184 $(NODE_LDFLAGS) \
185 -Wl,-soname=node_sqlite3.node
186 $(SQLITE3_BINDINGS.NODE) : LIBS += -lpthread
187
188 #
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
189 # The zsock add-on places its single source file in a subdirectory.
190 #
191 ZSOCK_OBJDIR = node-zsock/build/Release
192 ZSOCK_SRCDIR = node-zsock/src
193 ZSOCK_BINDINGS.NODE = $(ZSOCK_OBJDIR)/zsock_bindings.node
194
195 $(ZSOCK_BINDINGS.NODE) : WARN_FLAGS = -Wall -Werror
196 $(ZSOCK_BINDINGS.NODE) : CPPFLAGS += \
197 $(NODE_CPPFLAGS) \
198 -D_REENTRANT \
199 -D_POSIX_PTHREAD_SEMANTICS \
200 -D_XOPEN_SOURCE_EXTENDED=1 \
201 -D__EXTENSIONS__ \
202 -DSunOS
203 $(ZSOCK_BINDINGS.NODE) : CXXFLAGS += \
204 $(NODE_CFLAGS) \
205 -std=c++98
206 $(ZSOCK_BINDINGS.NODE) : LDFLAGS += $(NODE_LDFLAGS)
207 $(ZSOCK_BINDINGS.NODE) : LIBS += -lsocket -lnsl -lcontract
3305569 @joshwilsdon OS-1005 build tests and include in output directory for CI to match p…
joshwilsdon authored
208
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
209 #
210 # The zutil add-on places its multiple source files in a subdirectory, and
211 # builds them against some headers that it also supplies and needs to depend on.
212 # Because we must build intermediate object files, this requires a
213 # different target pattern as well; see below.
214 #
215 ZUTIL_OBJDIR = node-zutil/build/Release
216 ZUTIL_SRCDIR = node-zutil/src
217 ZUTIL_BINDINGS.NODE = $(ZUTIL_OBJDIR)/zutil_bindings.node
7edf44a @joshwilsdon Initial import, moved from old illumos-extra repo.
joshwilsdon authored
218
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
219 ZUTIL_SRCS += \
220 zone.cc \
221 zonecfg.cc \
222 zutil_bindings.cc
223
224 ZUTIL_HDRS += \
225 zone.h \
226 zonecfg.h \
227 zutil_common.h
228
229 ZUTIL_BINDINGS_OBJS = $(ZUTIL_SRCS:%.cc=$(ZUTIL_OBJDIR)/%.o)
230 ZUTIL_BINDINGS_HDRS = $(ZUTIL_HDRS:%=$(ZUTIL_SRCDIR)/%)
231 CLEANFILES += $(ZUTIL_BINDINGS_OBJS)
232
233 $(ZUTIL_BINDINGS.NODE) : WARN_FLAGS += -Wno-unused
d2c68d2 @joshwilsdon OS-1262 - fixed js files to handle changes required for running under…
joshwilsdon authored
234 $(ZUTIL_BINDINGS.NODE) : CPPFLAGS += $(NODE_CPPFLAGS) -DSunOS
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
235 $(ZUTIL_BINDINGS.NODE) : CXXFLAGS += $(NODE_CFLAGS)
236 $(ZUTIL_BINDINGS.NODE) : LDFLAGS += $(NODE_LDFLAGS)
237 $(ZUTIL_BINDINGS.NODE) : LIBS += -lzonecfg
238
239 #
240 # List of targets. TARGETS, SMARTDC_TARGETS, and SMARTDC_LIB_TARGETS must
241 # include only those files that are safe to remove when the clean target is
242 # built.
243 #
244 TARGETS = \
245 bootparams \
246 diskinfo \
b80860d @wesolows STOR-26 Storage configuration with many disks should create sane RAID…
wesolows authored
247 disklayout \
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
248 disklist \
249 disk_size \
b80860d @wesolows STOR-26 Storage configuration with many disks should create sane RAID…
wesolows authored
250 mkzpool \
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
251 removable_disk \
252 vmunbundle \
253 zfs_recv \
254 zfs_send \
255 zoneevent \
256 $(EXPAT.NODE) \
257 $(KSTAT.NODE) \
258 $(SYSLOG.NODE) \
d2c68d2 @joshwilsdon OS-1262 - fixed js files to handle changes required for running under…
joshwilsdon authored
259 $(SQLITE3_BINDINGS.NODE) \
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
260 $(ZSOCK_BINDINGS.NODE) \
261 $(ZUTIL_BINDINGS.NODE)
262
263 SMARTDC_TARGETS = \
264 qemu-exec
265
266 SMARTDC_LIB_TARGETS = \
267 sdc-on-tty
268
2efe68c @joshwilsdon OS-1362 move VM tests into the platform
joshwilsdon authored
269 all: $(TARGETS) sysinfo $(SMARTDC_TARGETS) $(SMARTDC_LIB_TARGETS)
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
270
271 install: all
49ae444 @JohnSonnenschein [HEAD-627] illumos-live/src/Makefile uses pfexec to install. This bre…
JohnSonnenschein authored
272 mkdir -p $(DESTDIR)/usr/bin
273 cp -p $(TARGETS) sysinfo $(DESTDIR)/usr/bin
274 mkdir -p $(DESTDIR)/smartdc/bin
275 cp -p $(SMARTDC_TARGETS) $(DESTDIR)/smartdc/bin
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
276 mkdir -p $(DESTDIR)/smartdc/lib
277 cp -p $(SMARTDC_LIB_TARGETS) $(DESTDIR)/smartdc/lib
d2c68d2 @joshwilsdon OS-1262 - fixed js files to handle changes required for running under…
joshwilsdon authored
278 mkdir -m 0755 -p $(PREFIX_NODE)/node_modules
279 cp -Pr node_modules/* $(PREFIX_NODE)/node_modules
280 cp $(KSTAT.NODE) $(PREFIX_NODE)/node_modules/
281 cp $(SYSLOG.NODE) $(PREFIX_NODE)/node_modules/syslog.node
f93366a @joshwilsdon This commit rolls up the first version of a redesign I've been workin…
joshwilsdon authored
282 rm -rf $(DESTDIR)/usr/vm
283 cp -PR vm $(DESTDIR)/usr/
b1a52e5 @joshwilsdon OS-721 add node-expat to parse XML
joshwilsdon authored
284 mkdir -m 0755 -p $(DESTDIR)/usr/vm/node_modules
d2c68d2 @joshwilsdon OS-1262 - fixed js files to handle changes required for running under…
joshwilsdon authored
285 mkdir -p $(PREFIX_NODE)/node_modules/{zsock,zutil}/build/Release
2efe68c @joshwilsdon OS-1362 move VM tests into the platform
joshwilsdon authored
286 mkdir -p $(DESTDIR)/usr/vm/test/tests
287 cp -Pr vm/common $(DESTDIR)/usr/vm/test/
288 cp -Pr vm/node-tap $(DESTDIR)/usr/vm/test/
289 cp -Pr vm/tests $(DESTDIR)/usr/vm/test/
290 cp vm/runtest $(DESTDIR)/usr/vm/test/
291 cp vm/runtests $(DESTDIR)/usr/vm/test/
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
292 cp -Pr node-zsock/{package.json,lib} \
d2c68d2 @joshwilsdon OS-1262 - fixed js files to handle changes required for running under…
joshwilsdon authored
293 $(PREFIX_NODE)/node_modules/zsock
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
294 cp -Pr node-zutil/{package.json,lib} \
d2c68d2 @joshwilsdon OS-1262 - fixed js files to handle changes required for running under…
joshwilsdon authored
295 $(PREFIX_NODE)/node_modules/zutil
296 cp $(SQLITE3_BINDINGS.NODE) \
297 $(PREFIX_NODE)/node_modules
298 (sed -e "s|var sqlite3.*;|var sqlite3 = module.exports = exports = require('./node_sqlite3');|" | \
299 sed -e "s|var trace = require.*;|var trace = require('./sqlite3_trace')|") \
300 < node-sqlite3/lib/sqlite3.js \
301 > $(PREFIX_NODE)/node_modules/sqlite3.js
302 cp node-sqlite3/lib/trace.js $(PREFIX_NODE)/node_modules/sqlite3_trace.js
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
303 cp $(ZSOCK_BINDINGS.NODE) \
d2c68d2 @joshwilsdon OS-1262 - fixed js files to handle changes required for running under…
joshwilsdon authored
304 $(PREFIX_NODE)/node_modules/zsock/build/Release
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
305 cp $(ZUTIL_BINDINGS.NODE) \
d2c68d2 @joshwilsdon OS-1262 - fixed js files to handle changes required for running under…
joshwilsdon authored
306 $(PREFIX_NODE)/node_modules/zutil/build/Release
307 cp $(EXPAT.NODE) $(PREFIX_NODE)/node_modules/expat_binding.node
308 sed -e "s|var expat.*;|var expat = require('./expat_binding');|" \
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
309 < node-expat/lib/node-expat.js \
d2c68d2 @joshwilsdon OS-1262 - fixed js files to handle changes required for running under…
joshwilsdon authored
310 > $(PREFIX_NODE)/node_modules/node-expat.js
f93366a @joshwilsdon This commit rolls up the first version of a redesign I've been workin…
joshwilsdon authored
311 cp zoneevent $(DESTDIR)/usr/vm/sbin/zoneevent
96cc0ed @joshwilsdon OS-858 add experimental support for VM.send, VM.receive, VM.install t…
joshwilsdon authored
312 cp zfs_send $(DESTDIR)/usr/vm/sbin/zfs_send
313 cp zfs_recv $(DESTDIR)/usr/vm/sbin/zfs_recv
314 cp vmunbundle $(DESTDIR)/usr/vm/sbin/vmunbundle
f93366a @joshwilsdon This commit rolls up the first version of a redesign I've been workin…
joshwilsdon authored
315 mkdir -p $(DESTDIR)/lib/svc/manifest/system
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
316 cp vm/smf/system-vmadmd.xml \
317 $(DESTDIR)/lib/svc/manifest/system/system-vmadmd.xml
318 cp vm/smf/system-metadata.xml \
319 $(DESTDIR)/lib/svc/manifest/system/system-metadata.xml
f93366a @joshwilsdon This commit rolls up the first version of a redesign I've been workin…
joshwilsdon authored
320 mv $(DESTDIR)/usr/vm/sbin/vmadmd.js $(DESTDIR)/usr/vm/sbin/vmadmd
321 mv $(DESTDIR)/usr/vm/sbin/vmadm.js $(DESTDIR)/usr/vm/sbin/vmadm
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
322 mv $(DESTDIR)/usr/vm/sbin/add-userscript.js \
323 $(DESTDIR)/usr/vm/sbin/add-userscript
7b183d4 @orlandov OS-913: Add metadata agent to illumos-live
orlandov authored
324 mv $(DESTDIR)/usr/vm/sbin/metadata.js $(DESTDIR)/usr/vm/sbin/metadata
21d17f4 @joshwilsdon OS-1250 rename dsadm -> imgadm as we've settled on the name 'images' …
joshwilsdon authored
325 cp -PR img $(DESTDIR)/usr/
326 mkdir -m 0755 -p $(DESTDIR)/var/db/imgadm
c188df6 @joshwilsdon [OS-562] move vm tools into illumos-live repo from vmadm repo and mov…
joshwilsdon authored
327
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
328 check: $(JSLINT)
329 @echo "==> Running cstyle..."
6d04605 @joshwilsdon OS-1348 fix 'make check' target and also have it javascriptlint build…
joshwilsdon authored
330 @# cstyle doesn't echo as it goes so we add an echo to each line below
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
331 @(for file in $(C_CHECK_TARGETS); do \
6d04605 @joshwilsdon OS-1348 fix 'make check' target and also have it javascriptlint build…
joshwilsdon authored
332 echo $(PWD)/$$file; \
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
333 $(CSTYLE) $$file; \
334 done)
335 @printf "\nC files ok!\n"
336 @printf "\n==> Running JavaScriptLint...\n"
337 @$(JSLINT) --nologo --conf=$(ROOT)/tools/jsl.node.conf \
b80860d @wesolows STOR-26 Storage configuration with many disks should create sane RAID…
wesolows authored
338 $(JS_CHECK_TARGETS) $(JS_CHECK_OLDSKOOL_TARGETS)
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
339 @printf "\n==> Running jsstyle...\n"
6d04605 @joshwilsdon OS-1348 fix 'make check' target and also have it javascriptlint build…
joshwilsdon authored
340 @# jsstyle doesn't echo as it goes so we add an echo to each line below
b80860d @wesolows STOR-26 Storage configuration with many disks should create sane RAID…
wesolows authored
341 (for file in $(JS_CHECK_TARGETS); do \
6d04605 @joshwilsdon OS-1348 fix 'make check' target and also have it javascriptlint build…
joshwilsdon authored
342 echo $(PWD)/$$file; \
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
343 $(JSSTYLE) $(JSSTYLE_OPTS) $$file; \
6d04605 @joshwilsdon OS-1348 fix 'make check' target and also have it javascriptlint build…
joshwilsdon authored
344 [[ $$? == "0" ]] || exit 1; \
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
345 done)
b80860d @wesolows STOR-26 Storage configuration with many disks should create sane RAID…
wesolows authored
346 (for file in $(JS_CHECK_OLDSKOOL_TARGETS); do \
347 echo $(PWD)/$$file; \
348 $(JSSTYLE) $(JSSTYLE_OLDSKOOL_OPTS) $$file; \
349 [[ $$? == "0" ]] || exit 1; \
350 done)
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
351 @printf "\nJS style ok!\n"
b1a52e5 @joshwilsdon OS-721 add node-expat to parse XML
joshwilsdon authored
352
2efe68c @joshwilsdon OS-1362 move VM tests into the platform
joshwilsdon authored
353 .PHONY: manifest
354 manifest:
355 (cat manifest && cd vm && \
356 echo "# list of tests is autogenerated by smartos-live/src/Makefile" && \
357 find tests/ -type f -exec echo "{}" "0444 root bin" \;) \
358 | sed -e "s|^tests/|f usr/vm/test/tests/|" \
359 > $(DESTDIR)/$(DESTNAME) \
360
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
361 $(JSLINT):
362 (cd $(ROOT); $(MAKE) jsl)
13bf4f0 @joshwilsdon OS-766 add node-syslog (MIT license) from https://github.com/chrisdew…
joshwilsdon authored
363
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
364 clean:
365 -rm -f $(TARGETS) $(SMARTDC_TARGETS) $(SMARTDC_LIB_TARGETS) *.o \
366 $(CLEANFILES)
d2c68d2 @joshwilsdon OS-1262 - fixed js files to handle changes required for running under…
joshwilsdon authored
367 -rm -rf node-sqlite3/build
7b183d4 @orlandov OS-913: Add metadata agent to illumos-live
orlandov authored
368
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
369 include Makefile.targ
7b183d4 @orlandov OS-913: Add metadata agent to illumos-live
orlandov authored
370
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
371 #
372 # Custom rules for building our various real targets follow. Generic rules
373 # belong in Makefile.targ.
374 #
b80860d @wesolows STOR-26 Storage configuration with many disks should create sane RAID…
wesolows authored
375 disklayout: disklayout.js
376 cp disklayout.js disklayout
377 chmod 0755 disklayout
378
379 disklist: disklist.sh
4e042ff @JohnSonnenschein add disklist utility
JohnSonnenschein authored
380 cp disklist.sh disklist
381 chmod 0755 disklist
382
b80860d @wesolows STOR-26 Storage configuration with many disks should create sane RAID…
wesolows authored
383 mkzpool: mkzpool.js
384 cp mkzpool.js mkzpool
385 chmod 0755 mkzpool
386
fe5acab @joshwilsdon Include sysinfo in live image.
joshwilsdon authored
387 sysinfo:
388 touch sysinfo
389
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
390 #
391 # Node native add-on target patterns. Follow these patterns when adding a new
392 # add-on and see the comment and definitions for EXPAT.NODE above as well.
393 #
394 $(EXPAT.NODE): node-expat/node-expat.cc
395 @mkdir -p $(EXPAT_OBJDIR)
396 $(GXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
96cc0ed @joshwilsdon OS-858 add experimental support for VM.send, VM.receive, VM.install t…
joshwilsdon authored
397
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
398 $(KSTAT.NODE): node-kstat/kstat.cc
399 @mkdir -p $(KSTAT_OBJDIR)
400 $(GXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
96cc0ed @joshwilsdon OS-858 add experimental support for VM.send, VM.receive, VM.install t…
joshwilsdon authored
401
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
402 $(SYSLOG.NODE): node-syslog/syslog.cc
403 @mkdir -p $(SYSLOG_OBJDIR)
404 $(GXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
405
d2c68d2 @joshwilsdon OS-1262 - fixed js files to handle changes required for running under…
joshwilsdon authored
406 $(SQLITE3_OBJDIR)/%.o: $(SQLITE3_SRCDIR)/%.cc $(SQLITE3_HDRS)
407 @mkdir -p $(SQLITE3_OBJDIR)
408 $(GXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
409
410 $(SQLITE3_OBJDIR)/%.o: $(SQLITE3_LIBSRCDIR)/%.c $(SQLITE3_HDRS)
411 @mkdir -p $(SQLITE3_OBJDIR)
412 $(GCC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
413
414 $(SQLITE3_BINDINGS.NODE): $(SQLITE3_OBJS)
415 $(GXX) $(LDFLAGS) -o $@ $(SQLITE3_OBJS) $(LIBS)
416
fa1dcf1 @wesolows smartos-live#2 Fixed identation, spaces should be tabs
wesolows authored
417 $(ZSOCK_BINDINGS.NODE): $(ZSOCK_SRCDIR)/zsock.cc
418 @mkdir -p $(ZSOCK_OBJDIR)
419 $(GXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
420
421 #
422 # The zutil add-on requires a slightly more complex 2-phase build.
423 #
424 $(ZUTIL_OBJDIR)/%.o: $(ZUTIL_SRCDIR)/%.cc $(ZUTIL_BINDINGS_HDRS)
425 @mkdir -p $(ZUTIL_OBJDIR)
426 $(GXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
427
428 $(ZUTIL_BINDINGS.NODE): $(ZUTIL_BINDINGS_OBJS)
429 $(GXX) $(LDFLAGS) -o $@ $(ZUTIL_BINDINGS_OBJS) $(LIBS)
Something went wrong with that request. Please try again.