-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
56 lines (42 loc) · 1.16 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
# SPDX-FileCopyrightText: 2024 Soulfind Contributors
# SPDX-FileCopyrightText: 2005-2017 SeeSchloss <[email protected]>
# SPDX-License-Identifier: GPL-3.0-or-later
DC?=ldmd2
DEBUG?=0
BINDIR=bin
SRCDIR=src
OBJDIR=obj
DOCDIR=doc
DEBUGFLAGS=
ifeq ($(DEBUG), 1)
DEBUGFLAGS=-g -debug=db -debug=msg -debug=user
endif
SOULFINDFILES=client.d \
db.d \
message_codes.d \
messages.d \
pm.d \
room.d \
server.d \
defines.d
SOULFINDFILES:=$(addprefix $(SRCDIR)/,$(SOULFINDFILES))
SOULSETUPFILES=soulsetup.d \
defines.d \
db.d
SOULSETUPFILES:=$(addprefix $(SRCDIR)/,$(SOULSETUPFILES))
SOULFIND=$(BINDIR)/soulfind
SOULSETUP=$(BINDIR)/soulsetup
all: soulfind soulsetup
soulfind: $(SOULFIND)
soulsetup: $(SOULSETUP)
$(SOULFIND): $(SOULFINDFILES)
@mkdir -p $(OBJDIR)
@mkdir -p $(BINDIR)
$(DC) $(SOULFINDFILES) -I$(SRCDIR) -od$(OBJDIR) -of$(SOULFIND) -L-lsqlite3 $(DEBUGFLAGS)
$(SOULSETUP): $(SOULSETUPFILES)
@mkdir -p $(OBJDIR)
@mkdir -p $(BINDIR)
$(DC) $(SOULSETUPFILES) -I$(SRCDIR) -od$(OBJDIR) -of$(SOULSETUP) -L-lsqlite3 $(DEBUGFLAGS)
clean:
-rm -rf $(OBJDIR)
-rm -rf $(BINDIR)