Commit 93e7eca8 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'ynl-makefile-cleanup'

Jakub Kicinski says:

====================
ynl Makefile cleanup

While catching up on recent changes I noticed unexpected
changes to Makefiles in YNL. Indeed they were not working
as intended but the fixes put in place were not what I had
in mind :)
====================

Link: https://lore.kernel.org/r/20231003153416.2479808-1-kuba@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents d86e5fbd e2ca31ce
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -74,7 +74,6 @@ attribute-sets:
        doc: Bitmask of enabled xdp-features.
        type: u64
        enum: xdp-act
        enum-as-flags: true
      -
        name: xdp-zc-max-segs
        doc: max fragment count supported by ZC driver
@@ -87,7 +86,6 @@ attribute-sets:
             See Documentation/networking/xdp-rx-metadata.rst for more details.
        type: u64
        enum: xdp-rx-metadata
        enum-as-flags: true

operations:
  list:
+0 −1
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@
SUBDIRS = lib generated samples

all: $(SUBDIRS)
	./ynl-regen.sh -f -p $(PWD)/../../../

$(SUBDIRS):
	@if [ -f "$@/Makefile" ] ; then \
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ SRCS=$(patsubst %,%-user.c,${GENS})
HDRS=$(patsubst %,%-user.h,${GENS})
OBJS=$(patsubst %,%-user.o,${GENS})

all: protos.a $(HDRS) $(SRCS) $(KHDRS) $(KSRCS) $(UAPI) regen
all: protos.a $(HDRS) $(SRCS) $(KHDRS) $(KSRCS) $(UAPI)

protos.a: $(OBJS)
	@echo -e "\tAR $@"
+4 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ include ../Makefile.deps

CC=gcc
CFLAGS=-std=gnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshadow \
	-I../../../include/uapi -I../lib/ -I../generated/ -idirafter $(UAPI_PATH)
	-I../lib/ -I../generated/ -idirafter $(UAPI_PATH)
ifeq ("$(DEBUG)","1")
  CFLAGS += -g -fsanitize=address -fsanitize=leak -static-libasan
endif
@@ -19,6 +19,9 @@ include $(wildcard *.d)
all: $(BINS)

$(BINS): ../lib/ynl.a ../generated/protos.a
	@echo -e '\tCC sample $@'
	@$(COMPILE.c) $(CFLAGS_$@) $@.c -o $@.o
	@$(LINK.c) $@.o -o $@  $(LDLIBS)

clean:
	rm -f *.o *.d *~