forked from igaw/jitterdebugger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (38 loc) · 1.28 KB
/
Makefile
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
# SPDX-License-Identifier: MIT
CFLAGS += -pthread -Wall -Wstrict-aliasing=1 -Wno-unused-result \
-Wsign-compare -Wtype-limits -Wmissing-prototypes \
-Wstrict-prototypes
LDFLAGS += -pthread
ifdef DEBUG
CFLAGS += -O0 -g
LDFLAGS += -g
else
CFLAGS += -O2
endif
TARGETS=jitterdebugger jittersamples
all: $(TARGETS)
jitterdebugger: jd_utils.o jd_work.o jd_sysinfo.o jitterdebugger.o
jittersamples_builtin_modules = jd_samples_csv
# Determine if HDF5 support will be built into jittersamples
JSCC=${CC}
ifneq ("$(wildcard /usr/include/hdf5.h)", "")
CFLAGS += -DCONFIG_HDF5
JSCC = h5cc -shlib
jittersamples_builtin_modules += jd_samples_hdf5
endif
jittersamples_builtin_sources = $(addsuffix .c,$(jittersamples_builtin_modules))
jittersamples_builtin_objs = $(addsuffix .o,$(jittersamples_builtin_modules))
jittersamples_objs = jd_utils.o $(jittersamples_builtin_objs) \
jd_samples_builtin.o jd_plugin.o jittersamples.o
jd_samples_builtin.c: scripts/genbuiltin $(jittersamples_builtin_sources)
scripts/genbuiltin $(jittersamples_builtin_modules) > $@
$(jittersamples_objs): %.o: %.c
export HDF5_CC=${CC}
$(JSCC) ${CFLAGS} -D_FILENAME=$(basename $<) -c $< -o $@
jittersamples: $(jittersamples_objs)
$(JSCC) $^ -o $@
PHONY: .clean
clean:
rm -f *.o
rm -f $(TARGETS)
rm -f jd_samples_builtin.c