[go: up one dir, main page]

File: Makefile

package info (click to toggle)
cctools 9.9-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 44,624 kB
  • sloc: ansic: 192,539; python: 20,827; cpp: 20,199; sh: 11,719; perl: 4,106; xml: 3,688; makefile: 1,224
file content (228 lines) | stat: -rw-r--r-- 4,517 bytes parent folder | download
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
include ../../config.mk
include ../../rules.mk

SOURCES = \
	address.c \
	auth.c \
	auth_address.c \
	auth_all.c \
	auth_globus.c \
	auth_hostname.c \
	auth_kerberos.c \
	auth_ticket.c \
	auth_unix.c \
	b64.c \
	bitmap.c \
	buffer.c \
	catalog_query.c \
	category.c \
	cctools.c \
	cctools_endian.c \
	change_process_title.c \
	chunk.c \
	clean_dir.c \
	compat-at.c \
	console_login.c \
	copy_stream.c \
	copy_tree.c \
	create_dir.c \
	daemon.c \
	datagram.c \
	debug.c \
	debug_file.c \
	debug_journal.c \
	debug_stream.c \
	debug_syslog.c \
	disk_alloc.c \
	domain_name.c \
	domain_name_cache.c \
	dpopen.c \
	elfheader.c \
	envtools.c \
	env_replace.c \
	fast_popen.c \
	fd.c \
	file_cache.c \
	full_io.c \
	get_canonical_path.c \
	get_line.c \
	getopt.c \
	getopt_aux.c \
	gpu_info.c \
	hash_cache.c \
	hash_table.c \
	hdfs_library.c \
	histogram.c \
	hmac.c \
	host_disk_info.c \
	host_memory_info.c \
	http_query.c \
	interfaces_address.c \
	itable.c \
	jx.c \
	jx_binary.c\
	jx_getopt.c \
	jx_match.c \
	jx_parse.c \
	jx_print.c \
	jx_pretty_print.c \
	jx_canonicalize.c \
	jx_table.c \
	jx_export.c \
	jx_eval.c \
	jx_sub.c \
	jx_function.c \
	link.c \
	link_auth.c \
	list.c \
	load_average.c \
	md5.c \
	memfdexe.c \
	mkdir_recursive.c \
	mq.c \
	twister.c \
	nvpair.c \
	nvpair_jx.c \
	password_cache.c \
	path.c \
	path_disk_size_info.c \
	pattern.c \
	ppoll_compat.c \
	preadwrite.c \
	process.c \
	random.c \
	rmonitor.c \
	rmonitor_poll.c \
	rmsummary.c \
	set.c \
	semaphore.c \
	sha1.c \
	shell.c \
	sh_popen.c\
	sigdef.c \
	sleeptools.c \
	sort_dir.c \
	stats.c \
	string_array.c \
	stringtools.c \
	string_set.c \
	text_array.c \
	text_list.c \
	timer.c \
	timestamp.c \
	tlq_config.c \
	unlink_recursive.c \
	uptime.c \
	url_encode.c \
	username.c \
	uuid.c \
	xxmalloc.c \

HEADERS_PUBLIC = \
	auth.h \
	auth_address.h \
	auth_all.h \
	auth_globus.h \
	auth_hostname.h \
	auth_kerberos.h \
	auth_ticket.h \
	auth_unix.h \
	bitmap.h \
	buffer.h \
	category.h \
	cctools.h \
	copy_tree.h \
	compat-at.h \
	debug.h \
	delete_dir.h \
	envtools.h \
	fast_popen.h \
	full_io.h \
	getopt.h \
	getopt_aux.h \
	hash_table.h \
	histogram.h \
	host_memory_info.h \
	http_query.h \
	int_sizes.h \
	itable.h \
	jx.h \
	jx_match.h \
	link.h \
	list.h \
	load_average.h \
	md5.h \
	macros.h \
	mq.h \
	path.h \
	rmonitor_poll.h \
	rmsummary.h \
	stringtools.h \
	text_array.h \
	text_list.h \
	timestamp.h \
	unlink_recursive.h \
	xxmalloc.h \

LIBRARIES = libdttools.a

ifneq ($(CCTOOLS_STATIC),1)
PRELOAD_LIBRARIES = libforce_halt_enospc.so
endif

ifeq ($(CCTOOLS_CURL_AVAILABLE),yes)
CCTOOLS_EXTERNAL_LINKAGE += $(CCTOOLS_CURL_LDFLAGS) -lssl -lcrypto
SOURCES += s3_file_io.c
HEADERS_PUBLIC += s3_file_io.h
endif

OBJECTS = $(SOURCES:%.c=%.o)

#separate, because catalog_query has a slightly different order of linking.
MOST_PROGRAMS = catalog_update watchdog disk_allocator jx2json jx2env jx_repl env_replace
PROGRAMS = $(MOST_PROGRAMS) catalog_query

SCRIPTS = cctools_gpu_autodetect
TARGETS = $(LIBRARIES) $(PRELOAD_LIBRARIES) $(PROGRAMS) $(TEST_PROGRAMS)
TEST_PROGRAMS = auth_test disk_alloc_test jx_test microbench multirun jx_count_obj_test histogram_test category_test jx_binary_test mq_poll_test mq_wait_test mq_store_test

all: $(TARGETS) catalog_query

libdttools.a: $(OBJECTS)

$(MOST_PROGRAMS) $(TEST_PROGRAMS): libdttools.a

jx_repl: jx_repl.o libdttools.a
	$(CCTOOLS_LD) -o $@ $(CCTOOLS_INTERNAL_LDFLAGS) $(LOCAL_LDFLAGS) $^ $(LOCAL_LINKAGE) $(CCTOOLS_EXTERNAL_LINKAGE) $(CCTOOLS_READLINE_LDFLAGS)

catalog_query: catalog_query.o catalog_query_tool.o libdttools.a

auth_globus.o: auth_globus.c
	$(CCTOOLS_CC) -o $@ -c $(CCTOOLS_INTERNAL_CCFLAGS) $(LOCAL_CCFLAGS) $(CCTOOLS_GLOBUS_CCFLAGS) $<

auth_test: auth_test.o libdttools.a
ifeq ($(CCTOOLS_STATIC),1)
	@echo "auth_test currently cannot be build statically."
else
	$(CCTOOLS_LD) -o $@ $(CCTOOLS_INTERNAL_LDFLAGS) $(LOCAL_LDFLAGS) $^ $(LOCAL_LINKAGE) $(CCTOOLS_GLOBUS_LDFLAGS) $(CCTOOLS_EXTERNAL_LINKAGE)
endif

libforce_halt_enospc.so: libforce_halt_enospc.o
	$(CCTOOLS_CC) -shared -fPIC $^ -o $@ -ldl

clean:
	rm -f $(OBJECTS) $(TARGETS) *.o

install: all
	mkdir -p $(CCTOOLS_INSTALL_DIR)/bin
	cp $(SCRIPTS) $(PROGRAMS) $(CCTOOLS_INSTALL_DIR)/bin/
	mkdir -p $(CCTOOLS_INSTALL_DIR)/lib
	cp $(LIBRARIES) $(PRELOAD_LIBRARIES) $(CCTOOLS_INSTALL_DIR)/lib/
	mkdir -p $(CCTOOLS_INSTALL_DIR)/include/cctools
	cp $(HEADERS_PUBLIC) $(CCTOOLS_INSTALL_DIR)/include/cctools/

test: all

.PHONY: all clean install test

# vim: set noexpandtab tabstop=4: