Makefile (762B)
- # SPDX-FileCopyrightText: 2024 Haelwenn (lanodan) Monnier <contact+mstrace@hacktivis.me>
- # SPDX-License-Identifier: MPL-2.0
- mstrace: mstrace.c strsyscall.c print_syscall.o
- ${CC} -std=c99 ${CFLAGS} -o mstrace mstrace.c strsyscall.c print_syscall.o ${LDFLAGS} ${LDSTATIC}
- print_syscall.o: print_syscall.c syscalls_cases.h
- syscalls_cases.h: syscalls.txt syscalls.sh
- ./syscalls.sh
- tmp_strsyscall.h:
- ${CC} -undef -E -P -fdirectives-only -o tmp_strsyscall.h - <<<'#include <sys/syscall.h>'
- strsyscall.c: strsyscall.sh tmp_strsyscall.h
- ./strsyscall.sh > strsyscall.c
- .PHONY: clean
- clean:
- rm -f mstrace tmp_strsyscall.h strsyscall.c print_syscall.o
- .PHONY: format
- format:
- clang-format -style=file -assume-filename=.clang-format -i mstrace.c print_syscall.c