blob: 54ae35f4b2a50232fa0417b516e8b446a7f1d3a3 [file] [log] [blame]
Amit Pundir33109f72020-02-07 22:26:08 +05301OUT := rmtfs
2
3CFLAGS += -Wall -g -O2
4LDFLAGS += -lqrtr -ludev -lpthread
5prefix = /usr/local
6bindir := $(prefix)/bin
7servicedir := $(prefix)/lib/systemd/system
8
9SRCS := qmi_rmtfs.c rmtfs.c rproc.c sharedmem.c storage.c util.c
10OBJS := $(SRCS:.c=.o)
11
12$(OUT): $(OBJS)
13 $(CC) -o $@ $^ $(LDFLAGS)
14
15%.c: %.qmi
16 qmic -k < $<
17
18rmtfs.service: rmtfs.service.in
19 @sed 's+RMTFS_PATH+$(bindir)+g' $< > $@
20
21install: $(OUT) rmtfs.service
22 @install -D -m 755 $(OUT) $(DESTDIR)$(prefix)/bin/$(OUT)
23 @install -D -m 644 rmtfs.service $(DESTDIR)$(servicedir)/rmtfs.service
24
25clean:
26 rm -f $(OUT) $(OBJS) rmtfs.service
27