mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 10:07:52 +00:00
Build process uses python to generate the user space code. Remove __pycache__ on make clean. Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: Donald Hunter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
30 lines
496 B
Makefile
30 lines
496 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
CC=gcc
|
|
CFLAGS=-std=gnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshadow
|
|
ifeq ("$(DEBUG)","1")
|
|
CFLAGS += -g -fsanitize=address -fsanitize=leak -static-libasan
|
|
endif
|
|
|
|
SRCS=$(wildcard *.c)
|
|
OBJS=$(patsubst %.c,%.o,${SRCS})
|
|
|
|
include $(wildcard *.d)
|
|
|
|
all: ynl.a
|
|
|
|
ynl.a: $(OBJS)
|
|
ar rcs $@ $(OBJS)
|
|
clean:
|
|
rm -f *.o *.d *~
|
|
rm -rf __pycache__
|
|
|
|
distclean: clean
|
|
rm -f *.a
|
|
|
|
%.o: %.c
|
|
$(COMPILE.c) -MMD -c -o $@ $<
|
|
|
|
.PHONY: all clean distclean
|
|
.DEFAULT_GOAL=all
|