- introduced autotools
- first working version
- make dist should work
- things to do:
- UML testing!
- more cleanups
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
## IKE algorithms config. for static linking into pluto
|
||||
## By now 3DES,MD5 and SHA1 are already present in pluto.
|
||||
##
|
||||
CONFIG_IKE_ALG_AES=y
|
||||
CONFIG_IKE_ALG_BLOWFISH=y
|
||||
CONFIG_IKE_ALG_SERPENT=y
|
||||
CONFIG_IKE_ALG_TWOFISH=y
|
||||
CONFIG_IKE_ALG_SHA2=y
|
||||
|
||||
Optional building of algorithms has not been ported to the
|
||||
new build system with autotools. As all the crypto stuff
|
||||
will go into libstrongswan soon, we willll provide this
|
||||
possibility there...
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
# pluto/alg Makefile
|
||||
# Author: JuanJo Ciarlante <[email protected]>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# $Id: Makefile,v 1.3 2004/06/23 04:45:20 as Exp $
|
||||
|
||||
Make.common: ../Makefile
|
||||
make -s -C .. showdefs > $@
|
||||
|
||||
-include Make.common
|
||||
include Config.ike_alg
|
||||
|
||||
LIBCRYPTO:=../../../lib/libcrypto
|
||||
ALLFLAGS=$(CPPFLAGS) $(CFLAGS) -I .. -I- -I ../../../linux/include -I $(LIBCRYPTO)
|
||||
LIBALG := libalg.o
|
||||
|
||||
all : $(LIBALG)
|
||||
|
||||
include $(wildcard Makefile.ike_alg_*)
|
||||
#include $(wildcard Makefile.ike_alg_[ab]*)
|
||||
|
||||
ALG_DIRS:=$(ALG_DIRS-y)
|
||||
ALG_LIBS:=$(ALG_LIBS-y)
|
||||
ALG_SRCS:=$(ALG_SRCS-y)
|
||||
ALG_OBJS:=$(ALG_OBJS-y)
|
||||
$(LIBALG): ike_alginit.o $(ALG_OBJS) $(ALG_LIBS)
|
||||
$(LD) -r -o $@ $^
|
||||
|
||||
# Search for IKE_ALG_INIT_NAME: in ike_alg_*.c to
|
||||
# build ike_alginit.c:ike_alginit()
|
||||
|
||||
ike_alginit.c: $(ALG_SRCS) Makefile Config.ike_alg
|
||||
@awk ' \
|
||||
BEGIN { print "extern int ike_alg_init(void); \
|
||||
int ike_alg_init(void) {" } \
|
||||
/IKE_ALG_INIT_NAME:/ \
|
||||
{ print "{ extern int " $$2" (void); " $$2 "();}" } \
|
||||
END { print "return 0;}" } \
|
||||
' $(ALG_SRCS) /dev/null > $@
|
||||
|
||||
clean :
|
||||
@for i in $(ALG_DIRS);do make -C $$i clean;done
|
||||
rm -f *.[oa] ike_alginit.c Make.common
|
||||
|
||||
gatherdeps:
|
||||
@ls $(ALG_SRCS) | grep '\.c' | sed -e 's/\(.*\)\.c$$/\1.o: \1.c/'
|
||||
@echo
|
||||
@ls $(ALG_SRCS) | grep '\.c' | xargs grep '^#[ ]*include[ ]*"' | \
|
||||
sed -n -e '/#include.*"lib/d' \
|
||||
-e 's/\.c:#[ ]*include[ ]*"/.o: ..\//' -e 's/".*//p'
|
||||
|
||||
# Dependencies generated by "make gatherdeps":
|
||||
|
||||
ike_alg_aes.o: ike_alg_aes.c
|
||||
ike_alg_blowfish.o: ike_alg_blowfish.c
|
||||
ike_alg_serpent.o: ike_alg_serpent.c
|
||||
ike_alg_sha2.o: ike_alg_sha2.c
|
||||
ike_alg_twofish.o: ike_alg_twofish.c
|
||||
|
||||
ike_alg_aes.o: ../constants.h
|
||||
ike_alg_aes.o: ../defs.h
|
||||
ike_alg_aes.o: ../log.h
|
||||
ike_alg_aes.o: ../alg_info.h
|
||||
ike_alg_aes.o: ../ike_alg.h
|
||||
ike_alg_blowfish.o: ../constants.h
|
||||
ike_alg_blowfish.o: ../defs.h
|
||||
ike_alg_blowfish.o: ../log.h
|
||||
ike_alg_blowfish.o: ../alg_info.h
|
||||
ike_alg_blowfish.o: ../ike_alg.h
|
||||
ike_alg_serpent.o: ../constants.h
|
||||
ike_alg_serpent.o: ../defs.h
|
||||
ike_alg_serpent.o: ../log.h
|
||||
ike_alg_serpent.o: ../alg_info.h
|
||||
ike_alg_serpent.o: ../ike_alg.h
|
||||
ike_alg_sha2.o: ../constants.h
|
||||
ike_alg_sha2.o: ../defs.h
|
||||
ike_alg_sha2.o: ../log.h
|
||||
ike_alg_sha2.o: ../alg_info.h
|
||||
ike_alg_sha2.o: ../ike_alg.h
|
||||
ike_alg_twofish.o: ../constants.h
|
||||
ike_alg_twofish.o: ../defs.h
|
||||
ike_alg_twofish.o: ../log.h
|
||||
ike_alg_twofish.o: ../alg_info.h
|
||||
ike_alg_twofish.o: ../ike_alg.h
|
||||
@@ -1,14 +0,0 @@
|
||||
ALG:=aes
|
||||
CONFIG_YES:=$(CONFIG_IKE_ALG_AES)
|
||||
DIR_AES:=$(LIBCRYPTO)/libaes
|
||||
|
||||
ALG_DIRS-$(CONFIG_YES) := $(ALG_DIRS-$(CONFIG_YES)) $(DIR_AES)
|
||||
ALG_LIBS-$(CONFIG_YES) := $(ALG_LIBS-$(CONFIG_YES)) $(DIR_AES)/libaes.a
|
||||
ALG_SRCS-$(CONFIG_YES) := $(ALG_SRCS-$(CONFIG_YES)) ike_alg_$(ALG).c
|
||||
ALG_OBJS-$(CONFIG_YES) := $(ALG_OBJS-$(CONFIG_YES)) ike_alg_$(ALG).o
|
||||
|
||||
$(DIR_AES)/libaes.a:
|
||||
make -C $(DIR_AES) CFLAGS="$(CFLAGS)" libaes.a
|
||||
|
||||
ike_alg_$(ALG).o: ike_alg_$(ALG).c
|
||||
$(CC) -I $(LIBCRYPTO) -I$(DIR_AES) $(COPTS) $(ALLFLAGS) -c $<
|
||||
@@ -1,13 +0,0 @@
|
||||
ALG:=blowfish
|
||||
CONFIG_YES:=$(CONFIG_IKE_ALG_BLOWFISH)
|
||||
DIR_BLOWFISH:=$(LIBCRYPTO)/libblowfish
|
||||
ALG_DIRS-$(CONFIG_YES) := $(ALG_DIRS-$(CONFIG_YES)) $(DIR_BLOWFISH)
|
||||
ALG_LIBS-$(CONFIG_YES) := $(ALG_LIBS-$(CONFIG_YES)) $(DIR_BLOWFISH)/libblowfish.a
|
||||
ALG_SRCS-$(CONFIG_YES) := $(ALG_SRCS-$(CONFIG_YES)) ike_alg_$(ALG).c
|
||||
ALG_OBJS-$(CONFIG_YES) := $(ALG_OBJS-$(CONFIG_YES)) ike_alg_$(ALG).o
|
||||
|
||||
$(DIR_BLOWFISH)/libblowfish.a:
|
||||
make -C $(DIR_BLOWFISH) CFLAGS="$(CFLAGS)" libblowfish.a
|
||||
|
||||
ike_alg_$(ALG).o: ike_alg_$(ALG).c
|
||||
$(CC) -I $(LIBCRYPTO) -I$(DIR_BLOWFISH) $(COPTS) $(ALLFLAGS) -c $<
|
||||
@@ -1,13 +0,0 @@
|
||||
ALG:=serpent
|
||||
CONFIG_YES:=$(CONFIG_IKE_ALG_SERPENT)
|
||||
DIR_SERPENT:=$(LIBCRYPTO)/libserpent
|
||||
ALG_DIRS-$(CONFIG_YES) := $(ALG_DIRS-$(CONFIG_YES)) $(DIR_SERPENT)
|
||||
ALG_LIBS-$(CONFIG_YES) := $(ALG_LIBS-$(CONFIG_YES)) $(DIR_SERPENT)/libserpent.a
|
||||
ALG_SRCS-$(CONFIG_YES) := $(ALG_SRCS-$(CONFIG_YES)) ike_alg_$(ALG).c
|
||||
ALG_OBJS-$(CONFIG_YES) := $(ALG_OBJS-$(CONFIG_YES)) ike_alg_$(ALG).o
|
||||
|
||||
$(DIR_SERPENT)/libserpent.a:
|
||||
make -C $(DIR_SERPENT) CFLAGS="$(CFLAGS)" libserpent.a
|
||||
|
||||
ike_alg_$(ALG).o: ike_alg_$(ALG).c
|
||||
$(CC) -I $(LIBCRYPTO) -I$(DIR_SERPENT) $(COPTS) $(ALLFLAGS) -c $<
|
||||
@@ -1,13 +0,0 @@
|
||||
ALG:=sha2
|
||||
CONFIG_YES:=$(CONFIG_IKE_ALG_SHA2)
|
||||
DIR_SHA2:=$(LIBCRYPTO)/libsha2
|
||||
ALG_DIRS-$(CONFIG_YES) := $(ALG_DIRS-$(CONFIG_YES)) $(DIR_SHA2)
|
||||
ALG_LIBS-$(CONFIG_YES) := $(ALG_LIBS-$(CONFIG_YES)) $(DIR_SHA2)/libsha2.a
|
||||
ALG_SRCS-$(CONFIG_YES) := $(ALG_SRCS-$(CONFIG_YES)) ike_alg_$(ALG).c
|
||||
ALG_OBJS-$(CONFIG_YES) := $(ALG_OBJS-$(CONFIG_YES)) ike_alg_$(ALG).o
|
||||
|
||||
$(DIR_SHA2)/libsha2.a:
|
||||
make -C $(DIR_SHA2) libsha2.a
|
||||
|
||||
ike_alg_$(ALG).o: ike_alg_$(ALG).c
|
||||
$(CC) -I $(LIBCRYPTO) -I$(DIR_SHA2) $(COPTS) $(ALLFLAGS) -c $<
|
||||
@@ -1,13 +0,0 @@
|
||||
ALG:=twofish
|
||||
CONFIG_YES:=$(CONFIG_IKE_ALG_TWOFISH)
|
||||
DIR_TWOFISH:=$(LIBCRYPTO)/libtwofish
|
||||
ALG_DIRS-$(CONFIG_YES) := $(ALG_DIRS-$(CONFIG_YES)) $(DIR_TWOFISH)
|
||||
ALG_LIBS-$(CONFIG_YES) := $(ALG_LIBS-$(CONFIG_YES)) $(DIR_TWOFISH)/libtwofish.a
|
||||
ALG_SRCS-$(CONFIG_YES) := $(ALG_SRCS-$(CONFIG_YES)) ike_alg_$(ALG).c
|
||||
ALG_OBJS-$(CONFIG_YES) := $(ALG_OBJS-$(CONFIG_YES)) ike_alg_$(ALG).o
|
||||
|
||||
$(DIR_TWOFISH)/libtwofish.a:
|
||||
make -C $(DIR_TWOFISH) CFLAGS="$(CFLAGS)" libtwofish.a
|
||||
|
||||
ike_alg_$(ALG).o: ike_alg_$(ALG).c
|
||||
$(CC) -I $(LIBCRYPTO) -I$(DIR_TWOFISH) $(COPTS) $(ALLFLAGS) -c $<
|
||||
@@ -0,0 +1,7 @@
|
||||
extern int ike_alg_init(void); int ike_alg_init(void) {
|
||||
{ extern int ike_alg_aes_init (void); ike_alg_aes_init();}
|
||||
{ extern int ike_alg_blowfish_init (void); ike_alg_blowfish_init();}
|
||||
{ extern int ike_alg_serpent_init (void); ike_alg_serpent_init();}
|
||||
{ extern int ike_alg_sha2_init (void); ike_alg_sha2_init();}
|
||||
{ extern int ike_alg_twofish_init (void); ike_alg_twofish_init();}
|
||||
return 0;}
|
||||
Reference in New Issue
Block a user