Alexandre Lision | 8af73cb | 2013-12-10 14:11:20 -0500 | [diff] [blame] | 1 | include ../../build.mak |
| 2 | include ../../version.mak |
Tristan Matthews | 0a329cc | 2013-07-17 13:20:14 -0400 | [diff] [blame] | 3 | include ../../build/common.mak |
| 4 | |
Alexandre Lision | 8af73cb | 2013-12-10 14:11:20 -0500 | [diff] [blame] | 5 | RULES_MAK := $(PJDIR)/build/rules.mak |
Tristan Matthews | 0a329cc | 2013-07-17 13:20:14 -0400 | [diff] [blame] | 6 | |
| 7 | ############################################################################### |
| 8 | # Gather all flags. |
| 9 | # |
| 10 | export _CFLAGS := $(PJ_CFLAGS) $(CFLAGS) |
| 11 | export _CXXFLAGS:= $(PJ_CXXFLAGS) |
| 12 | export _LDFLAGS := $(PJ_LDFLAGS) $(PJ_LDLIBS) $(LDFLAGS) |
| 13 | |
| 14 | SRCDIR := ../src/samples |
| 15 | OBJDIR := ./output/samples-$(TARGET_NAME) |
| 16 | BINDIR := ../bin/samples/$(TARGET_NAME) |
| 17 | |
| 18 | SAMPLES := auddemo \ |
| 19 | aviplay \ |
| 20 | aectest \ |
Tristan Matthews | 0a329cc | 2013-07-17 13:20:14 -0400 | [diff] [blame] | 21 | clidemo \ |
| 22 | confsample \ |
| 23 | encdec \ |
| 24 | httpdemo \ |
| 25 | icedemo \ |
| 26 | jbsim \ |
| 27 | latency \ |
| 28 | level \ |
| 29 | mix \ |
| 30 | pjsip-perf \ |
| 31 | pcaputil \ |
Alexandre Lision | 67916dd | 2014-01-24 13:33:04 -0500 | [diff] [blame] | 32 | pjsua2_demo \ |
Tristan Matthews | 0a329cc | 2013-07-17 13:20:14 -0400 | [diff] [blame] | 33 | 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 Lision | 8af73cb | 2013-12-10 14:11:20 -0500 | [diff] [blame] | 50 | EXES := $(foreach file, $(SAMPLES), $(file)$(HOST_EXE)) |
Tristan Matthews | 0a329cc | 2013-07-17 13:20:14 -0400 | [diff] [blame] | 51 | |
Alexandre Lision | 8af73cb | 2013-12-10 14:11:20 -0500 | [diff] [blame] | 52 | .PHONY: $(EXES) |
Tristan Matthews | 0a329cc | 2013-07-17 13:20:14 -0400 | [diff] [blame] | 53 | |
Alexandre Lision | 67916dd | 2014-01-24 13:33:04 -0500 | [diff] [blame] | 54 | all: $(EXES) |
Tristan Matthews | 0a329cc | 2013-07-17 13:20:14 -0400 | [diff] [blame] | 55 | |
Alexandre Lision | 8af73cb | 2013-12-10 14:11:20 -0500 | [diff] [blame] | 56 | $(EXES): |
Alexandre Lision | 67916dd | 2014-01-24 13:33:04 -0500 | [diff] [blame] | 57 | $(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 Matthews | 0a329cc | 2013-07-17 13:20:14 -0400 | [diff] [blame] | 58 | |
| 59 | depend: |
| 60 | |
| 61 | clean: |
Alexandre Lision | 8af73cb | 2013-12-10 14:11:20 -0500 | [diff] [blame] | 62 | $(MAKE) -f $(RULES_MAK) APP=SAMPLE app=sample $@ |
Tristan Matthews | 0a329cc | 2013-07-17 13:20:14 -0400 | [diff] [blame] | 63 | $(subst @@,$(EXES),$(HOST_RM)) |
Alexandre Lision | 8af73cb | 2013-12-10 14:11:20 -0500 | [diff] [blame] | 64 | $(subst @@,$(BINDIR),$(HOST_RMDIR)) |
Tristan Matthews | 0a329cc | 2013-07-17 13:20:14 -0400 | [diff] [blame] | 65 | |
| 66 | distclean realclean: clean |
Alexandre Lision | 8af73cb | 2013-12-10 14:11:20 -0500 | [diff] [blame] | 67 | $(MAKE) -f $(RULES_MAK) APP=SAMPLE app=sample $@ |
Tristan Matthews | 0a329cc | 2013-07-17 13:20:14 -0400 | [diff] [blame] | 68 | |