build: further cleanup
This commit is contained in:
parent
b30e0223d0
commit
196c000161
1 changed files with 12 additions and 11 deletions
23
Makefile
23
Makefile
|
@ -47,18 +47,21 @@ MULTICALL_SRC = \
|
||||||
MULTICALL_OBJ = ${MULTICALL_SRC:.c=.o}
|
MULTICALL_OBJ = ${MULTICALL_SRC:.c=.o}
|
||||||
MULTICALL = ifupdown
|
MULTICALL = ifupdown
|
||||||
|
|
||||||
CONFIG_IFQUERY ?= Y
|
# enable ifup/ifdown applets (+16 KB)
|
||||||
IFQUERY_SRC = cmd/ifquery.c
|
|
||||||
MULTICALL_${CONFIG_IFQUERY}_OBJ += ${IFQUERY_SRC:.c=.o}
|
|
||||||
CMDS_${CONFIG_IFQUERY} += ifquery
|
|
||||||
CPPFLAGS_${CONFIG_IFQUERY} += -DCONFIG_IFQUERY
|
|
||||||
|
|
||||||
CONFIG_IFUPDOWN ?= Y
|
CONFIG_IFUPDOWN ?= Y
|
||||||
IFUPDOWN_SRC = cmd/ifupdown.c
|
IFUPDOWN_SRC = cmd/ifupdown.c
|
||||||
MULTICALL_${CONFIG_IFUPDOWN}_OBJ += ${IFUPDOWN_SRC:.c=.o}
|
MULTICALL_${CONFIG_IFUPDOWN}_OBJ += ${IFUPDOWN_SRC:.c=.o}
|
||||||
CMDS_${CONFIG_IFUPDOWN} += ifup ifdown
|
CMDS_${CONFIG_IFUPDOWN} += ifup ifdown
|
||||||
CPPFLAGS_${CONFIG_IFUPDOWN} += -DCONFIG_IFUPDOWN
|
CPPFLAGS_${CONFIG_IFUPDOWN} += -DCONFIG_IFUPDOWN
|
||||||
|
|
||||||
|
# enable ifquery applet (+4 KB)
|
||||||
|
# [+20 KB without ifup/ifdown]
|
||||||
|
CONFIG_IFQUERY ?= Y
|
||||||
|
IFQUERY_SRC = cmd/ifquery.c
|
||||||
|
MULTICALL_${CONFIG_IFQUERY}_OBJ += ${IFQUERY_SRC:.c=.o}
|
||||||
|
CMDS_${CONFIG_IFQUERY} += ifquery
|
||||||
|
CPPFLAGS_${CONFIG_IFQUERY} += -DCONFIG_IFQUERY
|
||||||
|
|
||||||
MULTICALL_OBJ += ${MULTICALL_Y_OBJ}
|
MULTICALL_OBJ += ${MULTICALL_Y_OBJ}
|
||||||
CMDS += ${CMDS_Y}
|
CMDS += ${CMDS_Y}
|
||||||
CPPFLAGS += ${CPPFLAGS_Y}
|
CPPFLAGS += ${CPPFLAGS_Y}
|
||||||
|
@ -76,8 +79,6 @@ EXECUTOR_SCRIPTS ?= ${EXECUTOR_SCRIPTS_CORE} ${EXECUTOR_SCRIPTS_OPT}
|
||||||
|
|
||||||
EXECUTOR_SCRIPTS_STUB ?=
|
EXECUTOR_SCRIPTS_STUB ?=
|
||||||
|
|
||||||
CMD_OBJ = ${MULTICALL_OBJ} ${IFQUERY_OBJ} ${IFUPDOWN_OBJ}
|
|
||||||
|
|
||||||
TARGET_LIBS = ${LIBIFUPDOWN_LIB}
|
TARGET_LIBS = ${LIBIFUPDOWN_LIB}
|
||||||
LIBS += ${TARGET_LIBS} ${LIBBSD_LIBS}
|
LIBS += ${TARGET_LIBS} ${LIBBSD_LIBS}
|
||||||
|
|
||||||
|
@ -86,14 +87,14 @@ all: ${MULTICALL} ${CMDS}
|
||||||
${CMDS}: ${MULTICALL}
|
${CMDS}: ${MULTICALL}
|
||||||
ln -sf ifupdown $@
|
ln -sf ifupdown $@
|
||||||
|
|
||||||
${MULTICALL}: ${TARGET_LIBS} ${CMD_OBJ}
|
${MULTICALL}: ${TARGET_LIBS} ${MULTICALL_OBJ}
|
||||||
${CC} -o $@ ${CMD_OBJ} ${LIBS}
|
${CC} -o $@ ${MULTICALL_OBJ} ${LIBS}
|
||||||
|
|
||||||
${LIBIFUPDOWN_LIB}: ${LIBIFUPDOWN_OBJ}
|
${LIBIFUPDOWN_LIB}: ${LIBIFUPDOWN_OBJ}
|
||||||
${AR} -rcs $@ ${LIBIFUPDOWN_OBJ}
|
${AR} -rcs $@ ${LIBIFUPDOWN_OBJ}
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ${LIBIFUPDOWN_OBJ} ${CMD_OBJ}
|
rm -f ${LIBIFUPDOWN_OBJ} ${MULTICALL_OBJ}
|
||||||
rm -f ${LIBIFUPDOWN_LIB}
|
rm -f ${LIBIFUPDOWN_LIB}
|
||||||
rm -f ${CMDS} ${MULTICALL}
|
rm -f ${CMDS} ${MULTICALL}
|
||||||
rm -f ${MANPAGES}
|
rm -f ${MANPAGES}
|
||||||
|
|
Loading…
Reference in a new issue