-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile.am
39 lines (30 loc) · 1.14 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
AM_CFLAGS = -Wall
noinst_PROGRAMS = functions2yaml
functions2yaml_SOURCES = functions2yaml.c
lib_LTLIBRARIES = libretracerpc.la
libretracerpc_la_LDFLAGS = -no-undefined -avoid-version
libretracerpc_la_CFLAGS = $(AM_CFLAGS) $(LIBSSL_FLAGS)
noinst_HEADERS = rpc.h shim.h frontend.h backend.h functions.h tracefd.h backtrace.h
libretracerpc_la_SOURCES = shim.c version.c backend.c
bin_PROGRAMS = retrace
retrace_SOURCES = retrace.c version.c handlers.c frontend.c functions.c display.c tracefd.c backtrace.c
if LINUX
MD5SUM=md5sum
else
MD5SUM=md5
endif
FUNCTIONS_DEPS= shim.c shim.h handlers.c functions.c functions.h
BUILT_SOURCES= $(FUNCTIONS_DEPS) version.c
CLEANFILES= $(BUILT_SOURCES) functions.yaml
shim.h: shim.h.template
shim.c: shim.c.template
functions.h: functions.h.template
functions.c: functions.c.template
handlers.c : handlers.c.template
$(FUNCTIONS_DEPS): functions.yaml
$(FUNCTIONS_DEPS):
mustache - $@.template <functions.yaml >$@
version.c : $(FUNCTION_DEPS)
echo const char *retrace_version = \"$$(cat $(FUNCTIONS_DEPS) | $(MD5SUM) | cut -c1-32)\"\; >$@
functions.yaml : functions.txt functions2yaml
./functions2yaml <functions.txt >$@