summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 174f06d..8a44ebc 100644
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,7 @@ endif
EXE_SWITCHCTL := switchctl
EXE_SERIALCLIENT := serialclient
EXE_STDIOCLIENT := stdioclient
+EXE_HEARTBEATCLIENT := heartbeatclient
COMMONOBJ := log.o \
sig_handler.o \
@@ -44,12 +45,15 @@ SERIALCLIENTOBJ := opt-serialclient.o \
STDIOCLIENTOBJ := opt-stdioclient.o \
stdioclient.o
+HEARTBEATCLIENTOBJ := opt-heartbeatclient.o \
+ heartbeatclient.o
-SRC := $(COMMONOBJ:%.o=%.c) $(SWITCHCTLOBJ:%.o=%.c) $(SERIALCLIENTOBJ:%.o=%.c) $(STDIOCLIENTOBJ:%.o=%.c) options.c
+
+SRC := $(COMMONOBJ:%.o=%.c) $(SWITCHCTLOBJ:%.o=%.c) $(SERIALCLIENTOBJ:%.o=%.c) $(STDIOCLIENTOBJ:%.o=%.c) $(HEARTBEATCLIENTOBJ:%.o=%.c) options.c
.PHONY: clean distclean
-all: $(EXE_SWITCHCTL) $(EXE_SERIALCLIENT) $(EXE_STDIOCLIENT)
+all: $(EXE_SWITCHCTL) $(EXE_SERIALCLIENT) $(EXE_STDIOCLIENT) $(EXE_HEARTBEATCLIENT)
%.d: %.c
@set -e; rm -f $@; \
@@ -70,6 +74,9 @@ $(EXE_SERIALCLIENT): $(COMMONOBJ) $(SERIALCLIENTOBJ)
$(EXE_STDIOCLIENT): $(COMMONOBJ) $(STDIOCLIENTOBJ)
$(CC) $(COMMONOBJ) $(STDIOCLIENTOBJ) -o $@ $(LDFLAGS)
+$(EXE_HEARTBEATCLIENT): $(COMMONOBJ) $(HEARTBEATCLIENTOBJ)
+ $(CC) $(COMMONOBJ) $(HEARTBEATCLIENTOBJ) -o $@ $(LDFLAGS)
+
opt-switchctl.o: options.c
$(CC) $(CFLAGS) -DOPT_SWITCHCTL -o $@ -c $<
@@ -79,6 +86,9 @@ opt-serialclient.o: options.c
opt-stdioclient.o: options.c
$(CC) $(CFLAGS) -DOPT_STDIOCLIENT -o $@ -c $<
+opt-heartbeatclient.o: options.c
+ $(CC) $(CFLAGS) -DOPT_HEARTBEATCLIENT -o $@ -c $<
+
%.o: %.c
$(CC) $(CFLAGS) -c $<
@@ -95,3 +105,4 @@ clean:
rm -f $(EXE_SWITCHCTL)
rm -f $(EXE_SERIALCLIENT)
rm -f $(EXE_STDIOCLIENT)
+ rm -f $(EXE_HEARTBEATCLIENT) \ No newline at end of file