1 # SPDX-License-Identifier: GPL-2.0 2 3 CC=gcc 4 CFLAGS=-std=gnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshadow 5 ifeq ("$(DEBUG)","1") 6 CFLAGS += -g -fsanitize=address -fsanitize=leak -static-libasan 7 endif 8 9 SRCS=$(wildcard *.c) 10 OBJS=$(patsubst %.c,%.o,${SRCS}) 11 12 include $(wildcard *.d) 13 14 all: ynl.a 15 16 ynl.a: $(OBJS) 17 @echo -e "\tAR $@" 18 @ar rcs $@ $(OBJS) 19 20 clean: 21 rm -f *.o *.d *~ 22 rm -rf __pycache__ 23 24 distclean: clean 25 rm -f *.a 26 27 %.o: %.c 28 $(COMPILE.c) -MMD -c -o $@ $< 29 30 .PHONY: all clean distclean 31 .DEFAULT_GOAL=all
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.