diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -25,6 +25,7 @@ endif EXE_SWITCHCTL := switchctl EXE_SERIALCLIENT := serialclient +EXE_STDIOCLIENT := stdioclient COMMONOBJ := log.o \ sig_handler.o \ @@ -40,12 +41,15 @@ SWITCHCTLOBJ := command_queue.o \ SERIALCLIENTOBJ := opt-serialclient.o \ serialclient.o +STDIOCLIENTOBJ := opt-stdioclient.o \ + stdioclient.o -SRC := $(COMMONOBJ:%.o=%.c) $(SWITCHCTLOBJ:%.o=%.c) $(SERIALCLIENTOBJ:%.o=%.c) options.c + +SRC := $(COMMONOBJ:%.o=%.c) $(SWITCHCTLOBJ:%.o=%.c) $(SERIALCLIENTOBJ:%.o=%.c) $(STDIOCLIENTOBJ:%.o=%.c) options.c .PHONY: clean distclean -all: $(EXE_SWITCHCTL) $(EXE_SERIALCLIENT) +all: $(EXE_SWITCHCTL) $(EXE_SERIALCLIENT) $(EXE_STDIOCLIENT) %.d: %.c @set -e; rm -f $@; \ @@ -63,12 +67,18 @@ $(EXE_SWITCHCTL): $(COMMONOBJ) $(SWITCHCTLOBJ) $(EXE_SERIALCLIENT): $(COMMONOBJ) $(SERIALCLIENTOBJ) $(CC) $(COMMONOBJ) $(SERIALCLIENTOBJ) -o $@ $(LDFLAGS) +$(EXE_STDIOCLIENT): $(COMMONOBJ) $(STDIOCLIENTOBJ) + $(CC) $(COMMONOBJ) $(STDIOCLIENTOBJ) -o $@ $(LDFLAGS) + opt-switchctl.o: options.c $(CC) $(CFLAGS) -DOPT_SWITCHCTL -o $@ -c $< opt-serialclient.o: options.c $(CC) $(CFLAGS) -DOPT_SERIALCLIENT -o $@ -c $< +opt-stdioclient.o: options.c + $(CC) $(CFLAGS) -DOPT_STDIOCLIENT -o $@ -c $< + %.o: %.c $(CC) $(CFLAGS) -c $< @@ -84,3 +94,4 @@ clean: rm -f *.d.* rm -f $(EXE_SWITCHCTL) rm -f $(EXE_SERIALCLIENT) + rm -f $(EXE_STDIOCLIENT) |