Skip to content

Commit 2cdf4a4

Browse files
authored
Add samples
1 parent efbf7c1 commit 2cdf4a4

7 files changed

Lines changed: 207 additions & 1528 deletions

File tree

generated/Makefile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
CC=gcc
4+
CXX=g++
5+
CFLAGS=-std=gnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshadow -I../lib/
6+
CXXFLAGS=-D_LINUX_ETHTOOL_H -I../lib/ -include../linux/ethtool_netlink.h -include../linux/ethtool.h
7+
ifeq ("$(DEBUG)","1")
8+
CFLAGS += -g -fsanitize=address -fsanitize=leak -static-libasan
9+
endif
10+
11+
SRCS_ETHTOOL_CPP=$(wildcard ethtool-user.cpp)
12+
OBJS_ETHTOOL_CPP=$(patsubst %.cpp,%.o,${SRCS_ETHTOOL_CPP})
13+
14+
include $(wildcard *.d)
15+
16+
all: ethtool_lib.a
17+
18+
ethtool_lib.a: $@ $(OBJS_ETHTOOL_CPP)
19+
ar rcs $@ $(OBJS_ETHTOOL_CPP)
20+
21+
clean:
22+
rm -f *.o *.d *~
23+
24+
distclean: clean
25+
rm -f *.a
26+
27+
%.cpp.o: %.cpp
28+
$(COMPILE.cxx) -MMD -c -o $@ $<
29+
30+
.PHONY: all clean distclean
31+
.DEFAULT_GOAL=all

0 commit comments

Comments
 (0)