aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: 2293d1ecc3b3ba1978e622ebf4b47e6036192b21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315

if OS_LINUX

# sg_dd, sg_emc_trespass(?), sginfo, sg_map26, sg_map, sgm_dd, sgp_dd,
# sg_rbuf, sg_read, sg_reset, sg_test_rwbuf
# are Linux only utilities
#
# sg_scan is shared by Linux and Win32

bin_PROGRAMS = \
	sg_compare_and_write sg_copy_results sg_dd sg_decode_sense \
	sg_emc_trespass sg_format sg_get_config sg_get_lba_status \
	sg_ident sginfo sg_inq sg_logs sg_luns sg_map26 sg_map sgm_dd \
	sg_modes sg_opcodes sgp_dd sg_persist sg_prevent sg_raw sg_rbuf \
	sg_rdac sg_read sg_readcap sg_read_block_limits sg_read_buffer \
	sg_read_long sg_reassign sg_referrals sg_rep_zones sg_requests \
	sg_reset sg_reset_wp sg_rmsn sg_rtpg sg_safte sg_sanitize \
	sg_sat_identify sg_sat_phy_event sg_sat_set_features sg_scan \
	sg_senddiag sg_ses sg_ses_microcode sg_start sg_stpg sg_sync \
	sg_test_rwbuf sg_turs sg_unmap sg_verify sg_vpd sg_write_buffer \
	sg_write_long sg_write_same sg_write_verify sg_wr_mode sg_xcopy

distclean-local:
	rm -f sg_scan.c

sg_scan.c : sg_scan.c.linux
	cp sg_scan.c.linux sg_scan.c

endif


if OS_WIN32_MINGW

bin_PROGRAMS = \
	sg_compare_and_write sg_decode_sense sg_format sg_get_config \
	sg_get_lba_status sg_ident sg_inq sg_logs sg_luns sg_modes \
	sg_opcodes sg_persist sg_prevent sg_raw sg_rdac sg_readcap \
	sg_read_block_limits sg_read_buffer sg_read_long sg_reassign \
	sg_referrals sg_rep_zones sg_requests sg_reset_wp sg_rmsn \
	sg_rtpg sg_safte sg_sanitize sg_sat_identify sg_sat_phy_event \
	sg_sat_set_features sg_scan sg_senddiag sg_ses sg_ses_microcode \
	sg_start sg_stpg sg_sync sg_turs sg_unmap sg_verify sg_vpd \
	sg_write_buffer sg_write_long sg_write_same sg_write_verify \
	sg_wr_mode

distclean-local:
	rm -f sg_scan.c

sg_scan.c : sg_scan.c.win32
	cp sg_scan.c.win32 sg_scan.c

endif


if OS_WIN32_CYGWIN

bin_PROGRAMS = \
	sg_compare_and_write sg_decode_sense sg_format sg_get_config \
	sg_get_lba_status sg_ident sg_inq sg_logs sg_luns sg_modes \
	sg_opcodes sg_persist sg_prevent sg_raw sg_rdac sg_readcap \
	sg_read_block_limits sg_read_buffer sg_read_long sg_reassign \
	sg_referrals sg_rep_zones sg_requests sg_reset_wp sg_rmsn \
	sg_rtpg sg_safte sg_sanitize sg_sat_identify sg_sat_phy_event \
	sg_sat_set_features sg_scan sg_senddiag sg_ses sg_ses_microcode \
	sg_start sg_stpg sg_sync sg_turs sg_unmap sg_verify sg_vpd \
	sg_write_buffer sg_write_long sg_write_same sg_write_verify \
	sg_wr_mode

distclean-local:
	rm -f sg_scan.c

sg_scan.c : sg_scan.c.win32
	cp sg_scan.c.win32 sg_scan.c

endif


if OS_FREEBSD

bin_PROGRAMS = \
	sg_compare_and_write sg_decode_sense sg_format sg_get_config \
	sg_get_lba_status sg_ident sg_inq sg_logs sg_luns sg_modes \
	sg_opcodes sg_persist sg_prevent sg_raw sg_rdac sg_readcap \
	sg_read_block_limits sg_read_buffer sg_read_long sg_reassign \
	sg_referrals sg_rep_zones sg_requests sg_reset_wp sg_rmsn \
	sg_rtpg sg_safte sg_sanitize sg_sat_identify sg_sat_phy_event \
	sg_sat_set_features sg_senddiag sg_ses sg_ses_microcode \
	sg_start sg_stpg sg_sync sg_turs sg_unmap sg_verify sg_vpd \
	sg_write_buffer sg_write_long sg_write_same sg_write_verify \
	sg_wr_mode

endif


if OS_SOLARIS

bin_PROGRAMS = \
	sg_compare_and_write sg_decode_sense sg_format sg_get_config \
	sg_get_lba_status sg_ident sg_inq sg_logs sg_luns sg_modes \
	sg_opcodes sg_persist sg_prevent sg_raw sg_rdac sg_readcap \
	sg_read_block_limits sg_read_buffer sg_read_long sg_reassign \
	sg_referrals sg_rep_zones sg_requests sg_reset_wp sg_rmsn \
	sg_rtpg sg_safte sg_sanitize sg_sat_identify sg_sat_phy_event \
	sg_sat_set_features sg_senddiag sg_ses sg_ses_microcode sg_start \
	sg_stpg sg_sync sg_turs sg_unmap sg_verify sg_vpd sg_write_buffer \
	sg_write_long sg_write_same sg_write_verify sg_wr_mode

endif


if OS_OSF

bin_PROGRAMS = \
	sg_compare_and_write sg_decode_sense sg_format sg_get_config \
	sg_get_lba_status sg_ident sg_inq sg_logs sg_luns sg_modes \
	sg_opcodes sg_persist sg_prevent sg_raw sg_rdac sg_readcap \
	sg_read_block_limits sg_read_buffer sg_read_long sg_reassign \
	sg_referrals sg_rep_zones sg_requests sg_reset_wp sg_rmsn sg_rtpg \
	sg_safte sg_sanitize sg_sat_identify sg_sat_phy_event \
	sg_sat_set_features sg_senddiag sg_ses sg_ses_microcode sg_start \
	sg_stpg sg_sync sg_turs sg_unmap sg_verify sg_vpd sg_write_buffer \
	sg_write_long sg_write_same sg_write_verify sg_wr_mode

endif

# For C++/clang testing
## CC = gcc
## CC = g++
## CC = clang
## CC = clang++

# -std=<s> can be c99, c11, gnu11, etc. Default is gnu89 (gnu90 is the same)
AM_CFLAGS = -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W @os_cflags@
# AM_CFLAGS = -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W @os_cflags@ -pedantic -std=c11
# AM_CFLAGS = -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W @os_cflags@ -pedantic -std=c++11

sg_dd_SOURCES =	sg_dd.c
sg_dd_LDADD = ../lib/libsgutils2.la @os_libs@

sg_decode_sense_SOURCES =	sg_decode_sense.c
sg_decode_sense_LDADD = ../lib/libsgutils2.la @os_libs@

sg_emc_trespass_SOURCES = sg_emc_trespass.c
sg_emc_trespass_LDADD = ../lib/libsgutils2.la @os_libs@

sg_format_SOURCES = sg_format.c
sg_format_LDADD = ../lib/libsgutils2.la @os_libs@

sg_get_config_SOURCES = sg_get_config.c
sg_get_config_LDADD = ../lib/libsgutils2.la @os_libs@

sg_get_lba_status_SOURCES = sg_get_lba_status.c
sg_get_lba_status_LDADD = ../lib/libsgutils2.la @os_libs@

sg_ident_SOURCES = sg_ident.c
sg_ident_LDADD = ../lib/libsgutils2.la @os_libs@

sginfo_SOURCES = sginfo.c
sginfo_LDADD = ../lib/libsgutils2.la @os_libs@

sg_inq_SOURCES = sg_inq.c sg_inq_data.c
sg_inq_LDADD = ../lib/libsgutils2.la @os_libs@

sg_logs_SOURCES = sg_logs.c
sg_logs_LDADD = ../lib/libsgutils2.la @os_libs@

sg_luns_SOURCES = sg_luns.c
sg_luns_LDADD = ../lib/libsgutils2.la @os_libs@

sg_map26_SOURCES = sg_map26.c
sg_map26_LDADD = @os_libs@

sg_map_SOURCES = sg_map.c
sg_map_LDADD = ../lib/libsgutils2.la @os_libs@

sgm_dd_SOURCES = sgm_dd.c
sgm_dd_LDADD = ../lib/libsgutils2.la @os_libs@

sg_modes_SOURCES = sg_modes.c
sg_modes_LDADD = ../lib/libsgutils2.la @os_libs@

sg_opcodes_SOURCES = sg_opcodes.c
sg_opcodes_LDADD = ../lib/libsgutils2.la @os_libs@

sgp_dd_SOURCES = sgp_dd.c
sgp_dd_LDADD = ../lib/libsgutils2.la @os_libs@ -lpthread

sg_persist_SOURCES = sg_persist.c
sg_persist_LDADD = ../lib/libsgutils2.la @os_libs@

sg_prevent_SOURCES = sg_prevent.c
sg_prevent_LDADD = ../lib/libsgutils2.la @os_libs@

sg_raw_SOURCES = sg_raw.c
sg_raw_LDADD = ../lib/libsgutils2.la @os_libs@

sg_rbuf_SOURCES = sg_rbuf.c
sg_rbuf_LDADD = ../lib/libsgutils2.la @os_libs@

sg_rdac_SOURCES = sg_rdac.c
sg_rdac_LDADD = ../lib/libsgutils2.la @os_libs@

sg_read_SOURCES = sg_read.c
sg_read_LDADD = ../lib/libsgutils2.la @os_libs@

sg_readcap_SOURCES = sg_readcap.c
sg_readcap_LDADD = ../lib/libsgutils2.la @os_libs@

sg_read_block_limits_SOURCES = sg_read_block_limits.c
sg_read_block_limits_LDADD = ../lib/libsgutils2.la @os_libs@

sg_read_buffer_SOURCES = sg_read_buffer.c
sg_read_buffer_LDADD = ../lib/libsgutils2.la @os_libs@

sg_read_long_SOURCES = sg_read_long.c
sg_read_long_LDADD = ../lib/libsgutils2.la @os_libs@

sg_reassign_SOURCES = sg_reassign.c
sg_reassign_LDADD = ../lib/libsgutils2.la @os_libs@

sg_requests_SOURCES = sg_requests.c
sg_requests_LDADD = ../lib/libsgutils2.la @os_libs@

sg_referrals_SOURCES = sg_referrals.c
sg_referrals_LDADD = ../lib/libsgutils2.la @os_libs@

sg_reset_SOURCES = sg_reset.c
sg_reset_LDADD = @os_libs@

sg_rmsn_SOURCES = sg_rmsn.c
sg_rmsn_LDADD = ../lib/libsgutils2.la @os_libs@

sg_rtpg_SOURCES = sg_rtpg.c
sg_rtpg_LDADD = ../lib/libsgutils2.la @os_libs@

sg_safte_SOURCES = sg_safte.c
sg_safte_LDADD = ../lib/libsgutils2.la @os_libs@

sg_sanitize_SOURCES = sg_sanitize.c
sg_sanitize_LDADD = ../lib/libsgutils2.la @os_libs@

sg_sat_identify_SOURCES = sg_sat_identify.c
sg_sat_identify_LDADD = ../lib/libsgutils2.la @os_libs@

sg_sat_phy_event_SOURCES = sg_sat_phy_event.c
sg_sat_phy_event_LDADD = ../lib/libsgutils2.la @os_libs@

sg_sat_set_features_SOURCES = sg_sat_set_features.c
sg_sat_set_features_LDADD = ../lib/libsgutils2.la @os_libs@

sg_scan_SOURCES = sg_scan.c
sg_scan_LDADD = ../lib/libsgutils2.la @os_libs@

sg_senddiag_SOURCES = sg_senddiag.c
sg_senddiag_LDADD = ../lib/libsgutils2.la @os_libs@

sg_ses_SOURCES = sg_ses.c
sg_ses_LDADD = ../lib/libsgutils2.la @os_libs@

sg_ses_microcode_SOURCES = sg_ses_microcode.c
sg_ses_microcode_LDADD = ../lib/libsgutils2.la @os_libs@

sg_start_SOURCES = sg_start.c
sg_start_LDADD = ../lib/libsgutils2.la @os_libs@

sg_stpg_SOURCES = sg_stpg.c
sg_stpg_LDADD = ../lib/libsgutils2.la @os_libs@

sg_sync_SOURCES = sg_sync.c
sg_sync_LDADD = ../lib/libsgutils2.la @os_libs@

sg_test_rwbuf_SOURCES = sg_test_rwbuf.c
sg_test_rwbuf_LDADD = ../lib/libsgutils2.la @os_libs@

sg_turs_SOURCES = sg_turs.c
sg_turs_LDADD = ../lib/libsgutils2.la @os_libs@

sg_unmap_SOURCES = sg_unmap.c
sg_unmap_LDADD = ../lib/libsgutils2.la @os_libs@

sg_verify_SOURCES = sg_verify.c
sg_verify_LDADD = ../lib/libsgutils2.la @os_libs@

sg_vpd_SOURCES = sg_vpd.c sg_vpd_vendor.c
sg_vpd_LDADD = ../lib/libsgutils2.la @os_libs@

sg_write_buffer_SOURCES = sg_write_buffer.c
sg_write_buffer_LDADD = ../lib/libsgutils2.la @os_libs@

sg_write_long_SOURCES = sg_write_long.c
sg_write_long_LDADD = ../lib/libsgutils2.la @os_libs@

sg_write_same_SOURCES = sg_write_same.c
sg_write_same_LDADD = ../lib/libsgutils2.la @os_libs@

sg_wr_mode_SOURCES = sg_wr_mode.c
sg_wr_mode_LDADD = ../lib/libsgutils2.la @os_libs@

sg_xcopy_SOURCES = sg_xcopy.c
sg_xcopy_LDADD = ../lib/libsgutils2.la @os_libs@

sg_copy_results_SOURCES = sg_copy_results.c
sg_copy_results_LDADD = ../lib/libsgutils2.la @os_libs@

sg_compare_and_write_SOURCES = sg_compare_and_write.c
sg_compare_and_write_LDADD = ../lib/libsgutils2.la @os_libs@

sg_rep_zones_SOURCES = sg_rep_zones.c
sg_rep_zones_LDADD = ../lib/libsgutils2.la @os_libs@

sg_reset_wp_SOURCES = sg_reset_wp.c
sg_reset_wp_LDADD = ../lib/libsgutils2.la @os_libs@

sg_write_verify_SOURCES = sg_write_verify.c
sg_write_verify_LDADD = ../lib/libsgutils2.la @os_libs@