From bdc59d5ac4c1d6aec415fe6196d5e509167ffc4c Mon Sep 17 00:00:00 2001 From: Laurent MONIN Date: Thu, 12 Jan 2006 19:06:50 +0100 Subject: [PATCH] Store lib.o name in a variable named LIB_O_NAME. --- Makefile.config.in | 1 + Makefile.lib | 6 +++--- src/Makefile | 2 +- src/dom/test/Makefile | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile.config.in b/Makefile.config.in index cc7053a1..fa9a5a4b 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -179,6 +179,7 @@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) MAKE_COLOR = @MAKE_COLOR@ +LIB_O_NAME = lib.o ### This is here because Makefile.config is usually the first thing ### we get and sometimes the all rule can be implicit, yet we want diff --git a/Makefile.lib b/Makefile.lib index e8709e0c..5fed2b4c 100644 --- a/Makefile.lib +++ b/Makefile.lib @@ -40,7 +40,7 @@ quiet_cmd_compile = ' [$(CC_COLOR)CC$(END_COLOR)] $(RELPATH)$@' quiet_cmd_ld_objs = " [$(LD_COLOR)LD$(END_COLOR)] $(RELPATH)$@" cmd_ld_objs = $(LD) -r -o $@ $(filter $(OBJS), $^) \ $(foreach subdir,$(sort $(filter-out src,$(SUBDIRS))), \ - `test -e $(subdir)/lib.o && echo $(subdir)/lib.o`) + `test -e $(subdir)/$(LIB_O_NAME) && echo $(subdir)/$(LIB_O_NAME)`) quiet_cmd_link = ' [$(LINK_COLOR)LINK$(END_COLOR)] $(RELPATH)$@' cmd_link = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(2) $(LIBS) @@ -114,10 +114,10 @@ endif ifdef OBJS -lib.o: $(sort $(OBJS)) $(foreach subdir,$(sort $(filter-out src,$(SUBDIRS))), $(wildcard $(subdir)/lib.o)) +$(LIB_O_NAME): $(sort $(OBJS)) $(foreach subdir,$(sort $(filter-out src,$(SUBDIRS))), $(wildcard $(subdir)/$(LIB_O_NAME))) $(call cmd,ld_objs) -LIB_O = lib.o +LIB_O = $(LIB_O_NAME) CLEAN += $(OBJS) $(LIB_O) endif diff --git a/src/Makefile b/src/Makefile index d5d672c5..96121af1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -37,7 +37,7 @@ OBJS = vernum.o vernum.o: FORCE FORCE: -elinks: lib.o +elinks: $(LIB_O_NAME) $(call cmd,link) PROGS = elinks diff --git a/src/dom/test/Makefile b/src/dom/test/Makefile index 2bf9957e..bbdf0dc4 100644 --- a/src/dom/test/Makefile +++ b/src/dom/test/Makefile @@ -7,7 +7,7 @@ TEST_PROGS = \ sgml-parser TESTDEPS = \ - $(top_builddir)/src/dom/lib.o \ + $(top_builddir)/src/dom/$(LIB_O_NAME) \ $(top_builddir)/src/util/error.o \ $(top_builddir)/src/osdep/stub.o \ $(top_builddir)/src/util/hash.o \