summaryrefslogtreecommitdiffstats
path: root/satellit_upgrader/dnbd3-Makefile
diff options
context:
space:
mode:
authorSimon Rettberg2021-03-09 14:42:26 +0100
committerSimon Rettberg2021-03-09 14:42:26 +0100
commit99f8b79a1c4f897ef2c30c213f39ba4b7b7f9fe1 (patch)
treeb1e12a6ae4bc054f3314faf3df3f681279d151e7 /satellit_upgrader/dnbd3-Makefile
parent[SSPS] Update dnbd3 config: bgrWindowSize and diskFreeDelay (diff)
downloadsetup-scripts-99f8b79a1c4f897ef2c30c213f39ba4b7b7f9fe1.tar.gz
setup-scripts-99f8b79a1c4f897ef2c30c213f39ba4b7b7f9fe1.tar.xz
setup-scripts-99f8b79a1c4f897ef2c30c213f39ba4b7b7f9fe1.zip
[SSUS] Get ready for changed static_files struct, support new dnbd3
Diffstat (limited to 'satellit_upgrader/dnbd3-Makefile')
-rw-r--r--satellit_upgrader/dnbd3-Makefile48
1 files changed, 48 insertions, 0 deletions
diff --git a/satellit_upgrader/dnbd3-Makefile b/satellit_upgrader/dnbd3-Makefile
new file mode 100644
index 0000000..75455dc
--- /dev/null
+++ b/satellit_upgrader/dnbd3-Makefile
@@ -0,0 +1,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
+