]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
add makefile
authorPaul Cruz <paulcruz74@fb.com>
Fri, 11 Aug 2017 21:35:13 +0000 (14:35 -0700)
committerPaul Cruz <paulcruz74@fb.com>
Fri, 11 Aug 2017 21:35:13 +0000 (14:35 -0700)
doc/educational_decoder/Makefile [new file with mode: 0644]

diff --git a/doc/educational_decoder/Makefile b/doc/educational_decoder/Makefile
new file mode 100644 (file)
index 0000000..27b1841
--- /dev/null
@@ -0,0 +1,21 @@
+HARNESS_FILES=*.c
+
+MULTITHREAD_LDFLAGS = -pthread
+DEBUGFLAGS= -g -DZSTD_DEBUG=1
+CPPFLAGS += -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/compress \
+            -I$(ZSTDDIR)/dictBuilder -I$(ZSTDDIR)/deprecated -I$(PRGDIR)
+CFLAGS   ?= -O3
+CFLAGS   += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow                 \
+            -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \
+            -Wstrict-prototypes -Wundef -Wformat-security                   \
+            -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings      \
+            -Wredundant-decls
+CFLAGS   += $(DEBUGFLAGS)
+CFLAGS   += $(MOREFLAGS)
+FLAGS     = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MULTITHREAD_LDFLAGS)
+
+harness: $(HARNESS_FILES)
+       $(CC) $(FLAGS) $^ -o $@
+
+clean:
+       @$(RM) -f harness