developer | 21ea813 | 2022-07-11 11:52:59 +0800 | [diff] [blame] | 1 | SUMMARY = "Command to config switch" |
| 2 | SECTION = "applications" |
| 3 | LICENSE = "GPLv2" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
| 5 | |
| 6 | S = "${WORKDIR}" |
| 7 | |
| 8 | DEPENDS = "libnl" |
| 9 | |
| 10 | SRC_URI = " \ |
| 11 | file://COPYING \ |
| 12 | file://Makefile \ |
| 13 | file://switch_753x.c \ |
| 14 | file://switch_extend.h \ |
| 15 | file://switch_fun.c \ |
| 16 | file://switch_fun.h \ |
| 17 | file://switch_ioctl.c \ |
| 18 | file://switch_ioctl.h \ |
| 19 | file://switch_netlink.c \ |
| 20 | file://switch_netlink.h \ |
| 21 | " |
| 22 | |
| 23 | CFLAGS_prepend = " \ |
| 24 | -D_GNU_SOURCE \ |
| 25 | -I${STAGING_INCDIR}/libnl3 \ |
| 26 | -I${S} \ |
| 27 | " |
| 28 | |
| 29 | do_compile() { |
| 30 | oe_runmake -C ${S} "LIBS=-L${STAGING_LIBDIR} -lnl-3 -lnl-genl-3 -lm" |
| 31 | } |
| 32 | |
| 33 | do_install() { |
| 34 | install -d ${D}/usr/sbin |
| 35 | install -d ${D}/lib/network |
| 36 | install -m 0755 ${WORKDIR}/switch ${D}/usr/sbin |
| 37 | } |