ifupdown-ng/Makefile

44 lines
1 KiB
Makefile
Raw Normal View History

2020-07-19 01:09:08 +00:00
PACKAGE_NAME := ifupdown-ng
PACKAGE_VERSION := 0.0.1
PACKAGE_BUGREPORT := https://github.com/kaniini/ifupdown-ng/issues/new
2020-07-18 23:44:58 +00:00
INTERFACES_FILE := /etc/network/interfaces
2020-07-20 13:42:16 +00:00
STATE_FILE := /run/ifstate
CFLAGS := -ggdb3 -O2 -Wall -I. -DINTERFACES_FILE=\"${INTERFACES_FILE}\" -DSTATE_FILE=\"${STATE_FILE}\" -DPACKAGE_NAME=\"${PACKAGE_NAME}\" -DPACKAGE_VERSION=\"${PACKAGE_VERSION}\" -DPACKAGE_BUGREPORT=\"${PACKAGE_BUGREPORT}\"
2020-07-18 07:58:24 +00:00
LIBIFUPDOWN_SRC = \
libifupdown/list.c \
libifupdown/dict.c \
2020-07-19 00:02:25 +00:00
libifupdown/interface.c \
2020-07-19 00:13:54 +00:00
libifupdown/interface-file.c \
2020-07-19 01:09:08 +00:00
libifupdown/fgetline.c \
2020-07-20 13:42:16 +00:00
libifupdown/version.c \
libifupdown/state.c
2020-07-18 07:58:24 +00:00
LIBIFUPDOWN_OBJ = ${LIBIFUPDOWN_SRC:.c=.o}
2020-07-18 10:49:22 +00:00
LIBIFUPDOWN_LIB = libifupdown.a
2020-07-18 07:58:24 +00:00
2020-07-18 10:49:22 +00:00
CMDS = \
ifquery
LIBS = ${LIBIFUPDOWN_LIB}
IFQUERY_SRC = cmd/ifquery.c
IFQUERY_OBJ = ${IFQUERY_SRC:.c=.o}
ifquery: ${LIBS} ${IFQUERY_OBJ}
${CC} -o $@ ${IFQUERY_OBJ} ${LIBS}
2020-07-18 07:58:24 +00:00
libifupdown.a: ${LIBIFUPDOWN_OBJ}
2020-07-18 23:57:45 +00:00
${AR} -rcs $@ ${LIBIFUPDOWN_OBJ}
2020-07-18 07:58:24 +00:00
2020-07-18 10:49:22 +00:00
all: libifupdown.a ${CMDS}
2020-07-18 07:58:24 +00:00
clean:
2020-07-20 13:37:43 +00:00
rm -f ${LIBIFUPDOWN_OBJ} ${IFQUERY_OBJ}
2020-07-19 01:46:59 +00:00
2020-07-19 02:05:02 +00:00
check: libifupdown.a ${CMDS}
2020-07-19 01:46:59 +00:00
kyua test