summaryrefslogtreecommitdiff
path: root/pjsip-apps/build/Samples.mak
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-01-07 14:24:28 -0600
committerDavid M. Lee <dlee@digium.com>2013-01-07 14:24:28 -0600
commitf3ab456a17af1c89a6e3be4d20c5944853df1cb0 (patch)
treed00e1a332cd038a6d906a1ea0ac91e1a4458e617 /pjsip-apps/build/Samples.mak
Import pjproject-2.0.1
Diffstat (limited to 'pjsip-apps/build/Samples.mak')
-rw-r--r--pjsip-apps/build/Samples.mak78
1 files changed, 78 insertions, 0 deletions
diff --git a/pjsip-apps/build/Samples.mak b/pjsip-apps/build/Samples.mak
new file mode 100644
index 0000000..e4aca92
--- /dev/null
+++ b/pjsip-apps/build/Samples.mak
@@ -0,0 +1,78 @@
+
+include ../../build/common.mak
+
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS := $(PJ_CFLAGS) $(CFLAGS)
+export _CXXFLAGS:= $(PJ_CXXFLAGS)
+export _LDFLAGS := $(PJ_LDFLAGS) $(PJ_LDLIBS) $(LDFLAGS)
+
+SRCDIR := ../src/samples
+OBJDIR := ./output/samples-$(TARGET_NAME)
+BINDIR := ../bin/samples/$(TARGET_NAME)
+
+SAMPLES := auddemo \
+ aviplay \
+ aectest \
+ aviplay \
+ confsample \
+ encdec \
+ httpdemo \
+ icedemo \
+ jbsim \
+ latency \
+ level \
+ mix \
+ pjsip-perf \
+ pcaputil \
+ playfile \
+ playsine \
+ recfile \
+ resampleplay \
+ simpleua \
+ simple_pjsua \
+ sipecho \
+ siprtp \
+ sipstateless \
+ stateful_proxy \
+ stateless_proxy \
+ stereotest \
+ streamutil \
+ strerror \
+ 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)
+
+$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.c
+ $(CC) $(_CFLAGS) \
+ $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
+ $(subst /,$(HOST_PSEP),$<)
+
+$(OBJDIR):
+ $(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR))
+
+$(BINDIR):
+ $(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR))
+
+depend:
+
+clean:
+ $(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)/*),$(HOST_RMR))
+ $(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)),$(HOST_RMDIR))
+ $(subst @@,$(EXES),$(HOST_RM))
+ rm -rf $(BINDIR)
+
+distclean realclean: clean
+# $(subst @@,$(subst /,$(HOST_PSEP),$(EXES)) $(subst /,$(HOST_PSEP),$(EXES)),$(HOST_RM))
+# $(subst @@,$(DEP_FILE),$(HOST_RM))
+