summaryrefslogtreecommitdiff
path: root/decompress/Makefile
diff options
context:
space:
mode:
authorSiho Shin <victory8500@naver.com>2026-06-28 18:02:39 +0000
committerSiho Shin <victory8500@naver.com>2026-06-28 18:02:39 +0000
commit9016434d59217188604127c27c3b9aeead0a8489 (patch)
tree287726970ae50833ede7f635908752b9ce1f60f6 /decompress/Makefile
Diffstat (limited to 'decompress/Makefile')
-rw-r--r--decompress/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/decompress/Makefile b/decompress/Makefile
new file mode 100644
index 0000000..f3d0d32
--- /dev/null
+++ b/decompress/Makefile
@@ -0,0 +1,25 @@
+CC ?= gcc
+TARGET := decompress
+SRC := decompress.c
+
+PKGS := doca-compress doca-common
+
+CFLAGS ?= -O2 -g -Wall -Wextra -Wno-deprecated-declarations -DALLOW_EXPERIMENTAL_API
+CFLAGS += $(shell pkg-config --cflags $(PKGS) 2>/dev/null)
+
+LDLIBS += $(shell pkg-config --libs $(PKGS) 2>/dev/null)
+
+ifeq ($(strip $(LDLIBS)),)
+CFLAGS += -I/opt/mellanox/doca/include -I/usr/include/libnl3
+LDLIBS += -L/opt/mellanox/doca/lib/aarch64-linux-gnu \
+ -L/opt/mellanox/doca/lib64 \
+ -ldoca_compress -ldoca_common
+endif
+
+all: $(TARGET)
+
+$(TARGET): $(SRC)
+ $(CC) $(CFLAGS) $< -o $@ $(LDLIBS)
+
+clean:
+ rm -f $(TARGET) *.o decompressed.out