1# ===========================================================================
2#
3#                            PUBLIC DOMAIN NOTICE
4#               National Center for Biotechnology Information
5#
6#  This software/database is a "United States Government Work" under the
7#  terms of the United States Copyright Act.  It was written as part of
8#  the author's official duties as a United States Government employee and
9#  thus cannot be copyrighted.  This software/database is freely available
10#  to the public for use. The National Library of Medicine and the U.S.
11#  Government have not placed any restriction on its use or reproduction.
12#
13#  Although all reasonable efforts have been taken to ensure the accuracy
14#  and reliability of the software and data, the NLM and the U.S.
15#  Government do not and cannot warrant the performance or results that
16#  may be obtained by using this software or data. The NLM and the U.S.
17#  Government disclaim all warranties, express or implied, including
18#  warranties of performance, merchantability or fitness for any particular
19#  purpose.
20#
21#  Please cite the author in any work or product based on this material.
22#
23# ===========================================================================
24
25
26default: runtests
27
28TOP ?= $(abspath ../..)
29MODULE = test/cloud
30
31TEST_TOOLS = \
32	test-aws \
33	test-gcp \
34	test-cloud \
35
36include $(TOP)/build/Makefile.env
37
38ALL_TOOLS = \
39	$(INT_TOOLS) \
40	$(EXT_TOOLS)
41
42#-------------------------------------------------------------------------------
43# outer targets
44#
45all std: makedirs
46	@ $(MAKE_CMD) $(TARGDIR)/$@
47
48$(ALL_TOOLS): makedirs
49	@ $(MAKE_CMD) $(BINDIR)/$@
50
51.PHONY: all std $(ALL_TOOLS)
52
53#-------------------------------------------------------------------------------
54# all
55#
56$(TARGDIR)/all: \
57	$(addprefix $(BINDIR)/,$(ALL_TOOLS))
58
59.PHONY: $(TARGDIR)/all
60
61#-------------------------------------------------------------------------------
62# std
63#
64$(TARGDIR)/std: \
65	$(addprefix $(BINDIR)/,$(EXT_TOOLS))
66
67$(TEST_TOOLS): makedirs
68	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
69
70clean: stdclean
71
72#----------------------------------------------------------------
73# test-cloud
74#
75CLOUD_SRC = \
76	test-cloud
77
78CLOUD_OBJ = \
79	$(addsuffix .$(OBJX),$(CLOUD_SRC))
80
81CLOUD_LIB = \
82	-skapp \
83    -sncbi-vdb \
84    -sktst \
85
86$(TEST_BINDIR)/test-cloud: $(CLOUD_OBJ)
87	$(LP) --exe -o $@ $^ $(CLOUD_LIB)
88
89cloud: test-cloud
90	$(TEST_BINDIR)/test-cloud  #-l=all
91
92#----------------------------------------------------------------
93# test-aws
94#
95A_SRC = \
96	test-aws
97
98A_OBJ = \
99	$(addsuffix .$(OBJX),$(A_SRC))
100
101$(TEST_BINDIR)/test-aws: $(A_OBJ)
102	$(LP) --exe -o $@ $^ $(CLOUD_LIB)
103
104#----------------------------------------------------------------
105# test-gcp
106#
107G_SRC = \
108	test-gcp TestStream
109
110G_OBJ = \
111	$(addsuffix .$(OBJX),$(G_SRC))
112
113$(TEST_BINDIR)/test-gcp: $(G_OBJ)
114	$(LP) --exe -o $@ $^ $(CLOUD_LIB)
115
116gcp: test-gcp
117	$(TEST_BINDIR)/test-gcp  #-l=all