-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
472 lines (390 loc) · 15.9 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
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
#################################################################################
#
# Copyright (c) 2009, Ron Iovine, All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Ron Iovine nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY Ron Iovine ''AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL Ron Iovine BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
#################################################################################
#
# see if the correct c++ compiler is installed
#
CC=g++
ifneq ($(shell which $(CC)), /usr/bin/$(CC))
$(error $(nl)ERROR: Compiler $(CC) not installed)
endif
#
# see if the 'go' package is installed
#
GO=go
ifeq ($(shell which $(GO)), /usr/bin/$(GO))
BUILD_GO=y
else ifeq ($(shell which $(GO)), /usr/local/bin/$(GO))
BUILD_GO=y
else
$(warning $(nl)WARNING: 'go' not installed, not building 'go' modules)
endif
#
# we still use the older GOPATH method and not the new GO module method,
# set these 2 env variables to enable that
#
export GOPATH=$(abspath go)
export GO111MODULE=auto
GO_OPTIONS=install
SRC_EXT=cc
INCLUDE = -I$(abspath c/include)
ifeq ($(warnings), y)
WARNINGS = -Wall
else
WARNINGS = -w
endif
STATIC_OBJ = $(WARNINGS) -c
STATIC_LIB = ar rcs
ifeq ($(OS),Windows_NT)
SHARED_OBJ = $(WARNINGS) -c
CCFLAGS += -D WIN32
CLIENT_LIBS =
endif
ifeq ($(shell uname),Linux)
SHARED_OBJ = $(WARNINGS) -fPIC -c
CCFLAGS += -D LINUX
CLIENT_LIBS = -lnsl
endif
ifeq ($(shell uname),Darwin)
SHARED_OBJ = $(WARNINGS) -fPIC -c
CCFLAGS += -D OSX
CLIENT_LIBS =
endif
SHARED_LIB = $(CC) -shared -o
SRC_DIR = c/src
LIB_DIR = c/lib
BIN_DIR = c/bin
UTILS_DIR = utils
DEMO_DIR = c/demo
PSHELL_FLAGS =
TF_FLAGS =
TRACE_FLAGS =
CLIENT_FLAGS =
TRACE_FILTER_DEMO_FLAGS =
TRACE_LOG_DEMO_FLAGS =
PSHELL_SERVER_DEMO_LIBS = -L$(LIB_DIR) -lpshell-server -lpthread
PSHELL_CONTROL_DEMO_LIBS = -L$(LIB_DIR) -lpshell-control -lpshell-readline -lpthread
PSHELL_READLINE_DEMO_LIBS = -L$(LIB_DIR) -lpshell-readline
TRACE_FILTER_DEMO_LIBS = -L$(LIB_DIR) -lpshell-server -lpthread
TRACE_LOG_DEMO_LIBS = -L$(LIB_DIR) -lpshell-server -lpthread
VERBOSE = @
LOCAL =
SHELL_ENV_FILE =
#
# create a 'newline' for our error message
#
define nl
endef
#
# if our build-time configuration file, .config, does not exist, copy
# the default deconfig file to .config and proceed with the build
#
TARGET = $(MAKECMDGOALS)
ifneq ($(TARGET), )
ifeq (,$(wildcard .config))
$(info Build-time configuration file: '.config' not found)
$(info Copying 'defconfig' to '.config' for build)
ifeq (,$(wildcard defconfig))
$(error ERROR: Could not find file: 'defconfig')
else
$(shell cp defconfig .config)
endif
endif
endif
#
# pull in our build-time configuration file
#
-include .config
#
# PshellServer objects, we hardwire the PshellReadline into the PshellServer library
# and the PshellClient programs, we also create a separate stand-alone library for
# libpshell-readline for use by any other application needing user command line input
#
PSHELL_OBJS = PshellServer.o PshellReadline.o
#########################
#
# PshellServer flags
#
#########################
ifdef PSHELL_DEFAULT_TITLE
PSHELL_FLAGS += -DPSHELL_DEFAULT_TITLE=$(PSHELL_DEFAULT_TITLE)
endif
ifdef PSHELL_DEFAULT_BANNER
PSHELL_FLAGS += -DPSHELL_DEFAULT_BANNER=$(PSHELL_DEFAULT_BANNER)
endif
ifdef PSHELL_DEFAULT_PROMPT
PSHELL_FLAGS += -DPSHELL_DEFAULT_PROMPT=$(PSHELL_DEFAULT_PROMPT)
endif
ifdef PSHELL_DEFAULT_TIMEOUT
PSHELL_FLAGS += -DPSHELL_DEFAULT_TIMEOUT=$(PSHELL_DEFAULT_TIMEOUT)
endif
ifdef PSHELL_INCLUDE_COMMAND_IN_ARGS_LIST
PSHELL_FLAGS += -DPSHELL_INCLUDE_COMMAND_IN_ARGS_LIST
endif
ifdef CONFIG_PSHELL_CONFIG_DIR
PSHELL_FLAGS += -DCONFIG_PSHELL_CONFIG_DIR=$(CONFIG_PSHELL_CONFIG_DIR)
endif
ifdef CONFIG_PSHELL_STARTUP_DIR
PSHELL_FLAGS += -DCONFIG_PSHELL_STARTUP_DIR=$(CONFIG_PSHELL_STARTUP_DIR)
endif
ifdef CONFIG_PSHELL_BATCH_DIR
PSHELL_FLAGS += -DCONFIG_PSHELL_BATCH_DIR=$(CONFIG_PSHELL_BATCH_DIR)
endif
ifdef PSHELL_VSNPRINTF
PSHELL_FLAGS += -DPSHELL_VSNPRINTF
endif
ifdef PSHELL_PAYLOAD_CHUNK
PSHELL_FLAGS += -DPSHELL_PAYLOAD_CHUNK=$(PSHELL_PAYLOAD_CHUNK)
endif
ifdef PSHELL_PAYLOAD_GUARDBAND
PSHELL_FLAGS += -DPSHELL_PAYLOAD_GUARDBAND=$(PSHELL_PAYLOAD_GUARDBAND)
endif
ifdef PSHELL_GROW_PAYLOAD_IN_CHUNKS
PSHELL_FLAGS += -DPSHELL_GROW_PAYLOAD_IN_CHUNKS
endif
ifdef PSHELL_TOKEN_LIST_CHUNK
PSHELL_FLAGS += -DPSHELL_TOKEN_LIST_CHUNK=$(PSHELL_TOKEN_LIST_CHUNK)
endif
ifdef PSHELL_TOKEN_CHUNK
PSHELL_FLAGS += -DPSHELL_TOKEN_CHUNK=$(PSHELL_TOKEN_CHUNK)
endif
ifdef PSHELL_COMMAND_CHUNK
PSHELL_FLAGS += -DPSHELL_COMMAND_CHUNK=$(PSHELL_COMMAND_CHUNK)
endif
ifdef PSHELL_COPY_ADD_COMMAND_STRINGS
PSHELL_FLAGS += -DPSHELL_COPY_ADD_COMMAND_STRINGS
endif
ifdef PSHELL_INCLUDE_TRACE_FILTER
PSHELL_OBJS += TraceFilter.o
# the integrated trace module is dependent on the trace filter module,
# so only allow it to be included if the trace filter is also included
ifdef TF_INTEGRATED_TRACE_LOG
TF_FLAGS += -DTF_INTEGRATED_TRACE_LOG
TRACE_FLAGS += -DDYNAMIC_TRACE_FILTER
TRACE_FILTER_DEMO_FLAGS += -DDYNAMIC_TRACE_FILTER
PSHELL_OBJS += TraceLog.o
endif
else
# make sure we don't include the integrated trace module if we don't
# have the trace filter module
TF_INTEGRATED_TRACE_LOG=n
endif
#########################
#
# TraceFilter flags
#
#########################
ifdef TF_FAST_FILENAME_LOOKUP
TF_FLAGS += -DTF_FAST_FILENAME_LOOKUP
TRACE_FILTER_DEMO_FLAGS += -DTF_FAST_FILENAME_LOOKUP
endif
ifdef TF_MAX_TRACE_SYMBOLS
TF_FLAGS += -DTF_MAX_TRACE_SYMBOLS=$(TF_MAX_TRACE_SYMBOLS)
endif
ifdef TF_MAX_LINE_FILTERS
TF_FLAGS += -DTF_MAX_LINE_FILTERS=$(TF_MAX_LINE_FILTERS)
endif
ifdef TF_MAX_FILE_FILTERS
TF_FLAGS += -DTF_MAX_FILE_FILTERS=$(TF_MAX_FILE_FILTERS)
endif
ifdef TF_MAX_FUNCTION_FILTERS
TF_FLAGS += -DTF_MAX_FUNCTION_FILTERS=$(TF_MAX_FUNCTION_FILTERS)
endif
ifdef TF_MAX_THREAD_FILTERS
TF_FLAGS += -DTF_MAX_THREAD_FILTERS=$(TF_MAX_THREAD_FILTERS)
endif
ifdef TF_USE_COLORS
TF_FLAGS += -DTF_USE_COLORS
endif
#########################
#
# TraceLog flags
#
#########################
ifdef TRACE_LOG_DISABLED
TRACE_FILTER_DEMO_FLAGS += -DTRACE_LOG_DISABLED
TRACE_LOG_DEMO_FLAGS += -DTRACE_LOG_DISABLED
endif
ifeq ($(verbose), y)
VERBOSE =
endif
#
# make sure only 'root' can run 'make install'
#
USER = $(shell whoami)
ifeq ($(TARGET), install)
ifeq ($(local), y)
LOCAL = -local
ifneq ($(shellEnvFile), )
SHELL_ENV_FILE = $(shellEnvFile)
endif
else ifneq ($(USER), root)
$(error $(nl)ERROR: User '$(USER)' cannot run 'make install', $(nl) must be 'root' to do a system install of this package, $(nl) either run as 'root' or do 'make install local=y')
endif
endif
.PHONY: demo lib
###############
#
# targets
#
###############
help:
@echo
@echo "Usage: make {all | client | lib | demo | install | clean} [warnings=y] [verbose=y] [local=y [shellEnvFile=<file>]]"
@echo
@echo " where:"
@echo " all - build all components of the pshell package"
@echo " client - build the pshell UDP/UNIX stand-alone client programs only"
@echo " lib - build the pshell link libraries only (shared, static and stub)"
@echo " demo - build the pshell stand-alone demo programs only"
@echo " install - build and install all pshell components"
@echo " clean - clean all binaries (libs & executables)"
@echo " warnings - turn on all g++ compiler warnings, default=none"
@echo " verbose - print verbose messages from build process"
@echo " local - specify local install (install target only)"
@echo " shellEnvFile - shell env file (i.e. .bashrc) to modify for local install"
@echo
@echo " NOTE: The install target option will either install this package on a"
@echo " system wide basis or will setup a local install environment. A system"
@echo " install must be done as 'root' and will copy all libraries, binaries,"
@echo " include files, conf files, and manpages to their customary system"
@echo " locations. A local install will not copy/move any files. It will"
@echo " only create a pshell env file (.pshellrc) that can be sourced in the"
@echo " current shell or can be added to your shell env file (i.e. .bashrc)"
@echo " that will allow use of the package features from a local directory."
@echo
@echo " The location of the local install environment will be the directory"
@echo " where this script resides."
@echo
lib:
@echo "Building libpshell-server-full.a (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(PSHELL_FLAGS) $(STATIC_OBJ) $(SRC_DIR)/PshellServer.$(SRC_EXT) -o PshellServer.o
$(VERBOSE)$(CC) $(INCLUDE) $(STATIC_OBJ) $(SRC_DIR)/PshellReadline.$(SRC_EXT) -o PshellReadline.o
ifeq ($(PSHELL_INCLUDE_TRACE_FILTER), y)
$(VERBOSE)$(CC) $(INCLUDE) $(TF_FLAGS) $(STATIC_OBJ) $(SRC_DIR)/TraceFilter.$(SRC_EXT) -o TraceFilter.o
endif
ifeq ($(TF_INTEGRATED_TRACE_LOG), y)
$(VERBOSE)$(CC) $(INCLUDE) $(TRACE_FLAGS) $(STATIC_OBJ) $(SRC_DIR)/TraceLog.$(SRC_EXT) -o TraceLog.o
endif
$(VERBOSE)$(STATIC_LIB) $(LIB_DIR)/libpshell-server-full.a $(PSHELL_OBJS)
$(VERBOSE)rm *.o
@echo "Building libpshell-server-full.so (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(PSHELL_FLAGS) $(SHARED_OBJ) $(SRC_DIR)/PshellServer.$(SRC_EXT) -o PshellServer.o
$(VERBOSE)$(CC) $(INCLUDE) $(SHARED_OBJ) $(SRC_DIR)/PshellReadline.$(SRC_EXT) -o PshellReadline.o
ifeq ($(PSHELL_INCLUDE_TRACE_FILTER), y)
$(VERBOSE)$(CC) $(INCLUDE) $(TF_FLAGS) $(SHARED_OBJ) $(SRC_DIR)/TraceFilter.$(SRC_EXT) -o TraceFilter.o
endif
ifeq ($(TF_INTEGRATED_TRACE_LOG), y)
$(VERBOSE)$(CC) $(INCLUDE) $(TRACE_FLAGS) $(SHARED_OBJ) $(SRC_DIR)/TraceLog.$(SRC_EXT) -o TraceLog.o
endif
$(VERBOSE)$(SHARED_LIB) $(LIB_DIR)/libpshell-server-full.so $(PSHELL_OBJS)
$(VERBOSE)rm *.o
@echo "Building libpshell-server-stub.a (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(PSHELL_FLAGS) $(TF_FLAGS) $(TRACE_FLAGS) $(STATIC_OBJ) $(SRC_DIR)/PshellStub.$(SRC_EXT) -o PshellStub.o
ifeq ($(TF_INTEGRATED_TRACE_LOG), y)
$(VERBOSE)$(CC) $(INCLUDE) $(TRACE_FLAGS) $(STATIC_OBJ) $(SRC_DIR)/TraceLog.$(SRC_EXT) -o TraceLog.o
$(VERBOSE)$(STATIC_LIB) $(LIB_DIR)/libpshell-server-stub.a TraceLog.o PshellStub.o
else
$(VERBOSE)$(STATIC_LIB) $(LIB_DIR)/libpshell-server-stub.a PshellStub.o
endif
$(VERBOSE)rm *.o
@echo "Building libpshell-server-stub.so (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(PSHELL_FLAGS) $(TF_FLAGS) $(TRACE_FLAGS) $(SHARED_OBJ) $(SRC_DIR)/PshellStub.$(SRC_EXT) -o PshellStub.o
ifeq ($(TF_INTEGRATED_TRACE_LOG), y)
$(VERBOSE)$(CC) $(INCLUDE) $(TRACE_FLAGS) $(SHARED_OBJ) $(SRC_DIR)/TraceLog.$(SRC_EXT) -o TraceLog.o
$(VERBOSE)$(SHARED_LIB) $(LIB_DIR)/libpshell-server-stub.so TraceLog.o PshellStub.o
else
$(VERBOSE)$(SHARED_LIB) $(LIB_DIR)/libpshell-server-stub.so PshellStub.o
endif
$(VERBOSE)rm *.o
@echo "Building libpshell-control.a (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(PSHELL_FLAGS) $(STATIC_OBJ) $(SRC_DIR)/PshellControl.$(SRC_EXT) -o PshellControl.o
$(VERBOSE)$(STATIC_LIB) $(LIB_DIR)/libpshell-control.a PshellControl.o
$(VERBOSE)rm *.o
@echo "Building libpshell-control.so (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(PSHELL_FLAGS) $(SHARED_OBJ) $(SRC_DIR)/PshellControl.$(SRC_EXT) -o PshellControl.o
$(VERBOSE)$(SHARED_LIB) $(LIB_DIR)/libpshell-control.so PshellControl.o
$(VERBOSE)rm *.o
@echo "Building libpshell-readline.a (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(STATIC_OBJ) $(SRC_DIR)/PshellReadline.$(SRC_EXT) -o PshellReadline.o
$(VERBOSE)$(STATIC_LIB) $(LIB_DIR)/libpshell-readline.a PshellReadline.o
$(VERBOSE)rm *.o
@echo "Building libpshell-readline.so (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(SHARED_OBJ) $(SRC_DIR)/PshellReadline.$(SRC_EXT) -o PshellReadline.o
$(VERBOSE)$(SHARED_LIB) $(LIB_DIR)/libpshell-readline.so PshellReadline.o
$(VERBOSE)rm *.o
ifeq ($(BUILD_GO), y)
@echo "Building PshellServer-full.a (go)..."
$(VERBOSE)$(GO) $(GO_OPTIONS) PshellServer-full
@echo "Building PshellServer-stub.a (go)..."
$(VERBOSE)$(GO) $(GO_OPTIONS) PshellServer-stub
@echo "Building PshellControl.a (go)..."
$(VERBOSE)$(GO) $(GO_OPTIONS) PshellControl
@echo "Setting PSHELL 'C' libraries, Python modules, and Go packages to FULL version..."
else
@echo "Setting PSHELL 'C' libraries and Python modules to FULL version..."
endif
$(VERBOSE)$(UTILS_DIR)/setPshellLib -full
client:
@echo "Building pshellAggregator stand-alone UDP/UNIX aggregator client (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(WARNINGS) $(CLIENT_FLAGS) $(SRC_DIR)/PshellAggregator.$(SRC_EXT) $(SRC_DIR)/PshellReadline.$(SRC_EXT) $(CLIENT_LIBS) $(PSHELL_CONTROL_DEMO_LIBS) $(PSHELL_SERVER_DEMO_LIBS) -o $(BIN_DIR)/pshellAggregator
@echo "Building pshell stand-alone UDP/UNIX client (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(WARNINGS) $(CLIENT_FLAGS) $(SRC_DIR)/PshellClient.$(SRC_EXT) $(SRC_DIR)/PshellReadline.$(SRC_EXT) $(CLIENT_LIBS) -o $(BIN_DIR)/pshell
demo:
@echo "Building pshellServerDemo program (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(WARNINGS) $(DEMO_DIR)/pshellServerDemo.$(SRC_EXT) $(PSHELL_SERVER_DEMO_LIBS) -o $(BIN_DIR)/pshellServerDemo
@echo "Building pshellNoServerDemo program (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(WARNINGS) $(DEMO_DIR)/pshellNoServerDemo.$(SRC_EXT) $(PSHELL_SERVER_DEMO_LIBS) -o $(BIN_DIR)/pshellNoServerDemo
@echo "Building pshellControlDemo program (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(WARNINGS) $(DEMO_DIR)/pshellControlDemo.$(SRC_EXT) $(PSHELL_CONTROL_DEMO_LIBS) -o $(BIN_DIR)/pshellControlDemo
@echo "Building pshellReadlineDemo program (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(WARNINGS) $(DEMO_DIR)/pshellReadlineDemo.$(SRC_EXT) $(PSHELL_READLINE_DEMO_LIBS) -o $(BIN_DIR)/pshellReadlineDemo
@echo "Building pshellAggregatorDemo program (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(WARNINGS) $(DEMO_DIR)/pshellAggregatorDemo.$(SRC_EXT) $(PSHELL_CONTROL_DEMO_LIBS) $(PSHELL_SERVER_DEMO_LIBS) -o $(BIN_DIR)/pshellAggregatorDemo
ifeq ($(TF_INTEGRATED_TRACE_LOG), y)
@echo "Building traceFilterDemo program (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(WARNINGS) $(TRACE_FILTER_DEMO_FLAGS) $(DEMO_DIR)/traceFilterDemo.$(SRC_EXT) $(TRACE_FILTER_DEMO_LIBS) -o $(BIN_DIR)/traceFilterDemo
endif
@echo "Building traceLogDemo program (C)..."
$(VERBOSE)$(CC) $(INCLUDE) $(WARNINGS) $(TRACE_LOG_DEMO_FLAGS) $(DEMO_DIR)/traceLogDemo.$(SRC_EXT) $(TRACE_LOG_DEMO_LIBS) -o $(BIN_DIR)/traceLogDemo
ifeq ($(BUILD_GO), y)
@echo "Building pshellServerDemo program (go)..."
$(VERBOSE)$(GO) $(GO_OPTIONS) pshellServerDemo
@echo "Building pshellControlDemo program (go)..."
$(VERBOSE)$(GO) $(GO_OPTIONS) pshellControlDemo
endif
all: clean lib client demo
@echo "PSHELL package successfully built..."
install: all
$(VERBOSE)./install.sh $(LOCAL) $(SHELL_ENV_FILE)
clean:
@echo "Cleaning directory bin..."
$(VERBOSE)rm -f $(BIN_DIR)/*Demo
$(VERBOSE)rm -f $(BIN_DIR)/pshell
@echo "Cleaning directory lib..."
$(VERBOSE)rm -f $(LIB_DIR)/*.so
$(VERBOSE)rm -f $(LIB_DIR)/*.a