forked from mpenkov/ffmpeg-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (31 loc) · 846 Bytes
/
Makefile
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
#
# http://www.gnu.org/software/make/manual/make.html
#
CC:=gcc
INCLUDES:=$(shell pkg-config --cflags libavformat libavcodec libswresample libswscale libavutil sdl)
CFLAGS:=-Wall -ggdb
LDFLAGS:=$(shell pkg-config --libs libavformat libavcodec libswresample libswscale libavutil sdl) -lm
EXE:=tutorial01.out tutorial02.out tutorial03.out tutorial04.out\
tutorial05.out tutorial06.out tutorial07.out tutorial08.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)) tags
dirs:
mkdir -p obj
mkdir -p bin
tags: src/*.c
ctags src/*.c
bin/%.out: obj/%.o
$(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
obj/%.o : src/%.c
$(CC) $(CFLAGS) $< $(INCLUDES) -c -o $@
clean:
rm -f obj/*
rm -f bin/*
rm -f tags