execve_hook/Makefile

22 lines
446 B
Makefile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

CC = gcc
CFLAGS = -shared -fPIC -Wall -Wextra -Werror -O2 -fno-strict-aliasing -fPIC -fno-omit-frame-pointer -fno-stack-protector -Wl,-z,relro,-z,now
LDFLAGS = -ldl -ljson-c
TARGET = intercept.so
SRC = execve_intercept.c
# 如果需要开启 debug只需执行 make DEBUG=1
ifeq ($(DEBUG),1)
CFLAGS += -DDEBUG
endif
all: $(TARGET)
$(TARGET): $(SRC)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
clean:
rm -f $(TARGET)
debug:
$(MAKE) DEBUG=1