logo

mstrace

Small Linux strace(1) implementationgit clone https://anongit.hacktivis.me/git/mstrace.git/

Makefile (762B)


  1. # SPDX-FileCopyrightText: 2024 Haelwenn (lanodan) Monnier <contact+mstrace@hacktivis.me>
  2. # SPDX-License-Identifier: MPL-2.0
  3. mstrace: mstrace.c strsyscall.c print_syscall.o
  4. ${CC} -std=c99 ${CFLAGS} -o mstrace mstrace.c strsyscall.c print_syscall.o ${LDFLAGS} ${LDSTATIC}
  5. print_syscall.o: print_syscall.c syscalls_cases.h
  6. syscalls_cases.h: syscalls.txt syscalls.sh
  7. ./syscalls.sh
  8. tmp_strsyscall.h:
  9. ${CC} -undef -E -P -fdirectives-only -o tmp_strsyscall.h - <<<'#include <sys/syscall.h>'
  10. strsyscall.c: strsyscall.sh tmp_strsyscall.h
  11. ./strsyscall.sh > strsyscall.c
  12. .PHONY: clean
  13. clean:
  14. rm -f mstrace tmp_strsyscall.h strsyscall.c print_syscall.o
  15. .PHONY: format
  16. format:
  17. clang-format -style=file -assume-filename=.clang-format -i mstrace.c print_syscall.c