Commit a8d5fb18 authored by Lucas Russo's avatar Lucas Russo

libclient/Makefile: fix wrong special variable in library rule

Previously, we were using $?, meaning "all the prerequisites that
are newer than the target", which is wrong as the library is composed
of all of the objects specified in the prerequisites. Now, it was
changed to $^, meaning "all the prerequisites".

This fixes #78 github issue.
parent 6d03eedc
......@@ -167,11 +167,11 @@ all: $(TARGET_STATIC) $(TARGET_SHARED_VER) pre_inst
# Compile static library
%.a: $$($$*_OBJS) $(OBJ_REVISION)
$(AR) rcs $@ $?
$(AR) rcs $@ $^
# Compile dynamic library
%.so.$(LIB_VER): $$($$*_OBJS) $(OBJ_REVISION)
$(CC) -shared -fPIC -Wl,-soname,$@ -o $@ $? $(LDFLAGS)
$(CC) -shared -fPIC -Wl,-soname,$@ -o $@ $^ $(LDFLAGS)
$(REVISION_NAME).o: $(REVISION_NAME).c
$(CC) $(CFLAGS) -DGIT_REVISION=\"$(REVISION)\" -c $<
......@@ -179,7 +179,6 @@ $(REVISION_NAME).o: $(REVISION_NAME).c
# Pull in dependency info for *existing* .o files and don't complain if the
# corresponding .d file is not found
-include $(OBJS_all:.o=.d)
# Always recompile common objects as the previous compilation,
# from another makefile might not have compiled them with the
# correct flags, as the fPIC for our shared libraries
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment