aboutsummaryrefslogtreecommitdiffstats
path: root/tests/api/Makefile
blob: ec0e125c01ad0faef368c339633fad5206bdd280 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
APITESTPROGS-$(call ENCDEC, FLAC, FLAC) += api-flac
APITESTPROGS-$(call DEMDEC, H264, H264) += api-h264
APITESTPROGS-yes += api-seek
APITESTPROGS-yes += api-codec-param
APITESTPROGS-$(call DEMDEC, H263, H263) += api-band
APITESTPROGS-$(HAVE_THREADS) += api-threadmessage
APITESTPROGS += $(APITESTPROGS-yes)

APITESTOBJS  := $(APITESTOBJS:%=$(APITESTSDIR)%) $(APITESTPROGS:%=$(APITESTSDIR)/%-test.o)
APITESTPROGS := $(APITESTPROGS:%=$(APITESTSDIR)/%-test$(EXESUF))
-include $(wildcard $(APITESTOBJS:.o=.d))

$(APITESTOBJS): | $(sort $(dir $(APITESTOBJS)))
$(APITESTOBJS) $(APITESTOBJS:.o=.i): CPPFLAGS += -DTEST
$(APITESTOBJS) $(APITESTOBJS:.o=.i): CFLAGS += -Umain

$(APITESTPROGS): %$(EXESUF): %.o $(EXEOBJS) $(FF_DEP_LIBS)
	$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(filter %.o,$^) $(FF_EXTRALIBS) $(ELIBS)

testclean::
	$(RM) $(addprefix $(APITESTSDIR)/,$(CLEANSUFFIXES) *-test$(EXESUF))