diff options
Diffstat (limited to 'pjsip-apps/build/Samples.mak')
-rw-r--r-- | pjsip-apps/build/Samples.mak | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/pjsip-apps/build/Samples.mak b/pjsip-apps/build/Samples.mak index e4aca92..658db4d 100644 --- a/pjsip-apps/build/Samples.mak +++ b/pjsip-apps/build/Samples.mak @@ -1,6 +1,8 @@ - +include ../../build.mak +include ../../version.mak include ../../build/common.mak +RULES_MAK := $(PJDIR)/build/rules.mak ############################################################################### # Gather all flags. @@ -16,7 +18,6 @@ BINDIR := ../bin/samples/$(TARGET_NAME) SAMPLES := auddemo \ aviplay \ aectest \ - aviplay \ confsample \ encdec \ httpdemo \ @@ -44,35 +45,22 @@ SAMPLES := auddemo \ tonegen \ vid_streamutil -EXES := $(foreach file, $(SAMPLES), $(BINDIR)/$(file)$(HOST_EXE)) - -all: $(BINDIR) $(OBJDIR) $(EXES) - -$(BINDIR)/%$(HOST_EXE): $(OBJDIR)/%$(OBJEXT) $(PJ_LIB_FILES) - $(LD) $(LDOUT)$(subst /,$(HOST_PSEP),$@) \ - $(subst /,$(HOST_PSEP),$<) \ - $(_LDFLAGS) +EXES := $(foreach file, $(SAMPLES), $(file)$(HOST_EXE)) -$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.c - $(CC) $(_CFLAGS) \ - $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \ - $(subst /,$(HOST_PSEP),$<) +.PHONY: $(EXES) -$(OBJDIR): - $(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR)) +all: $(EXES) -$(BINDIR): - $(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR)) +$(EXES): + $(MAKE) --no-print-directory -f $(RULES_MAK) SAMPLE_SRCDIR=$(SRCDIR) SAMPLE_OBJS=$@.o SAMPLE_LDFLAGS="$(_LDFLAGS)" SAMPLE_EXE=$@ APP=SAMPLE app=sample $(subst /,$(HOST_PSEP),$(BINDIR)/$@) depend: clean: - $(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)/*),$(HOST_RMR)) - $(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)),$(HOST_RMDIR)) + $(MAKE) -f $(RULES_MAK) APP=SAMPLE app=sample $@ $(subst @@,$(EXES),$(HOST_RM)) - rm -rf $(BINDIR) + $(subst @@,$(BINDIR),$(HOST_RMDIR)) distclean realclean: clean -# $(subst @@,$(subst /,$(HOST_PSEP),$(EXES)) $(subst /,$(HOST_PSEP),$(EXES)),$(HOST_RM)) -# $(subst @@,$(DEP_FILE),$(HOST_RM)) + $(MAKE) -f $(RULES_MAK) APP=SAMPLE app=sample $@ |