summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-07-06 11:22:07 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2015-07-06 11:22:07 +0200
commit220dac758391cdc650e2dd9bdc259e950fcb3955 (patch)
tree4cf4ad5e4b687d7800da7d74138e045c004e6c64 /Makefile
parente53d75aedebbeb6ec739a575c23bcde1c899a82a (diff)
downloadnlplug-220dac758391cdc650e2dd9bdc259e950fcb3955.tar.bz2
nlplug-220dac758391cdc650e2dd9bdc259e950fcb3955.tar.xz
nlplug: refactor to reduce forks
- prepare for loading modaliases with libkmod - only fork/exec when there is a DEVNAME
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index bbd1213..67347f5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
CFLAGS ?= -Wall -Werror -g
-CFLAGS += -D_GNU_SOURCE
+CFLAGS += -D_GNU_SOURCE -DDEBUG
nlsockd_SRCS = nlsockd.c
nlsockd_OBJS = $(nlsockd_SRCS:%.c=%.o)
@@ -8,14 +8,17 @@ nlsockd_OBJS = $(nlsockd_SRCS:%.c=%.o)
nlplug_SRCS = nlplug.c
nlplug_OBJS = $(nlplug_SRCS:%.c=%.o)
-all: nlsockd nlplug
+handler_SRCS = handler.c
+handler_OBJS = $(handler_SRCS:%.c=%.o)
-nlsockd: $(nlsockd_OBJS)
+all: nlsockd nlplug handler
+nlsockd: $(nlsockd_OBJS)
nlplug: $(nlplug_OBJS)
+handler: $(handler_OBJS)
-nlsockd nlplug:
+handler nlsockd nlplug:
$(CC) -o $@ $(CFLAGS) $($@_CFLAGS) $($@_OBJS) $(LDFLAGS) $($@_LDFLAGS)
clean: