-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
132 lines (97 loc) · 2.15 KB
/
Makefile.in
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#
# $Id: Makefile.in,v 1.1 2000/02/17 05:57:22 ahn Exp $
#
# This is the Makefile for the U.S. RES-RSA package. It is no longer
# dependent on the Vanilla server Makefile system.
#
#
# Compiler defines
#
CC = @CC@
AR = ar
RANLIB = @RANLIB@
CFLAGS = -O2
#
# GMP include dir and library
#
GMP_INC = @GMP_INC@
GMP_LIB = @GMP_LIB@ -lgmp
#
# External include header file
#
RSA_HDR = rsa.h
#
# Custom (non GMP) RSA lib sources
#
RSA_LIB = librsa.a
RSA_LIBSRC = rsa_math.c rsa_encode.c
RSA_LIBHDR = rsa_math.h
RSA_LIBOBJ = $(RSA_LIBSRC:.c=.o)
#
# GMP RSA lib sources
#
RSA_GMPLIB = librsa-gmp.a
RSA_GMPSRC = rsa_gmp.c rsa_encode_gmp.c
RSA_GMPHDR = rsa_gmp.h
RSA_GMPOBJ = $(RSA_GMPSRC:.c=.o)
#
# mkkey sources
#
MKKEY = mkkey
MKKEY_SRC = mkkey.c
MKKEY_OBJ = $(MKKEY_SRC:.c=.o)
#
# Do nothing for default 'all' rule. The Vanilla server compiles the
# rsa_util.c file independently, and mkkey is not needed for the server.
#
all: Makefile $(RSA_LIB) @GMP_TARGETS@
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
#
# Build the non-GMP RSA lib
#
$(RSA_LIB): $(RSA_LIBOBJ)
$(AR) cvr $(RSA_LIB) $(RSA_LIBOBJ)
$(RANLIB) $(RSA_LIB)
#
# Build the GMP RSA lib
#
$(RSA_GMPLIB): $(RSA_GMPOBJ)
$(AR) cvr $(RSA_GMPLIB) $(RSA_GMPOBJ)
$(RANLIB) $(RSA_LIB)
#
# mkkey client RSA code and key generator, not needed for the server
#
$(MKKEY): $(MKKEY_OBJ)
$(CC) $(CFLAGS) $(GMP_INC) -o $(MKKEY) $(MKKEY_OBJ) $(GMP_LIB)
#
# GMP is not on this system
#
nogmp:; @/bin/echo $(RSA_GMPLIB) and $(MKKEY) require GMP 1.3.2 or higher.
clean:; @/bin/rm -f $(RSA_LIBOBJ) $(RSA_GMPOBJ) $(MKKEY_OBJ) core
reallyclean: clean
@/bin/rm -f $(RSA_LIB) $(RSA_GMPLIB) $(MKKEY) *.bak
#
# Maintainer dist clean
#
distclean: reallyclean
@/bin/rm -f config.cache config.h config.log config.status \
*.c~ *.h~
#
# Do nothing for install, depend rules for now.
#
install:
depend:; /bin/touch .depend
@makedepend -f.depend $(CFLAGS) $(GMP_INC) $(RSA_LIBSRC) \
$(RSA_GMPSRC) $(MKKEY_SRC)
#
# Default compile rule
#
.SUFFIXES: .c
.c.o:; $(CC) $(CFLAGS) $(GMP_INC) -c $<
#
# Silently include dependency file
#
sinclude .depend