OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / freeswan / pluto / alg / Makefile
1 # pluto/alg Makefile
2 # Author: JuanJo Ciarlante <jjo-ipsec@mendoza.gov.ar>
3 #
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>.
8 #
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
12 # for more details.
13 #
14 # $Id: Makefile,v 1.1 2002-07-15 05:50:34 danield Exp $
15
16 Make.common: ../Makefile
17         make -s -C .. showdefs > $@
18
19 -include Make.common
20
21 LIBCRYPTO:=../../libcrypto
22 # ALLFLAGS=$(CPPFLAGS) $(CFLAGS) -I .. -I-  -I ../../lib -I ../../libcrypto
23 ALLFLAGS=$(CPPFLAGS) $(CFLAGS) -I.. -I../../lib -I../../libcrypto
24 LIBALG := libalg.o
25
26 all : $(LIBALG)
27
28 include $(wildcard Makefile.ike_alg_*)
29 #include $(wildcard Makefile.ike_alg_[ab]*)
30
31 $(LIBALG): ike_alginit.o $(ALG_OBJS) $(ALG_LIBS)
32         $(LD) -r -o $@ $^
33
34 # Search for IKE_ALG_INIT_NAME: in ike_alg_*.c to
35 # build ike_alginit.c:ike_alginit()
36
37 ike_alginit.c: $(ALG_SRCS) Makefile
38         @awk '  \
39                 BEGIN { print "extern int ike_alg_init(void); \
40                         int ike_alg_init(void) {" } \
41                 /IKE_ALG_INIT_NAME:/ \
42                         { print "{ extern int " $$2" (void); " $$2 "();}" } \
43                 END   { print "return 0;}" } \
44                 ' $(ROOTDIR)/freeswan/pluto/alg/ike_alg_aes.c /dev/null > $@ 
45
46 clean :
47         @for i in $(ALG_DIRS);do make -C $$i clean;done
48         rm -f *.[oa] ike_alginit.c Make.common
49
50 gatherdeps:
51         @ls $(ALG_SRCS) | grep '\.c' | sed -e 's/\(.*\)\.c$$/\1.o: \1.c/'
52         @echo
53         @ls $(ALG_SRCS) | grep '\.c' | xargs grep '^#[  ]*include[      ]*"' | \
54                 sed -n -e '/#include.*"lib/d' \
55                 -e 's/\.c:#[    ]*include[      ]*"/.o: ..\//' -e 's/".*//p'
56
57 # Dependencies generated by "make gatherdeps":
58
59 ike_alg_aes.o: ike_alg_aes.c
60 ike_alg_blowfish.o: ike_alg_blowfish.c
61 ike_alg_cast.o: ike_alg_cast.c
62 ike_alg_sha2.o: ike_alg_sha2.c
63
64 ike_alg_aes.o: ../md5.h
65 ike_alg_aes.o: ../sha1.h
66 ike_alg_aes.o: ../constants.h
67 ike_alg_aes.o: ../defs.h
68 ike_alg_aes.o: ../state.h
69 ike_alg_aes.o: ../log.h
70 ike_alg_aes.o: ../crypto.h
71 ike_alg_aes.o: ../alg_info.h
72 ike_alg_aes.o: ../ike_alg.h
73 ike_alg_blowfish.o: ../md5.h
74 ike_alg_blowfish.o: ../sha1.h
75 ike_alg_blowfish.o: ../constants.h
76 ike_alg_blowfish.o: ../defs.h
77 ike_alg_blowfish.o: ../state.h
78 ike_alg_blowfish.o: ../log.h
79 ike_alg_blowfish.o: ../crypto.h
80 ike_alg_blowfish.o: ../alg_info.h
81 ike_alg_blowfish.o: ../ike_alg.h
82 ike_alg_cast.o: ../md5.h
83 ike_alg_cast.o: ../sha1.h
84 ike_alg_cast.o: ../constants.h
85 ike_alg_cast.o: ../defs.h
86 ike_alg_cast.o: ../state.h
87 ike_alg_cast.o: ../log.h
88 ike_alg_cast.o: ../crypto.h
89 ike_alg_cast.o: ../alg_info.h
90 ike_alg_cast.o: ../ike_alg.h
91 ike_alg_sha2.o: ../md5.h
92 ike_alg_sha2.o: ../sha1.h
93 ike_alg_sha2.o: ../constants.h
94 ike_alg_sha2.o: ../defs.h
95 ike_alg_sha2.o: ../state.h
96 ike_alg_sha2.o: ../log.h
97 ike_alg_sha2.o: ../crypto.h
98 ike_alg_sha2.o: ../alg_info.h
99 ike_alg_sha2.o: ../ike_alg.h