2 # Author: JuanJo Ciarlante <jjo-ipsec@mendoza.gov.ar>
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License as published by the
6 # Free Software Foundation; either version 2 of the License, or (at your
7 # option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # $Id: Makefile,v 1.3 2004/06/23 04:45:20 as Exp $
16 Make.common
: ..
/Makefile
17 make
-s
-C .. showdefs
> $@
20 include Config.ike_alg
22 LIBCRYPTO
:=..
/..
/..
/lib
/libcrypto
23 ALLFLAGS
=$(CPPFLAGS
) $(CFLAGS
) -I ..
-I-
-I ..
/..
/..
/linux
/include -I
$(LIBCRYPTO
)
28 include $(wildcard Makefile.ike_alg_
*)
29 #include $(wildcard Makefile.ike_alg_[ab]*)
31 ALG_DIRS
:=$(ALG_DIRS-y
)
32 ALG_LIBS
:=$(ALG_LIBS-y
)
33 ALG_SRCS
:=$(ALG_SRCS-y
)
34 ALG_OBJS
:=$(ALG_OBJS-y
)
35 $(LIBALG
): ike_alginit.o
$(ALG_OBJS
) $(ALG_LIBS
)
38 # Search for IKE_ALG_INIT_NAME: in ike_alg_*.c to
39 # build ike_alginit.c:ike_alginit()
41 ike_alginit.c
: $(ALG_SRCS
) Makefile Config.ike_alg
43 BEGIN { print "extern int ike_alg_init(void); \
44 int ike_alg_init(void) {" } \
45 /IKE_ALG_INIT_NAME:/ \
46 { print "{ extern int " $$2" (void); " $$2 "();}" } \
47 END { print "return 0;}" } \
48 ' $(ALG_SRCS
) /dev
/null
> $@
51 @for i in
$(ALG_DIRS
);do make
-C
$$i clean;done
52 rm -f
*.
[oa
] ike_alginit.c Make.common
55 @ls
$(ALG_SRCS
) | grep
'\.c' | sed
-e
's/\(.*\)\.c$$/\1.o: \1.c/'
57 @ls
$(ALG_SRCS
) | grep
'\.c' | xargs grep
'^#[ ]*include[ ]*"' | \
58 sed
-n
-e
'/#include.*"lib/d' \
59 -e
's/\.c:#[ ]*include[ ]*"/.o: ..\//' -e
's/".*//p'
61 # Dependencies generated by "make gatherdeps":
63 ike_alg_aes.o
: ike_alg_aes.c
64 ike_alg_blowfish.o
: ike_alg_blowfish.c
65 ike_alg_serpent.o
: ike_alg_serpent.c
66 ike_alg_sha2.o
: ike_alg_sha2.c
67 ike_alg_twofish.o
: ike_alg_twofish.c
69 ike_alg_aes.o
: ..
/constants.h
70 ike_alg_aes.o
: ..
/defs.h
71 ike_alg_aes.o
: ..
/log.h
72 ike_alg_aes.o
: ..
/alg_info.h
73 ike_alg_aes.o
: ..
/ike_alg.h
74 ike_alg_blowfish.o
: ..
/constants.h
75 ike_alg_blowfish.o
: ..
/defs.h
76 ike_alg_blowfish.o
: ..
/log.h
77 ike_alg_blowfish.o
: ..
/alg_info.h
78 ike_alg_blowfish.o
: ..
/ike_alg.h
79 ike_alg_serpent.o
: ..
/constants.h
80 ike_alg_serpent.o
: ..
/defs.h
81 ike_alg_serpent.o
: ..
/log.h
82 ike_alg_serpent.o
: ..
/alg_info.h
83 ike_alg_serpent.o
: ..
/ike_alg.h
84 ike_alg_sha2.o
: ..
/constants.h
85 ike_alg_sha2.o
: ..
/defs.h
86 ike_alg_sha2.o
: ..
/log.h
87 ike_alg_sha2.o
: ..
/alg_info.h
88 ike_alg_sha2.o
: ..
/ike_alg.h
89 ike_alg_twofish.o
: ..
/constants.h
90 ike_alg_twofish.o
: ..
/defs.h
91 ike_alg_twofish.o
: ..
/log.h
92 ike_alg_twofish.o
: ..
/alg_info.h
93 ike_alg_twofish.o
: ..
/ike_alg.h