blob: 65d25b9fb807ba4a6d1fc720974b2a46a303ceb9 [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 \
Alexandre Lision67916dd2014-01-24 13:33:04 -050032 pjsua2_demo \
Tristan Matthews0a329cc2013-07-17 13:20:14 -040033 playfile \
34 playsine \
35 recfile \
36 resampleplay \
37 simpleua \
38 simple_pjsua \
39 sipecho \
40 siprtp \
41 sipstateless \
42 stateful_proxy \
43 stateless_proxy \
44 stereotest \
45 streamutil \
46 strerror \
47 tonegen \
48 vid_streamutil
49
Alexandre Lision8af73cb2013-12-10 14:11:20 -050050EXES := $(foreach file, $(SAMPLES), $(file)$(HOST_EXE))
Tristan Matthews0a329cc2013-07-17 13:20:14 -040051
Alexandre Lision8af73cb2013-12-10 14:11:20 -050052.PHONY: $(EXES)
Tristan Matthews0a329cc2013-07-17 13:20:14 -040053
Alexandre Lision67916dd2014-01-24 13:33:04 -050054all: $(EXES)
Tristan Matthews0a329cc2013-07-17 13:20:14 -040055
Alexandre Lision8af73cb2013-12-10 14:11:20 -050056$(EXES):
Alexandre Lision67916dd2014-01-24 13:33:04 -050057 $(MAKE) --no-print-directory -f $(RULES_MAK) SAMPLE_SRCDIR=$(SRCDIR) SAMPLE_OBJS=$@.o SAMPLE_CFLAGS="$(_CFLAGS)" SAMPLE_CXXFLAGS="$(_CXXFLAGS)" SAMPLE_LDFLAGS="$(_LDFLAGS) -lstdc++" SAMPLE_EXE=$@ APP=SAMPLE app=sample $(subst /,$(HOST_PSEP),$(BINDIR)/$@)
Tristan Matthews0a329cc2013-07-17 13:20:14 -040058
59depend:
60
61clean:
Alexandre Lision8af73cb2013-12-10 14:11:20 -050062 $(MAKE) -f $(RULES_MAK) APP=SAMPLE app=sample $@
Tristan Matthews0a329cc2013-07-17 13:20:14 -040063 $(subst @@,$(EXES),$(HOST_RM))
Alexandre Lision8af73cb2013-12-10 14:11:20 -050064 $(subst @@,$(BINDIR),$(HOST_RMDIR))
Tristan Matthews0a329cc2013-07-17 13:20:14 -040065
66distclean realclean: clean
Alexandre Lision8af73cb2013-12-10 14:11:20 -050067 $(MAKE) -f $(RULES_MAK) APP=SAMPLE app=sample $@
Tristan Matthews0a329cc2013-07-17 13:20:14 -040068