AUTOTOOLS: Add Makefile.am for examples/

This commit is contained in:
Ronnie Sahlberg
2014-03-22 17:46:02 -07:00
parent ea790b2f75
commit ae60611f68
4 changed files with 12 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
# Generic definitions
SUBDIRS = lib doc utils test-tool
SUBDIRS = lib doc utils test-tool examples
CLEANFILES=
ACLOCAL_AMFLAGS =-I m4
@@ -32,13 +32,6 @@ iscsi_includedir = $(includedir)/iscsi
dist_iscsi_include_HEADERS = include/iscsi.h include/scsi-lowlevel.h
dist_noinst_HEADERS = include/iscsi-private.h include/md5.h include/slist.h
# Other examples
noinst_PROGRAMS += bin/iscsiclient
bin_iscsiclient_SOURCES = examples/iscsiclient.c
EXTRA_PROGRAMS += bin/iscsi-dd
bin_iscsi_dd_SOURCES = examples/iscsi-dd.c
# LD_PRELOAD library.
if LD_ISCSI

View File

@@ -134,5 +134,6 @@ AC_CONFIG_FILES([Makefile]
[doc/Makefile]
[utils/Makefile]
[test-tool/Makefile]
[examples/Makefile]
[libiscsi.pc])
AC_OUTPUT

7
examples/Makefile.am Normal file
View File

@@ -0,0 +1,7 @@
AM_CPPFLAGS=-I. -I../include "-D_U_=__attribute__((unused))" \
"-D_R_(A,B)=__attribute__((format(printf,A,B)))"
AM_CFLAGS=$(WARN_CFLAGS)
LDADD = ../lib/libiscsi.la
noinst_PROGRAMS = iscsiclient iscsi-dd

View File

@@ -140,7 +140,7 @@ void fill_read_queue(struct client *client)
}
}
int main(int argc, const char *argv[])
int main(int argc, char *argv[])
{
char *src_url = NULL;
char *dst_url = NULL;
@@ -163,17 +163,16 @@ int main(int argc, const char *argv[])
&option_index)) != -1) {
switch (c) {
case 'd':
dst = optarg;
dst_url = optarg;
break;
case 's':
src = optarg;
src_url = optarg;
break;
case 'i':
initiator = optarg;
break;
default:
fprintf(stderr, "Unrecognized option '%c'\n\n", c);
print_help();
exit(0);
}
}