blob: 75455dc8c4cb543077e186cce8335568fbb494a4 (
plain) (
blame)
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
|
all: dnbd3-server
CC?=gcc
CFLAGS+=-pipe -DNDEBUG -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \
-O3 -W -Wall -Wextra -std=gnu11 -Wno-unused-parameter -Iinc/
#CC=clang
#CFLAGS=-g -pipe -fsanitize=address -O1 -fno-omit-frame-pointer -W -Wall -Wextra -std=gnu99 -Wno-unused-parameter
LIBS+=-ljansson -latomic -lpthread
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
dnbd3-server: inc/dnbd3/build.h \
src/server/altservers.o \
src/server/fileutil.o \
src/server/fuse.o \
src/server/globals.o \
src/server/helper.o \
src/server/image.o \
src/server/ini.o \
src/server/integrity.o \
src/server/locks.o \
src/server/net.o \
src/server/picohttpparser/picohttpparser.o \
src/server/reference.o \
src/server/rpc.o \
src/server/server.o \
src/server/threadpool.o \
src/server/uplink.o \
src/server/urldecode.o \
src/shared/crc32.o \
src/shared/fdsignal.o \
src/shared/log.o \
src/shared/serialize.o \
src/shared/sockhelper.o \
src/shared/timing.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) ${LIBS}
inc/dnbd3/build.h:
@sed "s/@DNBD3_BUILD@/Makefile/;s/@DNBD3_BUILD_DATE@/$$(date +%Y-%m-%d)/" inc/dnbd3/build.h.in > inc/dnbd3/build.h
.PHONY: clean inc/dnbd3/build.h
clean:
rm -f -- *.[ao] dnbd3-server inc/dnbd3/build.h src/*/*.o src/*/*/*.o
|