-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·46 lines (34 loc) · 919 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
CC=gcc
AR=ar
ARFLAGS=-cvq
CFLAGS=-I. -Wall -O3
EXEC=genkey encrypt decrypt
.PHONY:clean mrproper
all:$(EXEC) clean
genkey:genkey.o Blum.o
$(CC) $(CFLAGS) genkey.o Blum.o -o genkey -lgmp
genkey.o:genkey.c
$(CC) $(CFLAGS) -c genkey.c -o genkey.o
encrypt:encrypt.o Blum.o
$(CC) $(CFLAGS) encrypt.o Blum.o -o encrypt -lgmp
encrypt.o:encrypt.c
$(CC) $(CFLAGS) -c encrypt.c -o encrypt.o
decrypt:decrypt.o Blum.o
$(CC) $(CFLAGS) decrypt.o Blum.o -o decrypt -lgmp
decrypt.o:decrypt.c
$(CC) $(CFLAGS) -c decrypt.c -o decrypt.o
Blum.o:Blum.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
find . -name '*.o' -exec rm -f {} ';'
find . -name '*~' -exec rm -f {} ';'
find . -name '#*#' -exec rm -f {} ';'
find . -name '.#*' -exec rm -f {} ';'
find . -name 'core' -exec rm -f {} ';'
find . -name '*.core' -exec rm -f {} ';'
mrproper:clean
rm -rf $(EXEC)
rm -rf *.a
rm -rf *.so
pkg:mrproper
tar -cvf ../archive.tgz .