diff options
author | Bart Van Assche <bvanassche@google.com> | 2022-11-23 20:04:46 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-11-23 20:04:46 +0000 |
commit | 62b99c09a4bbb75fea6c309c77ebf856323d908c (patch) | |
tree | 207cdb23f8257e270a30143fde23d2033901581f /lib/Makefile.am | |
parent | 8718296061e35ba33bf88847e7498f3d7e38f8f1 (diff) | |
parent | 3c61bd9e26bf930f865e28e7eef48856653d1c98 (diff) | |
download | sg3_utils-62b99c09a4bbb75fea6c309c77ebf856323d908c.tar.gz |
Merge remote-tracking branch 'aosp/upstream-main' into HEAD am: 448b67b18a am: d39ef90544 am: 3c61bd9e26
Original change: https://android-review.googlesource.com/c/platform/external/sg3_utils/+/2312210
Change-Id: I0362cffa263ba632a3e2058f8f50f32e024b2cc3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'lib/Makefile.am')
-rw-r--r-- | lib/Makefile.am | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am new file mode 100644 index 00000000..2c19b1bd --- /dev/null +++ b/lib/Makefile.am @@ -0,0 +1,109 @@ +libsgutils2_la_SOURCES = \ + sg_lib.c \ + sg_pr2serr.c \ + sg_lib_data.c \ + sg_lib_names.c \ + sg_cmds_basic.c \ + sg_cmds_basic2.c \ + sg_cmds_extra.c \ + sg_cmds_mmc.c \ + sg_pt_common.c \ + sg_json_builder.c + +if OS_LINUX +if PT_DUMMY +libsgutils2_la_SOURCES += sg_pt_dummy.c +else +libsgutils2_la_SOURCES += \ + sg_pt_linux.c \ + sg_io_linux.c \ + sg_pt_linux_nvme.c +endif +endif + +if OS_WIN32_MINGW +libsgutils2_la_SOURCES += sg_pt_win32.c +endif + +if OS_WIN32_CYGWIN +libsgutils2_la_SOURCES += sg_pt_win32.c +endif + +if OS_FREEBSD +if PT_DUMMY +libsgutils2_la_SOURCES += sg_pt_dummy.c +else +libsgutils2_la_SOURCES += sg_pt_freebsd.c +endif +endif + +if OS_SOLARIS +libsgutils2_la_SOURCES += sg_pt_solaris.c +endif + +if OS_OSF +libsgutils2_la_SOURCES += sg_pt_osf1.c +endif + +if OS_HAIKU +if PT_DUMMY +libsgutils2_la_SOURCES += sg_pt_dummy.c +else +libsgutils2_la_SOURCES += sg_pt_haiku.c +endif +endif + +if OS_NETBSD +libsgutils2_la_SOURCES += sg_pt_dummy.c +endif + +if OS_OPENBSD +libsgutils2_la_SOURCES += sg_pt_dummy.c +endif + +if OS_OTHER +libsgutils2_la_SOURCES += sg_pt_dummy.c +endif + +if DEBUG +# This is active if --enable-debug given to ./configure +# removed -Wduplicated-branches because needs gcc-8 +DBG_CFLAGS = -Wextra -Wmisleading-indentation -Wduplicated-cond -Wlogical-op -Wnull-dereference -Wshadow -Wjump-misses-init +DBG_CPPFLAGS = -DDEBUG +else +DBG_CFLAGS = +DBG_CPPFLAGS = +endif + +# For C++/clang testing +## CC = gcc-9 +## CXX = g++ +## CC = clang +## CXX = clang++ +## CC = clang++ +## CC = powerpc64-linux-gnu-gcc + +# -std=<s> can be c99, c11, gnu11, etc. Default is gnu11 for C code +# -Wall is no longer all warnings. Add -W (since renamed to -Wextra) for more +AM_CPPFLAGS = -iquote ${top_srcdir}/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $(DBG_CPPFLAGS) +AM_CFLAGS = -Wall -W $(DBG_CFLAGS) +# AM_CFLAGS = -Wall -W $(DBG_CFLAGS) -fanalyzer +# AM_CFLAGS = -Wall -W -Wextra -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wnull-dereference -Wshadow -Wjump-misses-init +# AM_CFLAGS = -Wall -W -pedantic -std=c11 +# AM_CFLAGS = -Wall -W -pedantic -std=c11 --analyze +# AM_CFLAGS = -Wall -W -pedantic -std=c++11 +# AM_CFLAGS = -Wall -W -pedantic -std=c++14 +# AM_CFLAGS = -Wall -W -pedantic -std=c++1z +# AM_CFLAGS = -Wall -W -pedantic -std=c++20 +# AM_CFLAGS = -Wall -W -pedantic -std=c++23 + +lib_LTLIBRARIES = libsgutils2.la + +libsgutils2_la_LDFLAGS = -version-info 2:0:0 -no-undefined -release ${PACKAGE_VERSION} + +libsgutils2_la_LIBADD = @GETOPT_O_FILES@ +libsgutils2_la_DEPENDENCIES = @GETOPT_O_FILES@ + +EXTRA_DIST = \ + sg_json_builder.h \ + BSD_LICENSE |