Skip to content

Commit

Permalink
support for Alpine Linux, thanks to @vielmetti
Browse files Browse the repository at this point in the history
	closes #12
  • Loading branch information
jpmens committed Jan 5, 2020
1 parent 34e6568 commit a78a6fd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
CFLAGS=-Wall -Werror -I.
LDFLAGS=-L /usr/local/lib -lmosquitto -lconfig

### Linux
### Debian,Ubuntu
# CFLAGS += `pkg-config --cflags lua5.3`
# LDFLAGS += `pkg-config --libs lua5.3`
# LDFLAGS += `pkg-config --libs libbsd`
# BINDIR = /usr/local/bin
# MANDIR = /usr/local/share/man

### Alpine
# CFLAGS = -I/usr/include/lua5.3 -Wall -I.
# LDFLAGS += -L/usr/lib/lua5.3 -llua -lbsd
# BINDIR = /usr/local/bin
# MANDIR = /usr/local/share/man

### macOS
CFLAGS += `pkg-config --cflags lua5.3`
LDFLAGS += `pkg-config --libs lua5.3`
Expand All @@ -26,7 +32,6 @@ MANDIR = /usr/local/share/man
# BINDIR = /usr/local/bin
# MANDIR = /usr/local/man


OBJS = conn.o json.o print.o interp.o

all: msoak
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ $ make
$ make
```

### alpine

```console
# apk add build-base libconfig-dev mosquitto-dev lua5.3-dev libbsd-dev
$ make
```


## see also

* [mqttwarn](https://github.com/jpmens/mqttwarn)
2 changes: 1 addition & 1 deletion msoak.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#ifdef __linux__
#if defined(__linux__) && defined(__GLIBC__)
#include <bsd/string.h>
#endif
#include <string.h>
Expand Down

0 comments on commit a78a6fd

Please sign in to comment.