linux/tools/net/ynl/lib/Makefile
Jan Stancek ab88c2b373 tools: ynl: move python code to separate sub-directory
Move python code to a separate directory so it can be
packaged as a python module. Updates existing references
in selftests and docs.

Also rename ynl-gen-[c|rst] to ynl_gen_[c|rst], avoid
dashes as these prevent easy imports for entrypoints.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://patch.msgid.link/a4151bad0e6984e7164d395125ce87fd2e048bf1.1736343575.git.jstancek@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-01-09 12:53:27 -08:00

30 lines
501 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)
@echo -e "\tAR $@"
@ar rcs $@ $(OBJS)
clean:
rm -f *.o *.d *~
distclean: clean
rm -f *.a
%.o: %.c
$(COMPILE.c) -MMD -c -o $@ $<
.PHONY: all clean distclean
.DEFAULT_GOAL=all