2016-02-08 01:30:33 +08:00
|
|
|
OUT := rmtfs
|
|
|
|
|
2018-07-03 00:50:10 +08:00
|
|
|
CFLAGS += -Wall -g -O2
|
2019-04-15 18:51:28 +08:00
|
|
|
LDFLAGS += -lqrtr -ludev -lpthread
|
2018-07-03 00:50:10 +08:00
|
|
|
prefix = /usr/local
|
2019-07-26 02:15:03 +08:00
|
|
|
bindir := $(prefix)/bin
|
|
|
|
servicedir := $(prefix)/lib/systemd/system
|
2016-02-08 01:30:33 +08:00
|
|
|
|
2019-04-15 18:51:28 +08:00
|
|
|
SRCS := qmi_rmtfs.c rmtfs.c rproc.c sharedmem.c storage.c util.c
|
2016-02-08 01:30:33 +08:00
|
|
|
OBJS := $(SRCS:.c=.o)
|
|
|
|
|
|
|
|
$(OUT): $(OBJS)
|
|
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
|
2016-02-08 13:33:54 +08:00
|
|
|
%.c: %.qmi
|
2018-02-01 12:56:57 +08:00
|
|
|
qmic -k < $<
|
2016-02-08 13:33:54 +08:00
|
|
|
|
2019-07-26 02:15:03 +08:00
|
|
|
rmtfs.service: rmtfs.service.in
|
|
|
|
@sed 's+RMTFS_PATH+$(bindir)+g' $< > $@
|
|
|
|
|
|
|
|
install: $(OUT) rmtfs.service
|
|
|
|
@install -D -m 755 $(OUT) $(DESTDIR)$(prefix)/bin/$(OUT)
|
|
|
|
@install -D -m 644 rmtfs.service $(DESTDIR)$(servicedir)/rmtfs.service
|
2016-02-08 01:30:33 +08:00
|
|
|
|
|
|
|
clean:
|
2019-07-26 02:15:03 +08:00
|
|
|
rm -f $(OUT) $(OBJS) rmtfs.service
|
2016-02-08 01:30:33 +08:00
|
|
|
|