[kernel] generic-2.6/2.6.24: refresh patches
[openwrt.git] / target / linux / generic-2.6 / 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_OCFNULL) += ocfnull$(_slash)
47
48 ocf-objs := $(OCF_OBJS)
49
50 $(list-multi) dummy1: $(ocf-objs)
51 $(LD) -r -o $@ $(ocf-objs)
52
53 .PHONY:
54 clean:
55 rm -f *.o *.ko .*.o.flags .*.ko.cmd .*.o.cmd .*.mod.o.cmd *.mod.c
56 rm -f */*.o */*.ko */.*.o.cmd */.*.ko.cmd */.*.mod.o.cmd */*.mod.c */.*.o.flags
57
58 ifdef TOPDIR
59 -include $(TOPDIR)/Rules.make
60 endif
61
62 #
63 # release gen targets
64 #
65
66 .PHONY: patch
67 patch:
68 REL=`date +%Y%m%d`; \
69 patch=ocf-linux-$$REL.patch; \
70 patch24=ocf-linux-24-$$REL.patch; \
71 patch26=ocf-linux-26-$$REL.patch; \
72 ( \
73 find . -name Makefile; \
74 find . -name Config.in; \
75 find . -name Kconfig; \
76 find . -name README; \
77 find . -name '*.[ch]' | grep -v '.mod.c'; \
78 ) | while read t; do \
79 diff -Nau /dev/null $$t | sed 's?^+++ \./?+++ linux/crypto/ocf/?'; \
80 done > $$patch; \
81 cat patches/linux-2.4.35-ocf.patch $$patch > $$patch24; \
82 cat patches/linux-2.6.26-ocf.patch $$patch > $$patch26
83
84 .PHONY: tarball
85 tarball:
86 REL=`date +%Y%m%d`; RELDIR=/tmp/ocf-linux-$$REL; \
87 CURDIR=`pwd`; \
88 rm -rf /tmp/ocf-linux-$$REL*; \
89 mkdir -p $$RELDIR/tools; \
90 cp README* $$RELDIR; \
91 cp patches/openss*.patch $$RELDIR; \
92 cp patches/crypto-tools.patch $$RELDIR; \
93 cp tools/[!C]* $$RELDIR/tools; \
94 cd ..; \
95 tar cvf $$RELDIR/ocf-linux.tar \
96 --exclude=CVS \
97 --exclude=.* \
98 --exclude=*.o \
99 --exclude=*.ko \
100 --exclude=*.mod.* \
101 --exclude=README* \
102 --exclude=ocf-*.patch \
103 --exclude=ocf/patches/openss*.patch \
104 --exclude=ocf/patches/crypto-tools.patch \
105 --exclude=ocf/tools \
106 ocf; \
107 gzip -9 $$RELDIR/ocf-linux.tar; \
108 cd /tmp; \
109 tar cvf ocf-linux-$$REL.tar ocf-linux-$$REL; \
110 gzip -9 ocf-linux-$$REL.tar; \
111 cd $$CURDIR/../../user; \
112 rm -rf /tmp/crypto-tools-$$REL*; \
113 tar cvf /tmp/crypto-tools-$$REL.tar \
114 --exclude=CVS \
115 --exclude=.* \
116 --exclude=*.o \
117 --exclude=cryptotest \
118 --exclude=cryptokeytest \
119 crypto-tools; \
120 gzip -9 /tmp/crypto-tools-$$REL.tar
121
This page took 0.049892 seconds and 5 git commands to generate.