ixp4xx: sync 2.6.32 kernel config
[openwrt.git] / target / linux / generic / files / crypto / ocf / Makefile
1 # for SGlinux builds
2 -include $(ROOTDIR)/modules/.config
3
4 OCF_OBJS = crypto.o criov.o
5
6 ifdef CONFIG_OCF_RANDOMHARVEST
7 OCF_OBJS += random.o
8 endif
9
10 ifdef CONFIG_OCF_FIPS
11 OCF_OBJS += rndtest.o
12 endif
13
14 # Add in autoconf.h to get #defines for CONFIG_xxx
15 AUTOCONF_H=$(ROOTDIR)/modules/autoconf.h
16 ifeq ($(AUTOCONF_H), $(wildcard $(AUTOCONF_H)))
17 EXTRA_CFLAGS += -include $(AUTOCONF_H)
18 export EXTRA_CFLAGS
19 endif
20
21 ifndef obj
22 obj ?= .
23 _obj = subdir
24 mod-subdirs := safe hifn ixp4xx talitos ocfnull
25 export-objs += crypto.o criov.o random.o
26 list-multi += ocf.o
27 _slash :=
28 else
29 _obj = obj
30 _slash := /
31 endif
32
33 EXTRA_CFLAGS += -I$(obj)/.
34
35 obj-$(CONFIG_OCF_OCF) += ocf.o
36 obj-$(CONFIG_OCF_CRYPTODEV) += cryptodev.o
37 obj-$(CONFIG_OCF_CRYPTOSOFT) += cryptosoft.o
38 obj-$(CONFIG_OCF_BENCH) += ocf-bench.o
39
40 $(_obj)-$(CONFIG_OCF_SAFE) += safe$(_slash)
41 $(_obj)-$(CONFIG_OCF_HIFN) += hifn$(_slash)
42 $(_obj)-$(CONFIG_OCF_IXP4XX) += ixp4xx$(_slash)
43 $(_obj)-$(CONFIG_OCF_TALITOS) += talitos$(_slash)
44 $(_obj)-$(CONFIG_OCF_PASEMI) += pasemi$(_slash)
45 $(_obj)-$(CONFIG_OCF_EP80579) += ep80579$(_slash)
46 $(_obj)-$(CONFIG_OCF_CRYPTOCTEON) += cryptocteon$(_slash)
47 $(_obj)-$(CONFIG_OCF_KIRKWOOD) += kirkwood$(_slash)
48 $(_obj)-$(CONFIG_OCF_OCFNULL) += ocfnull$(_slash)
49 $(_obj)-$(CONFIG_OCF_C7108) += c7108$(_slash)
50
51 ocf-objs := $(OCF_OBJS)
52
53 $(list-multi) dummy1: $(ocf-objs)
54 $(LD) -r -o $@ $(ocf-objs)
55
56 .PHONY:
57 clean:
58 rm -f *.o *.ko .*.o.flags .*.ko.cmd .*.o.cmd .*.mod.o.cmd *.mod.c
59 rm -f */*.o */*.ko */.*.o.cmd */.*.ko.cmd */.*.mod.o.cmd */*.mod.c */.*.o.flags
60
61 ifdef TOPDIR
62 -include $(TOPDIR)/Rules.make
63 endif
64
65 #
66 # release gen targets
67 #
68
69 .PHONY: patch
70 patch:
71 REL=`date +%Y%m%d`; \
72 patch=ocf-linux-$$REL.patch; \
73 patch24=ocf-linux-24-$$REL.patch; \
74 patch26=ocf-linux-26-$$REL.patch; \
75 ( \
76 find . -name Makefile; \
77 find . -name Config.in; \
78 find . -name Kconfig; \
79 find . -name README; \
80 find . -name '*.[ch]' | grep -v '.mod.c'; \
81 ) | while read t; do \
82 diff -Nau /dev/null $$t | sed 's?^+++ \./?+++ linux/crypto/ocf/?'; \
83 done > $$patch; \
84 cat patches/linux-2.4.35-ocf.patch $$patch > $$patch24; \
85 cat patches/linux-2.6.33-ocf.patch $$patch > $$patch26
86
87 .PHONY: tarball
88 tarball:
89 REL=`date +%Y%m%d`; RELDIR=/tmp/ocf-linux-$$REL; \
90 CURDIR=`pwd`; \
91 rm -rf /tmp/ocf-linux-$$REL*; \
92 mkdir -p $$RELDIR/tools; \
93 cp README* $$RELDIR; \
94 cp patches/openss*.patch $$RELDIR; \
95 cp patches/crypto-tools.patch $$RELDIR; \
96 cp tools/[!C]* $$RELDIR/tools; \
97 cd ..; \
98 tar cvf $$RELDIR/ocf-linux.tar \
99 --exclude=CVS \
100 --exclude=.* \
101 --exclude=*.o \
102 --exclude=*.ko \
103 --exclude=*.mod.* \
104 --exclude=README* \
105 --exclude=ocf-*.patch \
106 --exclude=ocf/patches/openss*.patch \
107 --exclude=ocf/patches/crypto-tools.patch \
108 --exclude=ocf/tools \
109 ocf; \
110 gzip -9 $$RELDIR/ocf-linux.tar; \
111 cd /tmp; \
112 tar cvf ocf-linux-$$REL.tar ocf-linux-$$REL; \
113 gzip -9 ocf-linux-$$REL.tar; \
114 cd $$CURDIR/../../user; \
115 rm -rf /tmp/crypto-tools-$$REL*; \
116 tar cvf /tmp/crypto-tools-$$REL.tar \
117 --exclude=CVS \
118 --exclude=.* \
119 --exclude=*.o \
120 --exclude=cryptotest \
121 --exclude=cryptokeytest \
122 crypto-tools; \
123 gzip -9 /tmp/crypto-tools-$$REL.tar
124
This page took 0.054302 seconds and 5 git commands to generate.