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
3include ../Makefile.deps
4
5CC=gcc
6CFLAGS=-std=gnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshadow \
7 -I../lib/ -I../generated/ -idirafter $(UAPI_PATH)
8ifeq ("$(DEBUG)","1")
9 CFLAGS += -g -fsanitize=address -fsanitize=leak -static-libasan
10endif
11
12LDLIBS=-lmnl ../lib/ynl.a ../generated/protos.a
13
14SRCS=$(wildcard *.c)
15BINS=$(patsubst %.c,%,${SRCS})
16
17include $(wildcard *.d)
18
19all: $(BINS)
20
21CFLAGS_page-pool=$(CFLAGS_netdev)
22
23$(BINS): ../lib/ynl.a ../generated/protos.a $(SRCS)
24 @echo -e '\tCC sample $@'
25 @$(COMPILE.c) $(CFLAGS_$@) $@.c -o $@.o
26 @$(LINK.c) $@.o -o $@ $(LDLIBS)
27
28clean:
29 rm -f *.o *.d *~
30
31hardclean: clean
32 rm -f $(BINS)
33
34.PHONY: all clean
35.DEFAULT_GOAL=all