Skip to content

Commit

Permalink
Fix the error of missing libtuv header file
Browse files Browse the repository at this point in the history
Initialize and update the git submodule before compiling the dcurl source code
rather than using the libtuv library file.
  • Loading branch information
marktwtn committed Feb 12, 2019
1 parent c5147ab commit b2c91da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ endif

OBJS := $(addprefix $(OUT)/, $(OBJS))

$(OUT)/test-%.o: tests/test-%.c
$(OUT)/test-%.o: tests/test-%.c $(LIBTUV_PATH)/include
$(VECHO) " CC\t$@\n"
$(Q)$(CC) -o $@ $(CFLAGS) -I $(SRC) $(LIBTUV_INCLUDE) -c -MMD -MF $@.d $<

$(OUT)/%.o: $(SRC)/%.c
$(OUT)/%.o: $(SRC)/%.c $(LIBTUV_PATH)/include
$(VECHO) " CC\t$@\n"
$(Q)$(CC) -o $@ $(CFLAGS) $(LIBTUV_INCLUDE) -c -MMD -MF $@.d $<

Expand Down
4 changes: 3 additions & 1 deletion mk/submodule.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ LIBTUV_PLATFORM := $(UNAME_M)-$(UNAME_S)
# PIC (Position-Independent-Code) library
LIBTUV_LIBRARY := $(LIBTUV_PATH)/build/$(LIBTUV_PLATFORM)/release/lib/libtuv.o

$(LIBTUV_LIBRARY):
$(LIBTUV_PATH)/include:
git submodule update --init $(LIBTUV_PATH)

$(LIBTUV_LIBRARY):
$(MAKE) -C $(LIBTUV_PATH) TUV_BUILD_TYPE=release TUV_CREATE_PIC_LIB=yes

0 comments on commit b2c91da

Please sign in to comment.