forked from mpenkov/ffmpeg-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (38 loc) · 1.24 KB
/
Copy pathMakefile
File metadata and controls
57 lines (38 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#
# http://www.gnu.org/software/make/manual/make.html
CC:=gcc
#CC:=clang -arch x86_64
INCLUDES:=$(shell pkg-config --cflags sdl)
#FFMPEG_PATH=/home/frank/forbuild/dist/
FFMPEG_PATH=/Users/frank/forbuild/dist/x86_64
# libavformat libavcodec libswresample libswscale
INCLUDES += -I${FFMPEG_PATH}/include
CFLAGS:=-Wall -ggdb
LDFLAGS:=$(shell pkg-config --libs sdl) -lm -lpthread -lz
# libavformat libavcodec libswresample libswscale libavutil
EXTLIBS += ${FFMPEG_PATH}/lib/libavformat.a
EXTLIBS += ${FFMPEG_PATH}/lib/libavcodec.a
EXTLIBS += ${FFMPEG_PATH}/lib/libswresample.a
EXTLIBS += ${FFMPEG_PATH}/lib/libswscale.a
EXTLIBS += ${FFMPEG_PATH}/lib/libavutil.a
EXE:=tutorial01.out tutorial02.out tutorial03.out tutorial04.out\
tutorial05.out tutorial06.out tutorial07.out tutorial08.out tutorial09.out
#
# This is here to prevent Make from deleting secondary files.
#
.SECONDARY:
#
# $< is the first dependency in the dependency list
# $@ is the target name
#
all: dirs $(addprefix bin/, $(EXE))
dirs:
mkdir -p obj
mkdir -p bin
bin/%.out: obj/%.o
$(CC) $(CFLAGS) $< ${EXTLIBS} $(LDFLAGS) -o $@
obj/%.o : %.c
$(CC) $(CFLAGS) $< $(INCLUDES) -c -o $@
clean:
rm -f obj/*
rm -f bin/*