2022-01-23 05:09:41 +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-23 05:09:41 +05:30
|
|
|
INCL = -I.
|
2011-07-12 13:39:05 +05:30
|
|
|
|
2022-01-23 05:09:41 +05:30
|
|
|
CC ?= gcc
|
2022-01-23 02:19:16 +05:30
|
|
|
CFLAGS = -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
|
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
|
|
|
|
|
|
|
clean:
|
2022-01-23 05:09:41 +05:30
|
|
|
rm -i *.o nk/*.o ndhc
|
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
|
|
|
|
2011-07-12 13:39:05 +05:30
|
|
|
%.o: %.c
|
2022-01-23 05:09:41 +05:30
|
|
|
$(CC) $(CFLAGS) $(INCL) -c -o $@ $^
|
2011-07-12 13:39:05 +05:30
|
|
|
|
2022-01-23 05:09:41 +05:30
|
|
|
ndhc: $(NDHC_OBJS)
|
|
|
|
$(CC) $(CFLAGS) $(INCL) -o $@ $^
|
2011-07-12 13:39:05 +05:30
|
|
|
|
|
|
|
.PHONY: all clean
|
|
|
|
|