forked from wmutils/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (42 loc) · 741 Bytes
/
Makefile
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
46
47
48
49
50
51
52
53
include config.mk
HDR = arg.h util.h
SRC = \
pfw.c \
lsw.c \
mapw.c \
killw.c \
wattr.c \
wtp.c \
wmv.c \
chwso.c \
wtf.c \
wrs.c \
chwb.c \
ignw.c \
wmp.c
OBJ = $(SRC:.c=.o)
BIN = $(SRC:.c=)
MAN = $(SRC:.c=.1)
.POSIX:
.SUFFIXES: .1 .1.gz
all: binutils
binutils: $(BIN)
$(OBJ): $(HDR) util.o
.o:
@echo "LD $@"
@$(LD) $< util.o -o $@ $(LDFLAGS)
.c.o:
@echo "CC $<"
@$(CC) -c $< -o $@ $(CFLAGS)
install: $(BIN)
mkdir -p $(DESTDIR)$(PREFIX)/bin/
cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin/
cd man; $(MAKE) install
uninstall:
@echo "uninstalling binaries"
@for util in $(BIN); do \
rm -f $(DESTDIR)$(PREFIX)/bin/$$util; \
done
cd man; $(MAKE) uninstall
clean :
rm -f $(OBJ) $(BIN) util.o