-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (45 loc) · 997 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
54
55
56
57
INSTALL = /usr/bin/env install
AR = /usr/bin/ar
DEST =
PREFIX = /usr
BINDIR = $(PREFIX)/bin
LIBDIR = $(PREFIX)/lib
MANDIR = $(PREFIX)/share/man
TRGT = hello-mpm
LINK = gcc
COMP = gcc
CFLAGS =
LFLAGS =
LIBS =
INCPATH = -I/usr/include
LIBDIR = -L/usr/lib
CLN =
OBJ = test.o
DEL = rm -f
.SUFFIXES: .o .c .cpp .cc .cxx .C
.cpp.o:
$(COMP) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
.cc.o:
$(COMP) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
.cxx.o:
$(COMP) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
.C.o:
$(COMP) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
.c.o:
$(COMP) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
all: $(TRGT)
$(TRGT): $(OBJ)
$(COMP) $(LFLAGS) -o $(TRGT) $(OBJ) $(LIBDIR) $(LIBS)
test.o: test.c
$(COMP) -c $(CFLAGS) $(INCPATH) -o test.o test.c
clean:
$(DEL) $(OBJ)
$(DEL) $(CLN)
$(DEL) $(TRGT)
$(DEL) hello-mpm-x86_64.pkg.tar
$(DEL) -r build
install:
$(INSTALL) -d $(DEST)$(BINDIR)
$(INSTALL) -m755 hello-mpm $(DEST)$(BINDIR)/hello-mpm
uninstall:
rm -f $(DEST)$(BINDIR)/hello-mpm