-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·37 lines (31 loc) · 760 Bytes
/
Makefile
File metadata and controls
executable file
·37 lines (31 loc) · 760 Bytes
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
#
# mktime(3) wrapper library
#
# Usage: make [test|bench|clean]
#
# Copyright (C) 2014 Mitchell Perilstein
# Licensed under GNU LGPL Version 3. See LICENSING file for details.
#
LIB = libfast-mktime.so.1
ALL = $(LIB) benchmark unittest
all: $(ALL)
$(LIB): fast-mktime.c
gcc -Wall -pedantic -fPIC -shared -o $@ $< -ldl
test: $(ALL)
@echo
@echo '## Testing once with stock mktime and once with wrapper.'
@echo '## Expect all "okay" results'
@echo
./unittest
@echo
LD_PRELOAD=./$(LIB) ./unittest
bench:
@echo
@echo '## Benchmarking once with stock mktime and once with wrapper.'
@echo '## 3 trials of 1e6 sequential dates will be run.'
@echo
./benchmark 3 1000000
@echo
LD_PRELOAD=./$(LIB) ./benchmark 3 1000000
clean:
@rm -f $(ALL)