forked from wmutils/opt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (33 loc) · 661 Bytes
/
Makefile
File metadata and controls
45 lines (33 loc) · 661 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
39
40
41
42
43
44
45
include config.mk
HDR = arg.h util.h
SRC = \
wew.c \
chwb2.c \
wname.c \
xmmv.c
OBJ = $(SRC:.c=.o)
BIN = $(SRC:.c=)
.POSIX:
all: binutils
binutils: $(BIN)
manpages:
cd man; $(MAKE) $(MFLAGS)
$(OBJ): $(HDR) util.o
.o:
@echo "LD $@"
@$(LD) $< -o $@ $(LDFLAGS) util.o
.c.o:
@echo "CC $<"
@$(CC) -c $< -o $@ $(CFLAGS)
install: $(BIN)
mkdir -p $(DESTDIR)$(PREFIX)/bin/
cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin/
cd man; $(MAKE) $(MFLAGS) install
uninstall:
@echo "uninstalling binaries"
@for util in $(BIN); do \
rm -f $(DESTDIR)$(PREFIX)/bin/$$util; \
done
cd man; $(MAKE) $(MFLAGS) uninstall
clean:
rm -f $(OBJ) $(BIN) util.o