Commit 6b9b448e authored by Ben Walker's avatar Ben Walker Committed by Tomasz Zawadzki
Browse files

build: Output executables from the app directory to build/bin



Automatically place binaries produced from the app directory
into build/bin. This matches with the output in build/lib
that already exists.

Change-Id: I13cd2da71d2f88592e22308fe8a907bf458458b5
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2379


Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
parent 918177d6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
*.so.*
*.swp
*.DS_Store
build/
ut_coverage/
tags
cscope.out
+6 −1
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ endif
all: mk/cc.mk $(DIRS-y)
clean: $(DIRS-y)
	$(Q)rm -f include/spdk/config.h
	$(Q)rm -rf build/bin

install: all
	$(Q)echo "Installed to $(DESTDIR)$(CONFIG_PREFIX)"
@@ -97,12 +98,16 @@ examples: $(LIB)
pkgdep:
	sh ./scripts/pkgdep.sh

$(DIRS-y): mk/cc.mk include/spdk/config.h
$(DIRS-y): mk/cc.mk build_dir include/spdk/config.h

mk/cc.mk:
	$(Q)echo "Please run configure prior to make"
	false

build_dir: mk/cc.mk
	$(Q)mkdir -p build/lib
	$(Q)mkdir -p build/bin

include/spdk/config.h: mk/config.mk scripts/genconfig.py
	$(Q)echo "#ifndef SPDK_CONFIG_H" > $@.tmp; \
	echo "#define SPDK_CONFIG_H" >> $@.tmp; \
+1 −1
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ Linux:
./configure --with-shared
make
ldconfig -v -n ./build/lib
LD_LIBRARY_PATH=./build/lib/ ./app/spdk_tgt/spdk_tgt
LD_LIBRARY_PATH=./build/lib/ ./build/bin/spdk_tgt
~~~

<a id="huge"></a>
+2 −2
Original line number Diff line number Diff line
@@ -104,11 +104,11 @@ function porcelain_check() {
#  capturing a binary's stat data before and after touching a
#  header file and re-making.
function header_dependency_check() {
	STAT1=$(stat app/spdk_tgt/spdk_tgt)
	STAT1=$(stat $SPDK_BIN_DIR/spdk_tgt)
	sleep 1
	touch lib/nvme/nvme_internal.h
	$MAKE $MAKEFLAGS
	STAT2=$(stat app/spdk_tgt/spdk_tgt)
	STAT2=$(stat $SPDK_BIN_DIR/spdk_tgt)

	if [ "$STAT1" == "$STAT2" ]; then
		echo "Header dependency check failed"
+3 −3
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ This following section describes how to run iscsi from your cloned package.
This guide starts by assuming that you can already build the standard SPDK distribution on your
platform.

Once built, the binary will be in `app/iscsi_tgt`.
Once built, the binary will be in `build/bin`.

If you want to kill the application by using signal, make sure use the SIGTERM, then the application
will release all the shared memory resource before exit, the SIGKILL will make the shared memory
@@ -38,7 +38,7 @@ then run the iscsi_tgt application and pass it the configuration file using the
the target requires elevated privileges (root) to run.

~~~
app/iscsi_tgt/iscsi_tgt -c /path/to/iscsi.conf
build/bin/iscsi_tgt -c /path/to/iscsi.conf
~~~

### Assigning CPU Cores to the iSCSI Target {#iscsi_config_lcore}
@@ -227,7 +227,7 @@ Assuming we have one iSCSI Target server with portal at 10.0.0.1:3200, two LUNs

Start iscsi_tgt application:
```
./app/iscsi_tgt/iscsi_tgt
./build/bin/iscsi_tgt
```

Construct two 64MB Malloc block devices with 512B sector size "Malloc0" and "Malloc1":
Loading