-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
executable file
·54 lines (42 loc) · 816 Bytes
/
makefile
File metadata and controls
executable file
·54 lines (42 loc) · 816 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
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
#
# 2023 Robert Papagna
#
# https://github.com/rpeepz/File2Image
#
#
BIN = File2Image
CC = clang -Iinc
CFLAG = -Wextra -Werror
LIB = -lpng
# LIB += -lavcodec -lavformat -lswscale
OBJ_PATH = obj
DEBUG = -Wall -g
BUILD = -std=c99 -pedantic -O2
OBJ = $(addprefix $(OBJ_PATH)/,$(SRC:.c=.o))
SRC = main.c\
file.c\
ipow.c\
create_png.c\
read_png.c\
run.c\
header.c\
video.c\
complete.c
all: $(BIN)
re: fclean all
$(BIN):$(OBJ)
$(CC) $(CFLAG) $(LIB) $(OBJ) -o $@
$(OBJ_PATH):
mkdir -p $@
$(OBJ_PATH)/%.o: src/%.c inc/*.h | $(OBJ_PATH)
$(CC) $(CFLAG) -c $< -o $@
clean:
rm -rf $(OBJ_PATH)
fclean: clean
rm -rf $(BIN)
rm -rf $(BIN).dSYM
rm -f f2i*.png
debug: fclean
$(CC) $(CFLAG) $(DEBUG) $(LIB) src/*.c -o $(BIN)
build: fclean
$(CC) $(CFLAG) $(BUILD) $(LIB) src/*.c -o $(BIN)