-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (21 loc) · 743 Bytes
/
Makefile
File metadata and controls
27 lines (21 loc) · 743 Bytes
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
# Makefile for ffmpeg-tutorial
# List of tutorial directories and C files
tutorials = tutorial01 tutorial02 tutorial03 tutorial04 tutorial05 tutorial06 tutorial07
# Compiler and flags
CC = clang
CFLAGS = -g \
-I/opt/homebrew/Cellar/ffmpeg/7.1_3/include \
-I/opt/homebrew/Cellar/sdl2/2.30.8/include
LDFLAGS = \
-L/opt/homebrew/Cellar/ffmpeg/7.1_3/lib \
-L/opt/homebrew/Cellar/sdl2/2.30.8/lib \
-lavcodec -lavformat -lavutil -lswscale -lavdevice -lswresample -lsdl2 -lm -lz
# Default target: build all tutorials
all: $(tutorials)
# Pattern rule to build each tutorial
$(tutorials):
$(CC) $(CFLAGS) $@/$@.c -o $@/$@ $(LDFLAGS)
# Clean up all built binaries
clean:
rm -f $(foreach t,$(tutorials),$t/$t)
.PHONY: all clean $(tutorials)