diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -27,6 +27,7 @@ EXE_SWITCHCTL := switchctl EXE_SERIALCLIENT := serialclient EXE_STDIOCLIENT := stdioclient EXE_HEARTBEATCLIENT := heartbeatclient +EXE_LUACLIENT := luaclient COMMONOBJ := log.o \ sig_handler.o \ @@ -48,12 +49,17 @@ STDIOCLIENTOBJ := opt-stdioclient.o \ HEARTBEATCLIENTOBJ := opt-heartbeatclient.o \ heartbeatclient.o +LUACLIENTOBJ := opt-luaclient.o \ + l_log.o \ + l_sig_handler.o \ + luaclient.o -SRC := $(COMMONOBJ:%.o=%.c) $(SWITCHCTLOBJ:%.o=%.c) $(SERIALCLIENTOBJ:%.o=%.c) $(STDIOCLIENTOBJ:%.o=%.c) $(HEARTBEATCLIENTOBJ:%.o=%.c) options.c + +SRC := $(COMMONOBJ:%.o=%.c) $(SWITCHCTLOBJ:%.o=%.c) $(SERIALCLIENTOBJ:%.o=%.c) $(STDIOCLIENTOBJ:%.o=%.c) $(HEARTBEATCLIENTOBJ:%.o=%.c) $(LUACLIENTOBJ:%.o=%.c) options.c .PHONY: clean distclean -all: $(EXE_SWITCHCTL) $(EXE_SERIALCLIENT) $(EXE_STDIOCLIENT) $(EXE_HEARTBEATCLIENT) +all: $(EXE_SWITCHCTL) $(EXE_SERIALCLIENT) $(EXE_STDIOCLIENT) $(EXE_HEARTBEATCLIENT) $(EXE_LUACLIENT) %.d: %.c @set -e; rm -f $@; \ @@ -77,6 +83,9 @@ $(EXE_STDIOCLIENT): $(COMMONOBJ) $(STDIOCLIENTOBJ) $(EXE_HEARTBEATCLIENT): $(COMMONOBJ) $(HEARTBEATCLIENTOBJ) $(CC) $(COMMONOBJ) $(HEARTBEATCLIENTOBJ) -o $@ $(LDFLAGS) +$(EXE_LUACLIENT): $(COMMONOBJ) $(LUACLIENTOBJ) + $(CC) $(COMMONOBJ) $(LUACLIENTOBJ) -o $@ $(LDFLAGS) $(LUA_LDFLAGS) + opt-switchctl.o: options.c $(CC) $(CFLAGS) -DOPT_SWITCHCTL -o $@ -c $< @@ -89,6 +98,9 @@ opt-stdioclient.o: options.c opt-heartbeatclient.o: options.c $(CC) $(CFLAGS) -DOPT_HEARTBEATCLIENT -o $@ -c $< +opt-luaclient.o: options.c + $(CC) $(CFLAGS) -DOPT_LUACLIENT -o $@ -c $< + %.o: %.c $(CC) $(CFLAGS) -c $< @@ -105,4 +117,5 @@ clean: rm -f $(EXE_SWITCHCTL) rm -f $(EXE_SERIALCLIENT) rm -f $(EXE_STDIOCLIENT) - rm -f $(EXE_HEARTBEATCLIENT)
\ No newline at end of file + rm -f $(EXE_HEARTBEATCLIENT) + rm -f $(EXE_LUACLIENT)
\ No newline at end of file |