[stgt] [PATCH 15/15] tgt: usr/Makefile BSD build Support
FUJITA Tomonori
fujita.tomonori at lab.ntt.co.jp
Mon Mar 2 08:48:22 CET 2009
On Sun, 1 Mar 2009 18:56:30 +0200
Boaz Harrosh <bharrosh at panasas.com> wrote:
> If compiling under FreeBSD:
> - Add the bsd/epoll.o epoll emulation
> - Add -Ibsd/ to INCLUDES for overide and/or emulation
> of Linux specific APIs.
> - Use bsd/os.o instead of linux/os.o
> - bs_aio.o and bs_sg.o are not available under BSD
>
> Signed-off-by: Boaz Harrosh <bharrosh at panasas.com>
> ---
> usr/Makefile | 19 ++++++++++++++++---
> 1 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/usr/Makefile b/usr/Makefile
> index 03b3c90..f4e3819 100644
> --- a/usr/Makefile
> +++ b/usr/Makefile
> @@ -4,6 +4,8 @@ EXTRAVERSION = $(if $(shell git-show-ref 2>/dev/null),-git-$(shell git-show-ref
> mandir = /usr/share/man
> docdir = /usr/share/doc/tgt
>
> +UNAME ?= $(shell uname)
> +
> ifneq ($(IBMVIO),)
> CFLAGS += -DIBMVIO -DUSE_KERNEL
> TGTD_OBJS += $(addprefix ibmvio/, ibmvio.o)
> @@ -15,7 +17,10 @@ CFLAGS += -DISCSI
> TGTD_OBJS += $(addprefix iscsi/, conn.o param.o session.o \
> iscsid.o target.o chap.o transport.o iscsi_tcp.o \
> isns.o)
> -TGTD_OBJS += bs_rdwr.o bs_aio.o
> +TGTD_OBJS += bs_rdwr.o
> +ifneq (FreeBSD,$(UNAME))
> +TGTD_OBJS += bs_aio.o
> +endif
>
> LIBS += -lcrypto
> ifneq ($(ISCSI_RDMA),)
> @@ -64,9 +69,17 @@ SCRIPTS += ../scripts/tgt-setup-lun ../scripts/tgt-admin
> TGTD_OBJS += tgtd.o mgmt.o target.o scsi.o log.o driver.o util.o work.o \
> parser.o spc.o sbc.o mmc.o osd.o scc.o smc.o \
> ssc.o bs_ssc.o libssc.o \
> - bs_null.o bs_sg.o bs.o libcrc32c.o
> -
> -TGTD_OBJS += linux/os.o
> + bs_null.o bs.o libcrc32c.o
> +
> +ifneq (FreeBSD,$(UNAME))
Just out of curiosity, have you tried your patchset on other BSDes? I
guess that your work could work for them too.
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list