blob: 57daa8bf01042b055fd803c9d0cf5b7416e5d9c1 [file] [log] [blame]
Alexandre Lision8af73cb2013-12-10 14:11:20 -05001include ../../build.mak
2include ../../version.mak
Tristan Matthews0a329cc2013-07-17 13:20:14 -04003include ../../build/common.mak
4
Alexandre Lision8af73cb2013-12-10 14:11:20 -05005RULES_MAK := $(PJDIR)/build/rules.mak
Tristan Matthews0a329cc2013-07-17 13:20:14 -04006
7###############################################################################
8# Gather all flags.
9#
10export _CFLAGS := $(PJ_CFLAGS) $(CFLAGS)
11export _CXXFLAGS:= $(PJ_CXXFLAGS)
12export _LDFLAGS := $(PJ_LDFLAGS) $(PJ_LDLIBS) $(LDFLAGS)
13
14SRCDIR := ../src/samples
15OBJDIR := ./output/samples-$(TARGET_NAME)
16BINDIR := ../bin/samples/$(TARGET_NAME)
17
18SAMPLES := auddemo \
19 aviplay \
20 aectest \
Tristan Matthews0a329cc2013-07-17 13:20:14 -040021 clidemo \
22 confsample \
23 encdec \
24 httpdemo \
25 icedemo \
26 jbsim \
27 latency \
28 level \
29 mix \
30 pjsip-perf \
31 pcaputil \
32 playfile \
33 playsine \
34 recfile \
35 resampleplay \
36 simpleua \
37 simple_pjsua \
38 sipecho \
39 siprtp \
40 sipstateless \
41 stateful_proxy \
42 stateless_proxy \
43 stereotest \
44 streamutil \
45 strerror \
46 tonegen \
47 vid_streamutil
48
Alexandre Lision8af73cb2013-12-10 14:11:20 -050049EXES := $(foreach file, $(SAMPLES), $(file)$(HOST_EXE))
Tristan Matthews0a329cc2013-07-17 13:20:14 -040050
Alexandre Lision8af73cb2013-12-10 14:11:20 -050051.PHONY: $(EXES)
Tristan Matthews0a329cc2013-07-17 13:20:14 -040052
Alexandre Lision8af73cb2013-12-10 14:11:20 -050053all: $(EXES)
Tristan Matthews0a329cc2013-07-17 13:20:14 -040054
Alexandre Lision8af73cb2013-12-10 14:11:20 -050055$(EXES):
56 $(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)/$@)
Tristan Matthews0a329cc2013-07-17 13:20:14 -040057
58depend:
59
60clean:
Alexandre Lision8af73cb2013-12-10 14:11:20 -050061 $(MAKE) -f $(RULES_MAK) APP=SAMPLE app=sample $@
Tristan Matthews0a329cc2013-07-17 13:20:14 -040062 $(subst @@,$(EXES),$(HOST_RM))
Alexandre Lision8af73cb2013-12-10 14:11:20 -050063 $(subst @@,$(BINDIR),$(HOST_RMDIR))
Tristan Matthews0a329cc2013-07-17 13:20:14 -040064
65distclean realclean: clean
Alexandre Lision8af73cb2013-12-10 14:11:20 -050066 $(MAKE) -f $(RULES_MAK) APP=SAMPLE app=sample $@
Tristan Matthews0a329cc2013-07-17 13:20:14 -040067