From: Daniel Carl Date: Tue, 11 Apr 2017 07:35:18 +0000 (+0200) Subject: Put objects before linker flags. X-Git-Url: https://git.owens.tech/assets/me.png/assets/me.png/git?a=commitdiff_plain;h=190480775f6cfa0de0794a4c0f6ad274aade0294;p=vimb.git Put objects before linker flags. This allows to compile with -Wl,--as-needed option which affects only those libraries written after that option on the command line. --- diff --git a/src/Makefile b/src/Makefile index a352597..9794ac0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -12,7 +12,7 @@ clean: $(SUBDIRS:%=%.subdir-clean) vimb: $(OBJ) $(Q)echo "${CC} $@" - $(Q)$(CC) $(LDFLAGS) $(OBJ) -o $@ + $(Q)$(CC) $(OBJ) $(LDFLAGS) -o $@ $(OBJ): config.h $(BASEDIR)/config.mk scripts/scripts.h diff --git a/src/webextension/Makefile b/src/webextension/Makefile index 58554e8..77b7c82 100644 --- a/src/webextension/Makefile +++ b/src/webextension/Makefile @@ -10,7 +10,7 @@ clean: $(EXTTARGET): $(OBJ) $(Q)echo "$(CC) $@" - $(Q)$(CC) $(EXTLDFLAGS) ${OBJ} -o $@ + $(Q)$(CC) $(OBJ) $(EXTLDFLAGS) -o $@ %.lo: %.c $(Q)echo "${CC} $@"