summaryrefslogtreecommitdiff
path: root/pjsip-apps/build/Samples.mak
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2013-11-23 07:13:40 +0000
committerBenny Prijono <bennylp@teluu.com>2013-11-23 07:13:40 +0000
commit831823773e16aff2a237335145effd426d5ebf87 (patch)
treeaf728a2862c4d62796dfdf508feafa4e57f42e46 /pjsip-apps/build/Samples.mak
parentb4549841bb9e71c7856e145046795f1dd010aeb3 (diff)
Fixed #1713: Enable building the libraries as shared libraries/DLLs for GNU targets
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4656 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps/build/Samples.mak')
-rw-r--r--pjsip-apps/build/Samples.mak34
1 files changed, 11 insertions, 23 deletions
diff --git a/pjsip-apps/build/Samples.mak b/pjsip-apps/build/Samples.mak
index d5dd1fc7..57daa8bf 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 \
clidemo \
confsample \
encdec \
@@ -45,35 +46,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_CFLAGS="$(_CFLAGS)" 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 $@