You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
627 B

PD_MAPPER := pd-mapper
CFLAGS := -Wall -g -O2
LDFLAGS := -lqrtr
prefix ?= /usr/local
bindir := $(prefix)/bin
servicedir := $(prefix)/lib/systemd/system
SRCS := pd-mapper.c \
assoc.c \
json.c \
servreg_loc.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