Skip to content
This repository has been archived by the owner on Apr 9, 2018. It is now read-only.

Commit

Permalink
build: replace some addprefix/addsuffix with substitution refs
Browse files Browse the repository at this point in the history
Signed-off-by: Mans Rullgard <mans@mansr.com>
  • Loading branch information
mansr committed Jun 28, 2011
1 parent bb00b15 commit deb3ed0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions common.mak
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit deb3ed0

Please sign in to comment.