2022-01-24 05:01:04 +05:30
|
|
|
NDHC_SRCS = $(sort $(wildcard *.c) $(wildcard nk/*.c) ifchd-parse.c cfg.c)
|
2011-07-12 13:39:05 +05:30
|
|
|
NDHC_OBJS = $(NDHC_SRCS:.c=.o)
|
2022-01-24 05:01:04 +05:30
|
|
|
NDHC_DEP = $(NDHC_SRCS:.c=.d)
|
2022-01-23 05:09:41 +05:30
|
|
|
INCL = -I.
|
2011-07-12 13:39:05 +05:30
|
|
|
|
2022-01-24 05:01:04 +05:30
|
|
|
CFLAGS = -MMD -O2 -s -std=gnu99 -pedantic -Wall -Wextra -Wimplicit-fallthrough=0 -Wformat=2 -Wformat-nonliteral -Wformat-security -Wshadow -Wpointer-arith -Wmissing-prototypes -Wunused-const-variable=0 -Wcast-qual -Wsign-conversion -D_GNU_SOURCE -DNK_USE_CAPABILITY -Wno-discarded-qualifiers
|
2022-01-24 06:07:40 +05:30
|
|
|
CPPFLAGS += $(INCL)
|
2011-07-12 13:39:05 +05:30
|
|
|
|
2022-01-23 05:09:41 +05:30
|
|
|
all: ragel ndhc
|
2011-07-12 13:39:05 +05:30
|
|
|
|
2022-01-24 06:07:40 +05:30
|
|
|
ndhc: $(NDHC_OBJS)
|
|
|
|
$(CC) $(CFLAGS) $(INCL) -o $@ $^
|
|
|
|
|
|
|
|
-include $(NDHC_DEP)
|
|
|
|
|
2011-07-12 13:39:05 +05:30
|
|
|
clean:
|
2022-01-24 05:01:04 +05:30
|
|
|
rm -f $(NDHC_OBJS) $(NDHC_DEP) ndhc
|
|
|
|
|
|
|
|
cleanragel:
|
|
|
|
rm -f ifchd-parse.c cfg.c
|
2011-07-12 13:39:05 +05:30
|
|
|
|
2022-01-23 05:09:41 +05:30
|
|
|
ifchd-parse.c:
|
|
|
|
ragel -G2 -o ifchd-parse.c ifchd-parse.rl
|
2011-07-12 13:39:05 +05:30
|
|
|
|
2022-01-23 05:09:41 +05:30
|
|
|
cfg.c:
|
|
|
|
ragel -G2 -o cfg.c cfg.rl
|
2013-05-08 18:38:47 +05:30
|
|
|
|
2022-01-23 05:09:41 +05:30
|
|
|
ragel: ifchd-parse.c cfg.c
|
2014-04-16 06:20:54 +05:30
|
|
|
|
2022-01-24 05:01:04 +05:30
|
|
|
.PHONY: all clean cleanragel
|
2011-07-12 13:39:05 +05:30
|
|
|
|