Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1# SPDX-License-Identifier: GPL-2.0
2
3CC=gcc
4CFLAGS=-std=gnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshadow
5ifeq ("$(DEBUG)","1")
6 CFLAGS += -g -fsanitize=address -fsanitize=leak -static-libasan
7endif
8
9SRCS=$(wildcard *.c)
10OBJS=$(patsubst %.c,%.o,${SRCS})
11
12include $(wildcard *.d)
13
14all: ynl.a
15
16ynl.a: $(OBJS)
17 ar rcs $@ $(OBJS)
18clean:
19 rm -f *.o *.d *~
20 rm -rf __pycache__
21
22distclean: clean
23 rm -f *.a
24
25%.o: %.c
26 $(COMPILE.c) -MMD -c -o $@ $<
27
28.PHONY: all clean distclean
29.DEFAULT_GOAL=all