-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (27 loc) · 705 Bytes
/
Copy pathMakefile
File metadata and controls
38 lines (27 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
MAKEFLAGS += --no-print-directory
include mkconf
SRC = src/daemon.c src/plugd.c src/other.c src/debug.c
OBJ = $(SRC:.c=.o)
PREFIX ?= /usr/local
SBIN = $(PREFIX)/sbin
OUT = plugd
all: $(OUT)
compile:
@$(MAKE) -C src
$(OUT): compile
@echo " LD $@.unstripped"
@$(LD) $(LDFLAGS) -o $@.unstripped $(OBJ)
@echo " STRIP $@"
@cp $@.unstripped $@
@strip $@
install: $(OUT)
@echo " INSTALL $< -> $(DESTDIR)$(SBIN)/$<"
@install $< $(DESTDIR)$(SBIN)/$<
uninstall:
@echo " RM $(DESTDIR)$(SBIN)/$(OUT)"
@rm -f $(DESTDIR)$(SBIN)/$(OUT)
clean:
@$(MAKE) -C src clean
@echo " RM $(OUT) $(OUT).unstripped"
@rm -f $(OUT) $(OUT).unstripped
.PHONY: compile install uninstall clean