-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
78 lines (69 loc) · 1.28 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
CC = gcc-8
ifeq ($(origin debug), undefined)
CFLAGS = -O3
else
CFLAGS = -fsanitize=address -fsanitize=undefined -g -Og
LDFLAGS = -lasan -lubsan
endif
CFLAGS += -std=c18 -D_DEFAULT_SOURCE -Wall -Wextra -Wno-parentheses -Wno-unused-parameter -Wno-unused-result -Wno-format-truncation
LDFLAGS += -lpq -lssl -lcrypto -lpthread -lpcre2-8
SRCDIR = src
OBJDIR = obj
OBJECTS = $(addprefix $(OBJDIR)/, \
album.o\
analyze.o\
cache.o\
config.o\
database.o\
files.o\
format.o\
generic.o\
group.o\
http.o\
import.o\
install.o\
main.o\
network.o\
playlist.o\
regex.o\
render.o\
render_main.o\
render_tags.o\
route.o\
route_file.o\
route_form.o\
route_form_add_group.o\
route_form_add_session_track.o\
route_form_attach.o\
route_form_download_remote.o\
route_form_edit_group_tags.o\
route_form_import.o\
route_form_login.o\
route_form_register.o\
route_form_upload.o\
route_image.o\
route_render.o\
route_render_main.o\
route_track.o\
search.o\
session.o\
session_track.o\
stack.o\
system.o\
threads.o\
thumbnail.o\
track.o\
transcode.o\
type.o\
upload.o\
user.o\
)
all: $(OBJECTS)
$(CC) $(CFLAGS) $(OBJECTS) $(LDFLAGS) -o dmusic
$(OBJDIR)/%.o: $(SRCDIR)/%.c
$(CC) $(CFLAGS) -c $< -o $@
$(OBJECTS): | $(OBJDIR)
$(OBJDIR):
mkdir $(OBJDIR)
clean:
rm dmusic $(OBJECTS)