10997ba7c4
Many distros and ship Linux firmware in compressed form. In the case of fedora that is .xz format, so lets add the ability for pd-mapper to understand LZMA compressed JSON files. Signed-off-by: Jeremy Linton <lintonrjeremy@gmail.com>
30 lines
651 B
Makefile
30 lines
651 B
Makefile
PD_MAPPER := pd-mapper
|
|
|
|
CFLAGS += -Wall -g -O2
|
|
LDFLAGS += -lqrtr -llzma
|
|
prefix ?= /usr/local
|
|
|
|
bindir := $(prefix)/bin
|
|
servicedir := $(prefix)/lib/systemd/system
|
|
|
|
SRCS := pd-mapper.c \
|
|
assoc.c \
|
|
json.c \
|
|
servreg_loc.c \
|
|
lzma_decomp.c
|
|
|
|
OBJS := $(SRCS:.c=.o)
|
|
|
|
$(PD_MAPPER): $(OBJS)
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
pd-mapper.service: pd-mapper.service.in
|
|
@sed 's+PD_MAPPER_PATH+$(bindir)+g' $< > $@
|
|
|
|
install: $(PD_MAPPER) pd-mapper.service
|
|
@install -D -m 755 $(PD_MAPPER) $(DESTDIR)$(bindir)/$(PD_MAPPER)
|
|
@install -D -m 644 pd-mapper.service $(DESTDIR)$(servicedir)/pd-mapper.service
|
|
|
|
clean:
|
|
rm -f $(PD_MAPPER) $(OBJS) pd-mapper.service
|