1libsgutils2_la_SOURCES = \ 2 sg_lib.c \ 3 sg_pr2serr.c \ 4 sg_lib_data.c \ 5 sg_lib_names.c \ 6 sg_cmds_basic.c \ 7 sg_cmds_basic2.c \ 8 sg_cmds_extra.c \ 9 sg_cmds_mmc.c \ 10 sg_pt_common.c \ 11 sg_json_builder.c 12 13if OS_LINUX 14if PT_DUMMY 15libsgutils2_la_SOURCES += sg_pt_dummy.c 16else 17libsgutils2_la_SOURCES += \ 18 sg_pt_linux.c \ 19 sg_io_linux.c \ 20 sg_pt_linux_nvme.c 21endif 22endif 23 24if OS_WIN32_MINGW 25libsgutils2_la_SOURCES += sg_pt_win32.c 26endif 27 28if OS_WIN32_CYGWIN 29libsgutils2_la_SOURCES += sg_pt_win32.c 30endif 31 32if OS_FREEBSD 33if PT_DUMMY 34libsgutils2_la_SOURCES += sg_pt_dummy.c 35else 36libsgutils2_la_SOURCES += sg_pt_freebsd.c 37endif 38endif 39 40if OS_SOLARIS 41libsgutils2_la_SOURCES += sg_pt_solaris.c 42endif 43 44if OS_OSF 45libsgutils2_la_SOURCES += sg_pt_osf1.c 46endif 47 48if OS_HAIKU 49if PT_DUMMY 50libsgutils2_la_SOURCES += sg_pt_dummy.c 51else 52libsgutils2_la_SOURCES += sg_pt_haiku.c 53endif 54endif 55 56if OS_NETBSD 57libsgutils2_la_SOURCES += sg_pt_dummy.c 58endif 59 60if OS_OPENBSD 61libsgutils2_la_SOURCES += sg_pt_dummy.c 62endif 63 64if OS_OTHER 65libsgutils2_la_SOURCES += sg_pt_dummy.c 66endif 67 68if DEBUG 69# This is active if --enable-debug given to ./configure 70# removed -Wduplicated-branches because needs gcc-8 71DBG_CFLAGS = -Wextra -Wmisleading-indentation -Wduplicated-cond -Wlogical-op -Wnull-dereference -Wshadow -Wjump-misses-init 72DBG_CPPFLAGS = -DDEBUG 73else 74DBG_CFLAGS = 75DBG_CPPFLAGS = 76endif 77 78# For C++/clang testing 79## CC = gcc-9 80## CXX = g++ 81## CC = clang 82## CXX = clang++ 83## CC = clang++ 84## CC = powerpc64-linux-gnu-gcc 85 86# -std=<s> can be c99, c11, gnu11, etc. Default is gnu11 for C code 87# -Wall is no longer all warnings. Add -W (since renamed to -Wextra) for more 88AM_CPPFLAGS = -iquote ${top_srcdir}/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $(DBG_CPPFLAGS) 89AM_CFLAGS = -Wall -W $(DBG_CFLAGS) 90# AM_CFLAGS = -Wall -W $(DBG_CFLAGS) -fanalyzer 91# AM_CFLAGS = -Wall -W -Wextra -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wnull-dereference -Wshadow -Wjump-misses-init 92# AM_CFLAGS = -Wall -W -pedantic -std=c11 93# AM_CFLAGS = -Wall -W -pedantic -std=c11 --analyze 94# AM_CFLAGS = -Wall -W -pedantic -std=c++11 95# AM_CFLAGS = -Wall -W -pedantic -std=c++14 96# AM_CFLAGS = -Wall -W -pedantic -std=c++1z 97# AM_CFLAGS = -Wall -W -pedantic -std=c++20 98# AM_CFLAGS = -Wall -W -pedantic -std=c++23 99 100lib_LTLIBRARIES = libsgutils2.la 101 102libsgutils2_la_LDFLAGS = -version-info 2:0:0 -no-undefined -release ${PACKAGE_VERSION} 103 104libsgutils2_la_LIBADD = @GETOPT_O_FILES@ 105libsgutils2_la_DEPENDENCIES = @GETOPT_O_FILES@ 106 107EXTRA_DIST = \ 108 sg_json_builder.h \ 109 BSD_LICENSE 110