Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # SPDX-License-Identifier: GPL-3.0-or-later
  2. COMMON_CFLAGS = -I ../../ -Wall -Wextra
  3. PROFILE_CFLAGS = -O1 -ggdb $(COMMON_CFLAGS)
  4. PERFORMANCE_CFLAGS = -O2 $(COMMON_CFLAGS)
  5. CFLAGS = $(PERFORMANCE_CFLAGS)
  6. LIBNETDATA_FILES = \
  7. ../../libnetdata/popen/popen.o \
  8. ../../libnetdata/storage_number/storage_number.o \
  9. ../../libnetdata/avl/avl.o \
  10. ../../libnetdata/socket/socket.o \
  11. ../../libnetdata/os.o \
  12. ../../libnetdata/clocks/clocks.o \
  13. ../../libnetdata/procfile/procfile.o \
  14. ../../libnetdata/statistical/statistical.o \
  15. ../../libnetdata/eval/eval.o \
  16. ../../libnetdata/threads/threads.o \
  17. ../../libnetdata/dictionary/dictionary.o \
  18. ../../libnetdata/simple_pattern/simple_pattern.o \
  19. ../../libnetdata/url/url.o \
  20. ../../libnetdata/config/appconfig.o \
  21. ../../libnetdata/libnetdata.o \
  22. ../../libnetdata/buffer/buffer.o \
  23. ../../libnetdata/adaptive_resortable_list/adaptive_resortable_list.o \
  24. ../../libnetdata/locks/locks.o \
  25. ../../libnetdata/log/log.o \
  26. $(NULL)
  27. COMMON_LDFLAGS = $(LIBNETDATA_FILES) -pthread -lm
  28. all: statsd-stress benchmark-procfile-parser test-eval benchmark-dictionary benchmark-value-pairs
  29. benchmark-procfile-parser: benchmark-procfile-parser.c
  30. gcc ${CFLAGS} -o $@ $^ ${COMMON_LDFLAGS}
  31. benchmark-dictionary: benchmark-dictionary.c
  32. gcc ${CFLAGS} -o $@ $^ ${COMMON_LDFLAGS}
  33. benchmark-value-pairs: benchmark-value-pairs.c
  34. gcc ${CFLAGS} -o $@ $^ ${COMMON_LDFLAGS}
  35. statsd-stress: statsd-stress.c
  36. gcc ${CFLAGS} -o $@ $^ ${COMMON_LDFLAGS}
  37. test-eval: test-eval.c
  38. gcc ${CFLAGS} -o $@ $^ ${COMMON_LDFLAGS}
  39. clean:
  40. rm -f benchmark-procfile-parser statsd-stress test-eval benchmark-dictionary benchmark-value-pairs