This repository has been archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 142
/
Makefile.am
1920 lines (1554 loc) · 66.2 KB
/
Makefile.am
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
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
################################################################################
# Quick start guide {{{1
################################################################################
#
# This is the main motr makefile. It's responsible for building all user-space
# programs and libraries.
#
# It uses non-recursive make technique which is superior in many aspects to
# "recursive make". For more information on "non-recursive vs. recursive make",
# please refer to an excellent article "Recursive Make Considered Harmful" by
# Peter Miller - http://miller.emu.id.au/pmiller/books/rmch/
#
# A task of building kernel-space modules is delegated to the top-level Kbuild
# makefile, which is automatically invoked by this makefile after user-space
# build is complete.
#
# This makefile uses 'include' directives of make program to source other
# sub-makefiles (Makefile.sub), which are located in subdirectories and
# describe what should be built in each particular subdir.
#
# Normally, sub-makefiles should contain only *_HEADERS, *_SOURCES, EXTRA_DIST,
# CLEANFILES, FF_FILES, XC_FILES, and CONFXC_FILES variables, plus targets,
# which describe some local dependencies or do some local preparations (like
# creating symlinks and so on).
#
# All other primary variables (in automake sense), like *_PROGRAMS,
# *_LTLIBRARIES, *_CFLAGS, *_LDADD, _LIBADD and global targets should be defined
# in this main makefile.
#
# Motr's public headers should be listed in *_HEADERS variables, while
# internal headers, which are not part of the public interface, should be listed
# in *_SOURCES variables.
#
# In order to allow kernel- and user- space build in the same directories, we
# force renaming of output user-space *.o files by prepending target name;
# automake automatically does this if per-target flags are used; we use
# _CPPFLAGS and define a dummy M0_TARGET macro for this purpose.
################################################################################
# Automake configuration {{{1
################################################################################
# control verbosity level of make depending on 'V' command-line argument and
# --enable-silent-rules option of configure script
make_verbose = $(make_verbose_$(V))
make_verbose_ = $(make_verbose_$(AM_DEFAULT_VERBOSITY))
make_verbose_0 = --no-print-directory
MAKEFLAGS = $(make_verbose)
# in order to suppress annoying automake warning "CFLAGS: non-POSIX variable name"
# -Wno-portability automake option should be set for this makefile, this is
# required for xcode generation
AUTOMAKE_OPTIONS = -Wno-portability
# required to properly rebuild aclocal.m4 macros on configure.ac or Makefile.am
# updates
ACLOCAL_AMFLAGS = -I m4
# default XXXFLAGS, used for preprocessing, compiling and linking for all
# user-space targets
#
# NOTE[1]: automake doesn't use these flags if per-target XXXFLAGS are defined,
# so if one doesn't want to replace these default AM_XXXFLAGS with
# per-target XXXFLAGS, but just to extend them, then AM_XXXFLAGS should
# be appended to a per-target XXXFLAGS:
#
# my_program_CFLAGS = --some-compiler-option $(AM_CFLAGS)
#
# NOTE[2]: XXXFLAGS variables provided by a user from command-line
# (like `make CFLAGS=-Werror`) are always used implicitly in
# automake's build rules, so there is no need to specify them directly
# in AM_XXXFLAGS or per-target XXXFLAGS variables.
#
AM_CPPFLAGS = @M0_CPPFLAGS@
AM_CFLAGS = @M0_CFLAGS@
AM_LDFLAGS = @M0_LDFLAGS@
################################################################################
# Global variables {{{1
################################################################################
# initialize variables, so values can be appended later with += if needed
# everything that needs to be installed/packaged goes here
bin_PROGRAMS =
bin_SCRIPTS =
sbin_PROGRAMS =
sbin_SCRIPTS =
lib_LTLIBRARIES =
ivt_SCRIPTS =
# non-installable/packageable stuff: build helpers, local tests, etc.
noinst_PROGRAMS =
noinst_LTLIBRARIES =
# documentation
man_MANS =
EXTRA_DIST = autogen.sh cortx-motr.spec.in LICENCE .gdbinit
CLEANFILES =
DISTCLEANFILES = @LUSTRE_CONFIG_LINK@ utils/ub.sh
MAN_PAGES =
POD_MAN_PAGES =
# the list of auto-generated *_ff.[hc] files
FF_FILES =
# the list of auto-generated *_xc.[hc] files
XC_FILES =
# the list of auto-generated *_xc.[hc] files not included to libmotr.so
XC_FILES_EXTERN =
# the list of .xc files, auto-generated by m0confgen
CONFXC_FILES =
# name of autogenerated file to track which autogenerated FF files to clean
FF_CLEAN_FILE := .ff.clean
# name of autogenerated file to track dependencies between XC .h files
XC_DEPS_FILE := .xc.dep
XC_CLEAN_FILE := .xc.clean
# name of a file, generated by m0gccxml2xcode, containing the list of all xcode types
XC_LIST_FILE := xcode/xlist.h
XC_LOCK_FILE := .m0gccxml2xcode.lock
# name of file to track which autogenerated .xc files to clean
CONFXC_CLEAN_FILE := .confxc.clean
# path to a directory with built linux kernel sources/headers
KDIR = @LINUX_OBJ@
# path for python C extention installs
PYTHON := python3
SETUP_PY := $(PYTHON) setup.py
if MOTR_IDX_STORE_CASS
# override is needed to allow user to provide some additional options in
# RPMBUILD_FLAGS variable in command line
override RPMBUILD_FLAGS += --with cassandra
endif
if ENABLE_USER_MODE_ONLY
override RPMBUILD_FLAGS += --with usermode
endif
################################################################################
# Internal programs required for build {{{1
################################################################################
#
# confgen --------------------------------------------- {{{2
#
CONFGEN = $(top_srcdir)/utils/m0confgen
#
# ff2c ------------------------------------------------ {{{2
#
FF2C = $(top_builddir)/xcode/ff2c/m0ff2c
bin_PROGRAMS += xcode/ff2c/m0ff2c
xcode_ff2c_m0ff2c_CPPFLAGS = -DM0_TARGET='m0ff2c' $(AM_CPPFLAGS)
xcode_ff2c_m0ff2c_LDADD = xcode/ff2c/libmotr-xcode-ff2c.la
# a separate ff2c library is required in order to test it in UT
lib_LTLIBRARIES += xcode/ff2c/libmotr-xcode-ff2c.la
xcode_ff2c_libmotr_xcode_ff2c_la_CPPFLAGS = -DM0_TARGET='libmotr-xcode-ff2c' \
$(AM_CPPFLAGS)
include $(top_srcdir)/xcode/ff2c/Makefile.sub
################################################################################
# Libraries {{{1
################################################################################
#
# libmotr.so ------------------------------------------ {{{2
#
lib_LTLIBRARIES += motr/libmotr.la
motr_libmotr_la_CPPFLAGS = -DM0_TARGET='libmotr' $(AM_CPPFLAGS)
motr_libmotr_la_LDFLAGS = -version-info @LT_VERSION@ -pthread $(AM_LDFLAGS)
motr_libmotr_la_LIBADD = @MATH_LIBS@ @PTHREAD_LIBS@ @AIO_LIBS@ @RT_LIBS@ \
@YAML_LIBS@ @PROFILER_LIBS@ @UUID_LIBS@ \
@DL_LIBS@ @CASSANDRA_LIBS@ @UV_LIBS@ @ISAL_LIBS@ \
@OPENSSL_LIBS@ @LIBFAB_LIBS@
# install directory for public libmotr headers
motr_includedir = $(includedir)/motr
# these variables are populated in the Makefile.sub files of each motr module,
# which are then included into this top-level makefile
nobase_motr_include_HEADERS = config.h motr/config.h
nobase_nodist_motr_include_HEADERS = $(XC_FILES) $(XC_FILES_EXTERN)
if ENABLE_LUSTRE
nobase_nodist_motr_include_HEADERS += lustre_config.h
endif
motr_libmotr_la_SOURCES =
# for autogenerated source files
nodist_motr_libmotr_la_SOURCES =
include $(top_srcdir)/addb2/Makefile.sub
include $(top_srcdir)/addb2/st/Makefile.sub
include $(top_srcdir)/balloc/Makefile.sub
include $(top_srcdir)/be/Makefile.sub
include $(top_srcdir)/be/tool/Makefile.sub
include $(top_srcdir)/capa/Makefile.sub
include $(top_srcdir)/cas/Makefile.sub
include $(top_srcdir)/cm/Makefile.sub
include $(top_srcdir)/cm/repreb/Makefile.sub
include $(top_srcdir)/cob/Makefile.sub
include $(top_srcdir)/conf/Makefile.sub
include $(top_srcdir)/conf/objs/Makefile.sub
include $(top_srcdir)/console/Makefile.sub
include $(top_srcdir)/desim/Makefile.sub
include $(top_srcdir)/dix/Makefile.sub
include $(top_srcdir)/dix/cm/Makefile.sub
include $(top_srcdir)/dix/cm/repair/Makefile.sub
include $(top_srcdir)/dix/cm/rebalance/Makefile.sub
include $(top_srcdir)/dtm/Makefile.sub
include $(top_srcdir)/dtm0/Makefile.sub
include $(top_srcdir)/fd/Makefile.sub
include $(top_srcdir)/fdmi/Makefile.sub
include $(top_srcdir)/fid/Makefile.sub
include $(top_srcdir)/file/Makefile.sub
include $(top_srcdir)/fis/Makefile.sub
include $(top_srcdir)/fol/Makefile.sub
include $(top_srcdir)/fop/Makefile.sub
include $(top_srcdir)/format/Makefile.sub
include $(top_srcdir)/graph/Makefile.sub
include $(top_srcdir)/ha/Makefile.sub
include $(top_srcdir)/ha/halon/Makefile.sub
include $(top_srcdir)/ioservice/Makefile.sub
include $(top_srcdir)/iscservice/Makefile.sub
include $(top_srcdir)/layout/Makefile.sub
include $(top_srcdir)/lib/Makefile.sub
include $(top_srcdir)/m0t1fs/Makefile.sub
include $(top_srcdir)/mdservice/Makefile.sub
include $(top_srcdir)/mdstore/Makefile.sub
include $(top_srcdir)/motr/Makefile.sub
include $(top_srcdir)/module/Makefile.sub
include $(top_srcdir)/mw/Makefile.sub
include $(top_srcdir)/net/Makefile.sub
include $(top_srcdir)/net/bulk_emulation/Makefile.sub
include $(top_srcdir)/net/lnet/Makefile.sub
include $(top_srcdir)/net/sock/Makefile.sub
include $(top_srcdir)/net/libfab/Makefile.sub
include $(top_srcdir)/pool/Makefile.sub
include $(top_srcdir)/reqh/Makefile.sub
include $(top_srcdir)/rm/Makefile.sub
include $(top_srcdir)/rpc/Makefile.sub
include $(top_srcdir)/sm/Makefile.sub
include $(top_srcdir)/sns/Makefile.sub
include $(top_srcdir)/sns/cm/Makefile.sub
include $(top_srcdir)/sns/cm/repair/Makefile.sub
include $(top_srcdir)/sns/cm/rebalance/Makefile.sub
include $(top_srcdir)/spiel/Makefile.sub
include $(top_srcdir)/sss/Makefile.sub
include $(top_srcdir)/stob/Makefile.sub
include $(top_srcdir)/stats/Makefile.sub
include $(top_srcdir)/udb/Makefile.sub
include $(top_srcdir)/xcode/Makefile.sub
include $(top_srcdir)/scripts/systemtap/kem/Makefile.sub
#
# libmotr-altogether.so ------------------------------- {{{2
#
MOTR_ALTOGETHER_USER_C = motr/motr_altogether_user.c
MOTR_ALTOGETHER_USER_SRC = $(filter %.c, $(motr_libmotr_la_SOURCES) \
$(nodist_motr_libmotr_la_SOURCES))
if ENABLE_MOTR_ALTOGETHER
lib_LTLIBRARIES += motr/libmotr-altogether.la
endif
# for autogenerated source files
nodist_motr_libmotr_altogether_la_SOURCES = $(MOTR_ALTOGETHER_USER_C)
motr_libmotr_altogether_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DM0_TARGET='libmotr-altogether' \
-UM0_INTERNAL \
-DM0_INTERNAL=static \
-UM0_EXTERN \
-DM0_EXTERN=static
if ENABLE_DEBUG
motr_libmotr_altogether_la_CFLAGS = $(AM_CFLAGS) \
-Wno-unused-function
else
motr_libmotr_altogether_la_CFLAGS = $(AM_CFLAGS) \
-Wno-unused-function \
-O3 -ffast-math
endif
motr_libmotr_altogether_la_LDFLAGS = $(motr_libmotr_la_LDFLAGS)
motr_libmotr_altogether_la_LIBADD = $(motr_libmotr_la_LIBADD)
CLEANFILES += $(MOTR_ALTOGETHER_USER_C)
#
# libmotr-net-test.so --------------------------------- {{{2
#
lib_LTLIBRARIES += net/test/libmotr-net-test.la
net_test_libmotr_net_test_la_CPPFLAGS = -DM0_TARGET='libmotr-net-test' $(AM_CPPFLAGS)
net_test_libmotr_net_test_la_SOURCES =
include $(top_srcdir)/net/test/Makefile.sub
#
# libmotr-helpers.so --------------------------------- {{{2
#
lib_LTLIBRARIES += helpers/libmotr-helpers.la
helpers_libmotr_helpers_la_CPPFLAGS = -DM0_TARGET='libmotr-helpers' $(AM_CPPFLAGS)
helpers_libmotr_helpers_la_SOURCES =
include $(top_srcdir)/helpers/Makefile.sub
#
# libmotr-ut.so --------------------------------------- {{{2
#
if ENABLE_UNIT_TESTS
lib_LTLIBRARIES += ut/libmotr-ut.la
endif
ut_libmotr_ut_la_CPPFLAGS = -DM0_TARGET='libmotr-ut' $(AM_CPPFLAGS)
ut_libmotr_ut_la_LIBADD = net/test/libmotr-net-test.la \
helpers/libmotr-helpers.la \
xcode/ff2c/libmotr-xcode-ff2c.la
ut_libmotr_ut_la_SOURCES =
# for autogenerated source files
nodist_ut_libmotr_ut_la_SOURCES =
#
# libtestlib.so --------------------------------------- {{{2
#
if ENABLE_UNIT_TESTS
lib_LTLIBRARIES += ut/libtestlib.la
endif
ut_libtestlib_la_CPPFLAGS = -DM0_TARGET='libtestlib' $(AM_CPPFLAGS)
#
# libaddb2dump-plugin-test.so --------------------------------- {{{2
#
noinst_LTLIBRARIES += addb2/st/libaddb2dump-plugin-test.la
addb2_st_libaddb2dump_plugin_test_la_CPPFLAGS = -DM0_TARGET='libaddb2dump-plugin-test' $(AM_CPPFLAGS)
include $(top_srcdir)/addb2/ut/Makefile.sub
include $(top_srcdir)/balloc/ut/Makefile.sub
include $(top_srcdir)/be/ut/Makefile.sub
include $(top_srcdir)/capa/ut/Makefile.sub
include $(top_srcdir)/cas/ut/Makefile.sub
include $(top_srcdir)/cm/ut/Makefile.sub
include $(top_srcdir)/cob/ut/Makefile.sub
include $(top_srcdir)/conf/ut/Makefile.sub
include $(top_srcdir)/console/ut/Makefile.sub
include $(top_srcdir)/dix/cm/ut/Makefile.sub
include $(top_srcdir)/dix/ut/Makefile.sub
include $(top_srcdir)/dtm/ut/Makefile.sub
include $(top_srcdir)/dtm0/ut/Makefile.sub
include $(top_srcdir)/fd/ut/Makefile.sub
include $(top_srcdir)/fdmi/ut/Makefile.sub
include $(top_srcdir)/file/ut/Makefile.sub
include $(top_srcdir)/fis/ut/Makefile.sub
include $(top_srcdir)/fol/ut/Makefile.sub
include $(top_srcdir)/fop/ub/Makefile.sub
include $(top_srcdir)/fop/ut/Makefile.sub
include $(top_srcdir)/ha/ut/Makefile.sub
include $(top_srcdir)/ioservice/ut/Makefile.sub
include $(top_srcdir)/iscservice/ut/Makefile.sub
include $(top_srcdir)/layout/ut/Makefile.sub
include $(top_srcdir)/lib/ut/Makefile.sub
include $(top_srcdir)/mdservice/ut/Makefile.sub
include $(top_srcdir)/motr/ut/Makefile.sub
include $(top_srcdir)/module/ut/Makefile.sub
include $(top_srcdir)/net/bulk_emulation/ut/Makefile.sub
include $(top_srcdir)/net/lnet/ut/Makefile.sub
include $(top_srcdir)/net/libfab/ut/Makefile.sub
include $(top_srcdir)/net/test/ut/Makefile.sub
include $(top_srcdir)/net/ut/Makefile.sub
include $(top_srcdir)/pool/ut/Makefile.sub
include $(top_srcdir)/reqh/ut/Makefile.sub
include $(top_srcdir)/rm/ut/Makefile.sub
include $(top_srcdir)/rpc/ub/Makefile.sub
include $(top_srcdir)/rpc/ut/Makefile.sub
include $(top_srcdir)/sm/ut/Makefile.sub
include $(top_srcdir)/sns/cm/repair/ut/Makefile.sub
include $(top_srcdir)/sns/ut/Makefile.sub
include $(top_srcdir)/spiel/ut/Makefile.sub
include $(top_srcdir)/sss/ut/Makefile.sub
include $(top_srcdir)/stob/ut/Makefile.sub
include $(top_srcdir)/stats/ut/Makefile.sub
include $(top_srcdir)/udb/ut/Makefile.sub
include $(top_srcdir)/ut/Makefile.sub
include $(top_srcdir)/xcode/ut/Makefile.sub
include $(top_srcdir)/helpers/ut/Makefile.sub
################################################################################
# Unit tests and benchmarks {{{1
################################################################################
#
# desim/ut -------------------------------------------- {{{2
#
if ENABLE_UNIT_TESTS
noinst_PROGRAMS += desim/ut/net_test
endif
desim_ut_net_test_CPPFLAGS = -DM0_TARGET='net_test' $(AM_CPPFLAGS)
desim_ut_net_test_LDADD = $(top_builddir)/motr/libmotr.la \
$(top_builddir)/ut/libmotr-ut.la
if ENABLE_UNIT_TESTS
noinst_PROGRAMS += desim/ut/chs_test
endif
desim_ut_chs_test_CPPFLAGS = -DM0_TARGET='chs_test' $(AM_CPPFLAGS)
desim_ut_chs_test_LDADD = $(top_builddir)/motr/libmotr.la \
$(top_builddir)/ut/libmotr-ut.la \
@MATH_LIBS@
if ENABLE_UNIT_TESTS
noinst_PROGRAMS += desim/ut/m0t1fs_test
endif
desim_ut_m0t1fs_test_CPPFLAGS = -DM0_TARGET='m0t1fs_test' $(AM_CPPFLAGS)
desim_ut_m0t1fs_test_LDADD = $(top_builddir)/motr/libmotr.la \
$(top_builddir)/ut/libmotr-ut.la
#
# m0t1fs/linux_kernel/ut ------------------------------ {{{2
#
include $(top_srcdir)/m0t1fs/linux_kernel/ut/Makefile.sub
#
# net/lnet/ut ----------------------------------------- {{{2
#
if ENABLE_UNIT_TESTS
bin_PROGRAMS += net/lnet/ut/m0kut-helper
endif
net_lnet_ut_m0kut_helper_CPPFLAGS = -DM0_TARGET='m0kut-helper' $(AM_CPPFLAGS)
net_lnet_ut_m0kut_helper_LDADD = $(top_builddir)/motr/libmotr.la \
$(top_builddir)/ut/libmotr-ut.la
#
# ut/m0ut and ut/m0ub --------------------------------- {{{2
#
if ENABLE_UNIT_TESTS
bin_PROGRAMS += ut/m0ut
bin_SCRIPTS += ut/m0kut
bin_SCRIPTS += ut/m0ut-isolated
bin_SCRIPTS += scripts/xperior/m0gentestds
endif
ut_m0ut_CPPFLAGS = -DM0_TARGET='m0ut' $(AM_CPPFLAGS)
ut_m0ut_LDADD = $(top_builddir)/ut/libmotr-ut.la \
$(top_builddir)/motr/libmotr.la \
$(top_builddir)/net/test/libmotr-net-test.la \
$(top_builddir)/helpers/libmotr-helpers.la \
$(top_builddir)/xcode/ff2c/libmotr-xcode-ff2c.la
if ENABLE_UNIT_TESTS
bin_PROGRAMS += ut/m0ub
endif
ut_m0ub_CPPFLAGS = -DM0_TARGET='m0ub' $(AM_CPPFLAGS)
ut_m0ub_LDADD = $(top_builddir)/motr/libmotr.la \
$(top_builddir)/ut/libmotr-ut.la
include $(top_srcdir)/utils/Makefile.sub
################################################################################
# Integration and system test utilities {{{1
################################################################################
#
# console/st ------------------------------------------ {{{2
#
if ENABLE_UNIT_TESTS
noinst_PROGRAMS += console/st/server
endif
console_st_server_CPPFLAGS = -DM0_TARGET='console-st-server' $(AM_CPPFLAGS)
console_st_server_LDADD = $(top_builddir)/motr/libmotr.la \
$(top_builddir)/ut/libmotr-ut.la
#
# ha/dummy -------------------------------------------- {{{2
#
noinst_PROGRAMS += ha/dummy/hadummy
ha_dummy_hadummy_CPPFLAGS = -DM0_TARGET='hadummy' $(AM_CPPFLAGS)
ha_dummy_hadummy_LDADD = $(top_builddir)/motr/libmotr.la
include $(top_srcdir)/ha/dummy/Makefile.sub
#
# m0t1fs/linux_kernel/st ------------------------------ {{{2
#
# m0t1fs/linux_kernel/st/m0t1fs_f{sync,wait}_test_helper
noinst_PROGRAMS += m0t1fs/linux_kernel/st/m0t1fs_fwait_test_helper
noinst_PROGRAMS += m0t1fs/linux_kernel/st/m0t1fs_fsync_test_helper
m0t1fs_linux_kernel_st_m0t1fs_fsync_test_helper_CPPFLAGS = \
-DM0_TARGET='m0t1fs_fsync_test_helper' $(AM_CPPFLAGS)
m0t1fs_linux_kernel_st_m0t1fs_fwait_test_helper_CPPFLAGS = \
-DM0_TARGET='m0t1fs_fwait_test_helper' $(AM_CPPFLAGS)
noinst_PROGRAMS += m0t1fs/linux_kernel/st/m0t1fs_io_file_pattern
m0t1fs_linux_kernel_st_m0t1fs_io_file_pattern_CPPFLAGS = \
-DM0_TARGET='m0t1fs_io_file_pattern' $(AM_CPPFLAGS)
include $(top_srcdir)/m0t1fs/linux_kernel/st/Makefile.sub
#
# net/bulk_emulation/st ------------------------------- {{{2
#
if ENABLE_UNIT_TESTS
noinst_PROGRAMS += net/bulk_emulation/st/m0bulkping
endif
net_bulk_emulation_st_m0bulkping_CPPFLAGS = -DM0_TARGET='m0bulkping' $(AM_CPPFLAGS)
net_bulk_emulation_st_m0bulkping_LDADD = $(top_builddir)/motr/libmotr.la \
$(top_builddir)/ut/libmotr-ut.la
include $(top_srcdir)/net/bulk_emulation/st/Makefile.sub
#
# net/lnet/st ----------------------------------------- {{{2
#
if ENABLE_UNIT_TESTS
noinst_PROGRAMS += net/lnet/st/m0lnetping
endif
net_lnet_st_m0lnetping_CPPFLAGS = -DM0_TARGET='m0lnetping' $(AM_CPPFLAGS)
net_lnet_st_m0lnetping_LDADD = $(top_builddir)/motr/libmotr.la \
$(top_builddir)/ut/libmotr-ut.la
include $(top_srcdir)/net/lnet/st/Makefile.sub
#
# net/test -------------------------------------------- {{{2
#
sbin_PROGRAMS += net/test/user_space/m0nettest
net_test_user_space_m0nettest_CPPFLAGS = -DM0_TARGET='m0nettest' $(AM_CPPFLAGS)
net_test_user_space_m0nettest_LDADD = $(top_builddir)/motr/libmotr.la \
$(top_builddir)/net/test/libmotr-net-test.la
sbin_PROGRAMS += net/test/user_space/m0nettestd
net_test_user_space_m0nettestd_CPPFLAGS = -DM0_TARGET='m0nettestd' $(AM_CPPFLAGS)
net_test_user_space_m0nettestd_LDADD = $(top_builddir)/motr/libmotr.la \
$(top_builddir)/net/test/libmotr-net-test.la
include $(top_srcdir)/net/test/user_space/Makefile.sub
#
# rm/st ----------------------------------------------- {{{2
#
if ENABLE_UNIT_TESTS
noinst_PROGRAMS += rm/st/m0rwlock
endif
rm_st_m0rwlock_CPPFLAGS = -DM0_TARGET='m0rwlock' $(AM_CPPFLAGS)
rm_st_m0rwlock_LDADD = $(top_builddir)/motr/libmotr.la
include $(top_srcdir)/rm/st/Makefile.sub
#
# rpc/it/m0rpcping ------------------------------------ {{{2
#
if ENABLE_UNIT_TESTS
noinst_PROGRAMS += rpc/it/m0rpcping
endif
rpc_it_m0rpcping_CPPFLAGS = -DM0_TARGET='m0rpcping' $(AM_CPPFLAGS)
rpc_it_m0rpcping_LDADD = $(top_builddir)/motr/libmotr.la \
$(top_builddir)/ut/libmotr-ut.la
if ENABLE_UNIT_TESTS
if ENABLE_MOTR_ALTOGETHER
noinst_PROGRAMS += rpc/it/m0rpcping-altogether
endif
endif
rpc_it_m0rpcping_altogether_CPPFLAGS = -DM0_TARGET='m0rpcping-altogether' $(AM_CPPFLAGS)
rpc_it_m0rpcping_altogether_SOURCES = $(rpc_it_m0rpcping_SOURCES)
# for autogenerated source files
nodist_rpc_it_m0rpcping_altogether_SOURCES = $(nodist_rpc_it_m0rpcping_SOURCES)
rpc_it_m0rpcping_altogether_LDADD = $(top_builddir)/motr/libmotr-altogether.la \
$(top_builddir)/ut/libmotr-ut.la
rpc_it_m0rpcping_altogether_LDFLAGS = -Wl,--unresolved-symbols=ignore-in-shared-libs
include $(top_srcdir)/rpc/it/Makefile.sub
#
# sns/cm/st ------------------------------------------- {{{2
#
sbin_PROGRAMS += sns/cm/st/m0repair
sns_cm_st_m0repair_CPPFLAGS = -DM0_TARGET='m0repair' $(AM_CPPFLAGS)
sns_cm_st_m0repair_LDADD = $(top_builddir)/motr/libmotr.la
include $(top_srcdir)/sns/cm/st/Makefile.sub
#
# motr/st ------------------------------------------- {{{2
#
sbin_PROGRAMS += motr/st/utils/m0composite
if ENABLE_UNIT_TESTS
noinst_PROGRAMS += motr/st/user_space/m0st
noinst_PROGRAMS += motr/st/utils/m0cc_cp_cat
endif
bin_PROGRAMS += motr/st/utils/m0touch
bin_PROGRAMS += motr/st/utils/m0unlink
bin_PROGRAMS += motr/st/utils/m0cat
bin_PROGRAMS += motr/st/utils/m0cp
bin_PROGRAMS += motr/st/utils/m0trunc
bin_PROGRAMS += motr/st/mt/m0mt
bin_PROGRAMS += motr/st/utils/m0cp_mt
bin_PROGRAMS += motr/st/utils/m0client
motr_st_user_space_m0st_CPPFLAGS = -DM0_TARGET='m0st' $(AM_CPPFLAGS)
motr_st_user_space_m0st_LDADD = $(top_builddir)/motr/libmotr.la
motr_st_mt_m0mt_CPPFLAGS = -DM0_TARGET='m0mt' $(AM_CPPFLAGS)
motr_st_mt_m0mt_LDADD = $(top_builddir)/motr/libmotr.la
motr_st_utils_m0trunc_CPPFLAGS = -DM0_TARGET='m0trunc' $(AM_CPPFLAGS)
motr_st_utils_m0trunc_LDADD = $(top_builddir)/motr/libmotr.la
motr_st_utils_m0touch_CPPFLAGS = -DM0_TARGET='m0touch' $(AM_CPPFLAGS)
motr_st_utils_m0touch_LDADD = $(top_builddir)/motr/libmotr.la
motr_st_utils_m0unlink_CPPFLAGS = -DM0_TARGET='m0unlink' $(AM_CPPFLAGS)
motr_st_utils_m0unlink_LDADD = $(top_builddir)/motr/libmotr.la
motr_st_utils_m0client_CPPFLAGS = -DM0_TARGET='m0client' $(AM_CPPFLAGS)
motr_st_utils_m0client_LDADD = $(top_builddir)/motr/libmotr.la
motr_st_utils_m0cat_CPPFLAGS = -DM0_TARGET='m0cat' $(AM_CPPFLAGS)
motr_st_utils_m0cat_LDADD = $(top_builddir)/motr/libmotr.la
motr_st_utils_m0cp_CPPFLAGS = -DM0_TARGET='m0cp' $(AM_CPPFLAGS)
motr_st_utils_m0cp_LDADD = $(top_builddir)/motr/libmotr.la
motr_st_utils_m0cc_cp_cat_CPPFLAGS = -DM0_TARGET='m0cc_cp_cat' $(AM_CPPFLAGS)
motr_st_utils_m0cc_cp_cat_LDADD = $(top_builddir)/motr/libmotr.la
motr_st_utils_m0cp_mt_CPPFLAGS = -DM0_TARGET='m0cp_mt' $(AM_CPPFLAGS)
motr_st_utils_m0cp_mt_LDADD = $(top_builddir)/motr/libmotr.la
motr_st_utils_m0composite_CPPFLAGS = -DM0_TARGET='m0comp' $(AM_CPPFLAGS)
motr_st_utils_m0composite_LDADD = $(top_builddir)/motr/libmotr.la
include $(top_srcdir)/motr/st/Makefile.sub
include $(top_srcdir)/motr/st/mt/Makefile.sub
#
# motr/m0kv ----------------------------------------- {{{2
#
sbin_PROGRAMS += motr/m0kv/m0kv
motr_m0kv_m0kv_CPPFLAGS = -DM0_TARGET='m0kv' $(AM_CPPFLAGS)
motr_m0kv_m0kv_LDADD = $(top_builddir)/motr/libmotr.la \
@UUID_LIBS@
include $(top_srcdir)/motr/m0kv/Makefile.sub
#
# motr/examples ----------------------------------------- {{{2
#
noinst_PROGRAMS += motr/examples/example1
noinst_PROGRAMS += motr/examples/example2
motr_examples_example1_CPPFLAGS = -DM0_TARGET='example1' $(AM_CPPFLAGS)
motr_examples_example1_LDADD = $(top_builddir)/motr/libmotr.la
motr_examples_example2_CPPFLAGS = -DM0_TARGET='example2' $(AM_CPPFLAGS)
motr_examples_example2_LDADD = $(top_builddir)/motr/libmotr.la
include $(top_srcdir)/motr/examples/Makefile.sub
#
# fdmi/plugins/fdmi_sample_plugin --------------------- {{{2
#
noinst_PROGRAMS += fdmi/plugins/fdmi_sample_plugin
fdmi_plugins_fdmi_sample_plugin_CPPFLAGS = -DM0_TARGET='fdmi_sample_plugin' $(AM_CPPFLAGS)
fdmi_plugins_fdmi_sample_plugin_LDADD = $(top_builddir)/motr/libmotr.la
include $(top_srcdir)/fdmi/plugins/Makefile.sub
#
# motr/crate ----------------------------------------- {{{2
#
sbin_PROGRAMS += motr/m0crate/m0crate
motr_m0crate_m0crate_CPPFLAGS = -DM0_TARGET='m0crate' $(AM_CPPFLAGS)
motr_m0crate_m0crate_LDADD = $(top_builddir)/motr/libmotr.la \
@AIO_LIBS@ @RT_LIBS@ @YAML_LIBS@
include $(top_srcdir)/motr/m0crate/Makefile.sub
#
# dix/m0dixinit --------------------------------------- {{{2
#
sbin_PROGRAMS += dix/utils/m0dixinit
dix_utils_m0dixinit_CPPFLAGS = -DM0_TARGET='m0dixinit' $(AM_CPPFLAGS)
dix_utils_m0dixinit_LDADD = $(top_builddir)/motr/libmotr.la
include $(top_srcdir)/dix/utils/Makefile.sub
#
# utils/trace ----------------------------------------- {{{2
#
bin_SCRIPTS += utils/trace/m0trace \
utils/trace/m0kdump2trace
sbin_SCRIPTS += utils/trace/m0tracepurge \
utils/m0provision
bin_PROGRAMS += utils/trace/m0tracedump
utils_trace_m0tracedump_LDADD = $(top_builddir)/motr/libmotr.la
bin_PROGRAMS += utils/trace/m0traced
utils_trace_m0traced_LDADD = $(top_builddir)/motr/libmotr.la
include $(top_srcdir)/utils/trace/Makefile.sub
#
# utils/m0spiel --------------------------------------- {{{2
#
bin_SCRIPTS += utils/spiel/m0spiel
bin_SCRIPTS += utils/spiel/m0_filesystem_stats
#
# utils/mkfs ------------------------------------------ {{{2
#
sbin_PROGRAMS += utils/mkfs/m0mkfs
utils_mkfs_m0mkfs_LDADD = $(top_builddir)/motr/libmotr.la
utils/mkfs/m0mkfs.o: xcode/protocol_checksum.h
# cas/ctgdump ------------------------------------------ {{{2
#
sbin_PROGRAMS += cas/m0ctgdump
cas_m0ctgdump_LDADD = $(top_builddir)/motr/libmotr.la
cas/m0ctgdump.o: xcode/protocol_checksum.h
#
# utils/layout ---------------------------------------- {{{2
#
sbin_PROGRAMS += utils/layout/m0layout
utils_layout_m0layout_CPPFLAGS = -DM0_TARGET='m0layout' $(AM_CPPFLAGS)
utils_layout_m0layout_LDADD = $(top_builddir)/motr/libmotr.la \
@MATH_LIBS@
#
# utils ----------------------------------------------- {{{2
#
bin_SCRIPTS += utils/m0confgen \
utils/m0hagen
sbin_SCRIPTS += utils/m0gendisks \
utils/m0reportbug \
utils/m0run \
utils/m0setup \
utils/m0singlenode
ivtdir = /opt/seagate/cortx/motr/workload
include $(top_srcdir)/scripts/workload/Makefile.sub
if ENABLE_IVT_TESTS
ivt_SCRIPTS += scripts/workload/m0workload \
scripts/workload/create_workload_from_excel \
scripts/workload/sample_workload_excel_test.xls \
scripts/workload/mix_workload.yaml \
scripts/workload/m0crate_workload_batch_1_file1.yaml
endif
#
# fdmi/st/echo_plugin
#
include $(top_srcdir)/fdmi/st/Makefile.sub
if ENABLE_UNIT_TESTS
noinst_PROGRAMS += fdmi/st/echo/m0fdmiecho
endif
fdmi_st_echo_m0fdmiecho_CPPFLAGS = -DM0_TARGET='echo_plugin' $(AM_CPPFLAGS)
fdmi_st_echo_m0fdmiecho_LDADD = $(top_builddir)/motr/libmotr.la \
$(top_builddir)/ut/libmotr-ut.la
include $(top_srcdir)/fdmi/st/echo/Makefile.sub
################################################################################
# Public utilities {{{1
################################################################################
#
# motr/m0d -------------------------------------------- {{{2
#
bin_PROGRAMS += motr/m0d
motr_m0d_CPPFLAGS = -DM0_TARGET='m0d' $(AM_CPPFLAGS)
if HAVE_SYSTEMD
motr_m0d_LDFLAGS = @SYSTEMD_LIBS@
endif
motr_m0d_LDADD = $(top_builddir)/motr/libmotr.la
#
# motr/m0d-altogether --------------------------------- {{{2
#
if ENABLE_MOTR_ALTOGETHER
bin_PROGRAMS += motr/m0d-altogether
endif
motr_m0d_altogether_CPPFLAGS = -DM0_TARGET='m0d-altogether' $(AM_CPPFLAGS)
if HAVE_SYSTEMD
motr_m0d_altogether_LDFLAGS = @SYSTEMD_LIBS@
endif
motr_m0d_altogether_SOURCES = $(motr_m0d_SOURCES)
motr_m0d_altogether_LDADD = $(top_builddir)/motr/libmotr-altogether.la
#
# console/m0console ----------------------------------- {{{2
#
sbin_PROGRAMS += console/m0console
console_m0console_CPPFLAGS = -DM0_TARGET='m0console' $(AM_CPPFLAGS)
console_m0console_LDADD = $(top_builddir)/motr/libmotr.la
#
# ha/m0ham -------------------------------------------- {{{2
#
sbin_PROGRAMS += ha/m0ham
ha_m0ham_CPPFLAGS = -DM0_TARGET='m0ham' $(AM_CPPFLAGS)
ha_m0ham_LDADD = $(top_builddir)/motr/libmotr.la
#
# pool/m0poolmach ------------------------------------- {{{2
#
sbin_PROGRAMS += pool/m0poolmach
pool_m0poolmach_CPPFLAGS = -DM0_TARGET='m0poolmach' $(AM_CPPFLAGS)
pool_m0poolmach_LDADD = $(top_builddir)/motr/libmotr.la
#
# addb2/m0addb2dump ----------------------------------- {{{2
#
sbin_PROGRAMS += addb2/m0addb2dump
addb2_m0addb2dump_CPPFLAGS = -DM0_TARGET='m0addb2dump' $(AM_CPPFLAGS)
addb2_m0addb2dump_LDADD = $(top_builddir)/motr/libmotr.la -lbfd -ldl
#
# xcode/m0protocol ------------------------------------ {{{2
#
bin_SCRIPTS += xcode/m0gccxml2xcode
sbin_PROGRAMS += xcode/m0protocol
xcode_m0protocol_CPPFLAGS = -DM0_TARGET='m0protocol' $(AM_CPPFLAGS)
xcode_m0protocol_LDADD = $(top_builddir)/motr/libmotr.la
#
# be/tool/m0betool ------------------------------------ {{{2
#
sbin_PROGRAMS += be/tool/m0betool
be_tool_m0betool_CPPFLAGS = -DM0_TARGET='m0betool' $(AM_CPPFLAGS)
be_tool_m0betool_LDADD = $(top_builddir)/motr/libmotr.la
#
# be/tool/m0beck -------------------------------------- {{{2
#
#TBD: Uncomment following block after CORTX-32593 is fixed.
#sbin_PROGRAMS += be/tool/m0beck
#be_tool_m0beck_CPPFLAGS = -DM0_TARGET='m0beck' $(AM_CPPFLAGS)
#be_tool_m0beck_LDADD = $(top_builddir)/motr/libmotr.la \
# @YAML_LIBS@
#
# scripts/systemtap/kem/m0kemc ----------------------------------- {{{2
#
sbin_PROGRAMS += scripts/systemtap/kem/m0kemc
scripts_systemtap_kem_m0kemc_CPPFLAGS = -DM0_TARGET='m0kemc' $(AM_CPPFLAGS)
scripts_systemtap_kem_m0kemc_LDADD = $(top_builddir)/motr/libmotr.la -lbfd -ldl
#
# hsm/m0hsm ------------------------------------------- {{{2
#
bin_PROGRAMS += hsm/m0hsm
hsm_m0hsm_CPPFLAGS = -DM0_TARGET='m0hsm' $(AM_CPPFLAGS)
hsm_m0hsm_LDADD = $(top_builddir)/motr/libmotr.la @LIBEDIT_LIBS@
include $(top_srcdir)/hsm/Makefile.sub
################################################################################
# isc/libm0isc.so,m0iscdemo,m0iscreg ------------------------------------ {{{2
#
lib_LTLIBRARIES += iscservice/demo/libm0isc.la
iscservice_demo_libm0isc_la_CPPFLAGS = -DM0_TARGET='libm0isc' $(AM_CPPFLAGS)
iscservice_demo_libm0isc_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS)
bin_PROGRAMS += iscservice/demo/m0iscdemo
iscservice_demo_m0iscdemo_CPPFLAGS = -DM0_TARGET='m0iscdemo' $(AM_CPPFLAGS)
iscservice_demo_m0iscdemo_LDADD = $(top_builddir)/motr/libmotr.la
bin_PROGRAMS += iscservice/demo/m0iscreg
iscservice_demo_m0iscreg_CPPFLAGS = -DM0_TARGET='m0iscreg' $(AM_CPPFLAGS)
iscservice_demo_m0iscreg_LDADD = $(top_builddir)/motr/libmotr.la
include $(top_srcdir)/iscservice/demo/Makefile.sub
################################################################################
# Init scripts and config files {{{1
################################################################################
usr_lib_systemddir = $(prefix)/lib/systemd/system
usr_lib_systemd_DATA = scripts/install/usr/lib/systemd/system/motr-client.service \
scripts/install/usr/lib/systemd/system/motr-cleanup.service \
scripts/install/usr/lib/systemd/system/motr-kernel.service \
scripts/install/usr/lib/systemd/system/motr-mkfs.service \
scripts/install/usr/lib/systemd/system/[email protected] \
scripts/install/usr/lib/systemd/system/motr-server-confd.service \
scripts/install/usr/lib/systemd/system/motr-server-ha.service \
scripts/install/usr/lib/systemd/system/[email protected] \
scripts/install/usr/lib/systemd/system/[email protected] \
scripts/install/usr/lib/systemd/system/[email protected] \
scripts/install/usr/lib/systemd/system/motr.service \
scripts/install/usr/lib/systemd/system/motr-singlenode.service \
scripts/install/usr/lib/systemd/system/[email protected] \
scripts/install/usr/lib/systemd/system/motr-free-space-monitor.service
EXTRA_DIST += $(usr_lib_systemd_DATA)
usr_lib_udevrulesdir = $(prefix)/lib/udev/rules.d
usr_lib_udevrules_DATA = scripts/install/usr/lib/udev/rules.d/99-motr.rules
EXTRA_DIST += $(usr_lib_udevrules_DATA)
etc_sysconfigdir = $(sysconfdir)/sysconfig
etc_sysconfig_DATA = scripts/install/etc/sysconfig/motr
EXTRA_DIST += $(etc_sysconfig_DATA)
etc_sysconfig_freespacedir = $(sysconfdir)/sysconfig
etc_sysconfig_freespace_DATA = scripts/install/etc/sysconfig/motr-free-space-monitor
EXTRA_DIST += $(etc_sysconfig_freespace_DATA)
etc_limitsdir = $(sysconfdir)/security/limits.d
etc_limits_DATA = scripts/install/etc/security/limits.d/90-motr.conf
EXTRA_DIST += $(etc_limits_DATA)
motrdir = /opt/seagate/cortx/motr
motr_libexecdir = $(motrdir)/libexec
motr_libexec_SCRIPTS = \
scripts/install$(motrdir)/libexec/m0reportbug-bundler \
scripts/install$(motrdir)/libexec/m0_ha_sim \
scripts/install$(motrdir)/libexec/motr_data_recovery.sh \
scripts/install$(motrdir)/libexec/m0trace_logrotate.sh \
scripts/install$(motrdir)/libexec/core_logrotate.sh \
scripts/install$(motrdir)/libexec/motr_cfg.sh \
scripts/install$(motrdir)/libexec/m0addb_logrotate.sh \
scripts/install$(motrdir)/libexec/motr_mini_prov_logrotate.sh
EXTRA_DIST += $(motr_libexec_SCRIPTS)
motr_crondir = $(sysconfdir)/cron.hourly
motr_cron_SCRIPTS = \
scripts/install$(motrdir)/libexec/m0trace_logrotate.sh \
scripts/install$(motrdir)/libexec/m0addb_logrotate.sh \
scripts/install$(motrdir)/libexec/motr_mini_prov_logrotate.sh
EXTRA_DIST += $(motr_cron_SCRIPTS)