Skip to content

Commit

Permalink
Fix build for arch-based distros
Browse files Browse the repository at this point in the history
  • Loading branch information
cjab committed Mar 17, 2024
1 parent 8fc88f8 commit ee4035b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
ifeq ($(shell uname -s),Linux)
ifeq ($(shell grep -q 'NixOS' /etc/os-release && echo $$?),0)
MSGPACK_LIB = -lmsgpack-c
else
MSGPACK_LIB = -lmsgpackc
endif
else
MSGPACK_LIB = -lmsgpackc
endif

CC = gcc
CFLAGS = -Wall -lcjson -lmsgpack-c
CFLAGS = -Wall -lcjson $(MSGPACK_LIB)

PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
Expand Down

0 comments on commit ee4035b

Please sign in to comment.