-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
72 lines (55 loc) · 1.87 KB
/
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
PROJNAME = geofindkey
PROGNAME1 = geofindkey
PROGNAME2 = geoszbtoyxh
PROGNAME3 = geositer500
PROGNAME4 = geoconformal
PROGNAME5 = geodeform500
PROGNAME6 = geohelmert3d
SRCS = src
PROGS = $(PROGNAME1) $(PROGNAME2) $(PROGNAME3) $(PROGNAME4) $(PROGNAME5) $(PROGNAME6)
CC = gcc
CFLAGS = -Wall -s
LIBS = -lm
VER = 2
REL = 2
PREFIX = /usr/local
INSTALL = install
LN = ln -fs
GROFF2PDF = groff -m man -T pdf
RM = rm -f
.PHONY: all clean install
all: $(PROGS)
clean:
$(RM) $(PROGS) man_*.pdf
$(PROGNAME1): $(SRCS)/$(PROGNAME1).c
$(CC) $(CFLAGS) $^ -o $@ $(LIBS)
$(PROGNAME2): $(SRCS)/$(PROGNAME2).c
$(CC) $(CFLAGS) $^ -o $@ $(LIBS)
$(PROGNAME3): $(SRCS)/$(PROGNAME3).c
$(CC) $(CFLAGS) $^ -o $@ $(LIBS)
$(PROGNAME4): $(SRCS)/$(PROGNAME4).c
$(CC) $(CFLAGS) $^ -o $@ $(LIBS)
$(PROGNAME5): $(SRCS)/$(PROGNAME5).c
$(CC) $(CFLAGS) $^ -o $@ $(LIBS)
$(PROGNAME6): $(SRCS)/$(PROGNAME6).c
$(CC) $(CFLAGS) $^ -o $@ $(LIBS)
manual: man_$(PROGNAME1).pdf man_$(PROGNAME2).pdf man_$(PROGNAME3).pdf man_$(PROGNAME4).pdf man_$(PROGNAME5).pdf man_$(PROGNAME6).pdf
man_$(PROGNAME1).pdf: man/man1/$(PROGNAME1).1
$(GROFF2PDF) $^ > $@
man_$(PROGNAME2).pdf: man/man1/$(PROGNAME2).1
$(GROFF2PDF) $^ > $@
man_$(PROGNAME3).pdf: man/man1/$(PROGNAME3).1
$(GROFF2PDF) $^ > $@
man_$(PROGNAME4).pdf: man/man1/$(PROGNAME4).1
$(GROFF2PDF) $^ > $@
man_$(PROGNAME5).pdf: man/man1/$(PROGNAME5).1
$(GROFF2PDF) $^ > $@
man_$(PROGNAME6).pdf: man/man1/$(PROGNAME6).1
$(GROFF2PDF) $^ > $@
install: $(PROGS)
$(INSTALL) -d $(PREFIX)/bin
$(INSTALL) -m 0755 $(PROGS) $(PREFIX)/bin/
$(INSTALL) -d $(PREFIX)/share/man/man1
$(INSTALL) -m 0644 man/man1/*.1 $(PREFIX)/share/man/man1
$(INSTALL) -d $(PREFIX)/share/doc/$(PROJNAME)
$(INSTALL) -m 0644 LICENSE README.md doc/* $(PREFIX)/share/doc/$(PROJNAME)