Skip to content

Commit

Permalink
refactor: Add remote- prefix for explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
ajblane committed Apr 27, 2019
1 parent 3fe9c25 commit e744da1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ PREQ += $(JARS)
endif

ifeq ("$(BUILD_REMOTE)", "1")
PREQ += $(OUT)/remote/remote-worker
PREQ += $(OUT)/remote-worker
endif

all: $(PREQ)
Expand Down Expand Up @@ -154,7 +154,7 @@ OBJS += \
remote_common.o \
remote_interface.o

WORKER_OBJS := $(addprefix $(OUT)/remote/,$(filter-out remote_interface.o, $(OBJS)))
WORKER_OBJS := $(addprefix $(OUT)/remote-,$(filter-out remote_interface.o, $(OBJS)))
WORKER_CFLAGS := $(filter-out -DENABLE_REMOTE, $(CFLAGS))
endif

Expand All @@ -177,11 +177,11 @@ $(OUT)/libdcurl.so: $(OBJS) $(LIBTUV_LIBRARY)
$(Q)$(CC) -shared -o $@ $^ $(LDFLAGS)

ifeq ("$(BUILD_REMOTE)", "1")
$(OUT)/remote/%.o: $(SRC)/%.c $(LIBTUV_PATH)/include $(LIBRABBITMQ_PATH)/build/include
$(OUT)/remote-%.o: $(SRC)/%.c $(LIBTUV_PATH)/include $(LIBRABBITMQ_PATH)/build/include
$(VECHO) " CC\t$@\n"
$(Q)$(CC) -o $@ $(WORKER_CFLAGS) $(LIBTUV_INCLUDE) $(LIBRABBITMQ_INCLUDE) -c -MMD -MF $@.d $<

$(OUT)/remote/remote-worker: $(OUT)/remote/remote_worker.o $(WORKER_OBJS) $(LIBS) $(LIBTUV_LIBRARY)
$(OUT)/remote-worker: $(OUT)/remote_worker.o $(WORKER_OBJS) $(LIBS) $(LIBTUV_LIBRARY)
$(VECHO) " CC\t$@\n"
$(Q)$(CC) -o $@ $^ $(LDFLAGS)
endif
Expand Down
3 changes: 0 additions & 3 deletions mk/common.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Always ensure directory build exist
SHELL_HACK := $(shell mkdir -p $(OUT))
ifeq ("$(BUILD_REMOTE)", "1")
SHELL_HACK += $(shell mkdir -p $(OUT)/remote)
endif

UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
Expand Down

0 comments on commit e744da1

Please sign in to comment.