Amit Pundir | d477f82 | 2020-02-07 22:26:08 +0530 | [diff] [blame^] | 1 | TQFTPSERV := tqftpserv |
| 2 | |
| 3 | CFLAGS := -Wall -g -O2 |
| 4 | LDFLAGS := -lqrtr |
| 5 | |
| 6 | prefix ?= /usr/local |
| 7 | bindir := $(prefix)/bin |
| 8 | servicedir := $(prefix)/lib/systemd/system |
| 9 | |
| 10 | SRCS := tqftpserv.c translate.c |
| 11 | |
| 12 | OBJS := $(SRCS:.c=.o) |
| 13 | |
| 14 | $(TQFTPSERV): $(OBJS) |
| 15 | $(CC) -o $@ $^ $(LDFLAGS) |
| 16 | |
| 17 | tqftpserv.service: tqftpserv.service.in |
| 18 | @sed 's+TQFTPSERV_PATH+$(bindir)+g' $< > $@ |
| 19 | |
| 20 | install: $(TQFTPSERV) tqftpserv.service |
| 21 | @install -D -m 755 $(TQFTPSERV) $(DESTDIR)$(bindir)/$(TQFTPSERV) |
| 22 | @install -D -m 644 tqftpserv.service $(DESTDIR)$(servicedir)/tqftpserv.service |
| 23 | |
| 24 | clean: |
| 25 | rm -f $(TQFTPSERV) $(OBJS) tqftpserv.service |