Ticket #1357: Makefile

File Makefile, 901 bytes (added by xire, 14 years ago)
Line 
1# use pkg-config for getting CFLAGS and LDLIBS
2FFMPEG_LIBS= libavdevice \
3 libavformat \
4 libavfilter \
5 libavcodec \
6 libavresample \
7 libswresample \
8 libswscale \
9 libavutil \
10
11CFLAGS += -Wall -g -s -I./include -std=c99
12CFLAGS += $(shell pkg-config --cflags $(FFMPEG_LIBS))
13LDLIBS += $(shell pkg-config --libs $(FFMPEG_LIBS))
14
15EXAMPLES= test \
16
17OBJS=$(addsuffix .o,$(EXAMPLES))
18
19# the following examples make explicit use of the math library
20test: LDLIBS += -lm
21
22.phony: all clean
23
24all: $(OBJS) $(EXAMPLES)
25
26clean:
27 rm -rf $(EXAMPLES) $(OBJS)