-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (37 loc) · 1.04 KB
/
Makefile
File metadata and controls
49 lines (37 loc) · 1.04 KB
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
# stlp - time lock puzzle cryptosystem
# See COPYING file for copyright and license details.
#TODO: Manual, distribution, install and uninstall
include config.mk
SRC = etlp.c dtlp.c
OBJ = $(SRC:.c=o)
all: options stlp
# Show compile options set
options:
@echo stlp build options:
@echo "CFLAGS = $(CFLAGS)"
@echo "LDFLAGS = $(LDFLAGS)"
@echo "CC = $(CC)"
# Compilation
.c.o:
$(CC) -c $(CFLAGS) $<
# Linkage
etlp: etlp.o
$(CC) -o $@ etlp.o $(LDFLAGS)
dtlp: dtlp.o
$(CC) -o $@ dtlp.o $(LDFLAGS)
stlp: etlp dtlp
clean:
rm -rf etlp etlp.o dtlp dtlp.o
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f etlp dtlp $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/etlp
chmod 755 $(DESTDIR)$(PREFIX)/bin/dtlp
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
sed "s/VERSION/$(VERSION)/g" < etlp.1 > $(DESTDIR)$(MANPREFIX)/man1/etlp.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/etlp.1
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/etlp\
$(DESTDIR)$(PREFIX)/bin/dtlp\
$(DESTDIR)$(MANPREFIX)/man1/etlp.1
.PHONY: all options clean install uninstall