diff options
author | Mans Rullgard | 2011-06-28 14:45:57 +0100 |
---|---|---|
committer | Mans Rullgard | 2011-06-28 15:59:27 +0100 |
commit | deb3ed01b50f5706a610bf7f3e82ef97e910a65e (patch) | |
tree | dc8b739639f5d3d27e713e0c94c97fd414945976 | |
parent | bb00b15f9e4e3c56abf628ed2cb9bfa8965e2bf8 (diff) |
build: replace some addprefix/addsuffix with substitution refs
Signed-off-by: Mans Rullgard <mans@mansr.com>
-rw-r--r-- | common.mak | 20 | ||||
-rw-r--r-- | tests/Makefile | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/common.mak b/common.mak index e2eaa399da..19be4a6949 100644 --- a/common.mak +++ b/common.mak @@ -11,21 +11,21 @@ OBJS += $(OBJS-yes) FFLIBS := $(FFLIBS-yes) $(FFLIBS) TESTPROGS += $(TESTPROGS-yes) -FFEXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS) -FFLDFLAGS := $(addprefix -Llib,$(ALLFFLIBS)) $(LDFLAGS) +FFEXTRALIBS := $(FFLIBS:%=-l%$(BUILDSUF)) $(EXTRALIBS) +FFLDFLAGS := $(ALLFFLIBS:%=-Llib%) $(LDFLAGS) -EXAMPLES := $(addprefix $(SUBDIR),$(addsuffix -example$(EXESUF),$(EXAMPLES))) -OBJS := $(addprefix $(SUBDIR),$(sort $(OBJS))) -TESTOBJS := $(addprefix $(SUBDIR),$(TESTOBJS) $(TESTPROGS:%=%-test.o)) -TESTPROGS := $(addprefix $(SUBDIR),$(addsuffix -test$(EXESUF),$(TESTPROGS))) -HOSTOBJS := $(addprefix $(SUBDIR),$(addsuffix .o,$(HOSTPROGS))) -HOSTPROGS := $(addprefix $(SUBDIR),$(addsuffix $(HOSTEXESUF),$(HOSTPROGS))) +EXAMPLES := $(EXAMPLES:%=$(SUBDIR)%-example$(EXESUF)) +OBJS := $(sort $(OBJS:%=$(SUBDIR)%)) +TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o) +TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF)) +HOSTOBJS := $(HOSTPROGS:%=$(SUBDIR)%.o) +HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF)) DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME)) ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h)) -SKIPHEADERS += $(addprefix $(ARCH)/,$(ARCH_HEADERS)) -SKIPHEADERS := $(addprefix $(SUBDIR),$(SKIPHEADERS-) $(SKIPHEADERS)) +SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-) +SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%) checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho)) $(HOSTOBJS): %.o: %.c diff --git a/tests/Makefile b/tests/Makefile index fb9b56e6b3..87ec0256de 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -112,7 +112,7 @@ clean:: testclean testclean: $(RM) -r tests/vsynth1 tests/vsynth2 tests/data - $(RM) $(addprefix tests/,$(CLEANSUFFIXES)) + $(RM) $(CLEANSUFFIXES:%=tests/%) $(RM) tests/seek_test$(EXESUF) tests/seek_test.o $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF)) |