Debian Codegraph @

test/Makefile

raw
1 #------------------------------------------------------------------------------
2 # Copyright (c) 2016, 2025, Oracle and/or its affiliates.
3 #
4 # This software is dual-licensed to you under the Universal Permissive License
5 # (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
6 # 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose
7 # either license.
8 #
9 # If you elect to accept the software under the Apache License, Version 2.0,
10 # the following applies:
11 #
12 # Licensed under the Apache License, Version 2.0 (the "License");
13 # you may not use this file except in compliance with the License.
14 # You may obtain a copy of the License at
15 #
16 # https://www.apache.org/licenses/LICENSE-2.0
17 #
18 # Unless required by applicable law or agreed to in writing, software
19 # distributed under the License is distributed on an "AS IS" BASIS,
20 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 # See the License for the specific language governing permissions and
22 # limitations under the License.
23 #
24 #------------------------------------------------------------------------------
25 #
26 # Sample Makefile if you wish to build the ODPI-C test executables.
27 #
28 # Look at README.md for information on how to build and run the tests.
29 #------------------------------------------------------------------------------
30
31 BUILD_DIR = build
32 INCLUDE_DIR = ../include
33 LIB_DIR = ../lib
34
35 CC = gcc
36 LD = gcc
37 CFLAGS = -I$(INCLUDE_DIR) -O2 -g -Wall
38 LIBS = -L$(LIB_DIR) -lodpic
39 COMMON_OBJS = $(BUILD_DIR)/TestLib.o
40
41 SOURCES = TestSuiteRunner.c \
42 test_1000_context.c \
43 test_1100_numbers.c \
44 test_1200_conn.c \
45 test_1300_conn_properties.c \
46 test_1400_pool.c \
47 test_1500_pool_properties.c \
48 test_1600_queries.c \
49 test_1700_transactions.c \
50 test_1800_misc.c \
51 test_1900_variables.c \
52 test_2000_statements.c \
53 test_2100_data_types.c \
54 test_2200_object_types.c \
55 test_2300_objects.c \
56 test_2400_enq_options.c \
57 test_2500_deq_options.c \
58 test_2600_msg_props.c \
59 test_2700_aq.c \
60 test_2800_lobs.c \
61 test_2900_implicit_results.c \
62 test_3000_scroll_cursors.c \
63 test_3100_subscriptions.c \
64 test_3200_batch_errors.c \
65 test_3300_dml_returning.c \
66 test_3400_soda_db.c \
67 test_3500_soda_coll.c \
68 test_3600_soda_coll_cursor.c \
69 test_3700_soda_doc.c \
70 test_3800_soda_doc_cursor.c \
71 test_3900_sess_tags.c \
72 test_4000_queue.c \
73 test_4100_binds.c \
74 test_4200_rowids.c \
75 test_4300_json.c \
76 test_4400_vector.c \
77 test_4500_sessionless_txn.c
78 BINARIES = $(SOURCES:%.c=$(BUILD_DIR)/%)
79
80 all: $(BUILD_DIR) $(BINARIES)
81
82 clean:
83 rm -rf $(BUILD_DIR)
84
85 $(BUILD_DIR):
86 mkdir -p $@
87
88 $(BUILD_DIR)/%.o: %.c TestLib.h
89 $(CC) -c $(CFLAGS) -o $@ $<
90
91 $(BUILD_DIR)/%: $(BUILD_DIR)/%.o $(COMMON_OBJS)
92 $(LD) $(LDFLAGS) $< -o $@ $(COMMON_OBJS) $(LIBS)