1162911Ssimon#
2162911Ssimon# crypto/camellia/Makefile
3162911Ssimon#
4162911Ssimon
5162911SsimonDIR= camellia
6162911SsimonTOP=	../..
7162911SsimonCC=	cc
8162911SsimonCPP=	$(CC) -E
9162911SsimonINCLUDES=
10162911SsimonCFLAG=-g
11162911SsimonMAKEFILE=	Makefile
12162911SsimonAR=		ar r
13162911Ssimon
14238405SjkimCMLL_ENC= camellia.o cmll_misc.o cmll_cbc.o
15162911Ssimon
16162911SsimonCFLAGS= $(INCLUDES) $(CFLAG)
17162911SsimonASFLAGS= $(INCLUDES) $(ASFLAG)
18162911SsimonAFLAGS= $(ASFLAGS)
19162911Ssimon
20162911SsimonGENERAL=Makefile
21162911Ssimon#TEST=camelliatest.c
22162911SsimonAPPS=
23162911Ssimon
24162911SsimonLIB=$(TOP)/libcrypto.a
25162911SsimonLIBSRC=camellia.c cmll_misc.c cmll_ecb.c cmll_cbc.c cmll_ofb.c \
26238405Sjkim	   cmll_cfb.c cmll_ctr.c cmll_utl.c
27162911Ssimon
28238405SjkimLIBOBJ= cmll_ecb.o cmll_ofb.o cmll_cfb.o cmll_ctr.o cmll_utl.o $(CMLL_ENC)
29162911Ssimon
30162911SsimonSRC= $(LIBSRC)
31162911Ssimon
32162911SsimonEXHEADER= camellia.h
33162911SsimonHEADER= cmll_locl.h $(EXHEADER)
34162911Ssimon
35162911SsimonALL=    $(GENERAL) $(SRC) $(HEADER)
36162911Ssimon
37162911Ssimontop:
38162911Ssimon	(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
39162911Ssimon
40162911Ssimonall:	lib
41162911Ssimon
42162911Ssimonlib:	$(LIBOBJ)
43238405Sjkim	$(AR) $(LIB) $(LIBOBJ)
44162911Ssimon	$(RANLIB) $(LIB) || echo Never mind.
45162911Ssimon	@touch lib
46162911Ssimon
47238405Sjkimcmll-x86.s:	asm/cmll-x86.pl ../perlasm/x86asm.pl
48238405Sjkim	$(PERL) asm/cmll-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
49238405Sjkimcmll-x86_64.s:  asm/cmll-x86_64.pl
50238405Sjkim	$(PERL) asm/cmll-x86_64.pl $(PERLASM_SCHEME) > $@
51162911Ssimon
52162911Ssimonfiles:
53162911Ssimon	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
54162911Ssimon
55162911Ssimonlinks:
56162911Ssimon	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
57162911Ssimon	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
58162911Ssimon	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
59162911Ssimon
60162911Ssimoninstall:
61162911Ssimon	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
62162911Ssimon	@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
63162911Ssimon	do  \
64162911Ssimon	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
65162911Ssimon	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
66162911Ssimon	done;
67162911Ssimon
68162911Ssimontags:
69162911Ssimon	ctags $(SRC)
70162911Ssimon
71162911Ssimontests:
72162911Ssimon
73162911Ssimonlint:
74162911Ssimon	lint -DLINT $(INCLUDES) $(SRC)>fluff
75162911Ssimon
76296341Sdelphijupdate: depend
77296341Sdelphij
78162911Ssimondepend:
79162911Ssimon	@[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
80162911Ssimon	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
81162911Ssimon
82162911Ssimondclean:
83162911Ssimon	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
84162911Ssimon	mv -f Makefile.new $(MAKEFILE)
85162911Ssimon
86162911Ssimonclean:
87162911Ssimon	rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
88162911Ssimon
89162911Ssimon# DO NOT DELETE THIS LINE -- make depend depends on it.
90162911Ssimon
91238405Sjkimcamellia.o: ../../include/openssl/opensslconf.h camellia.c camellia.h
92238405Sjkimcamellia.o: cmll_locl.h
93238405Sjkimcmll_cbc.o: ../../include/openssl/camellia.h ../../include/openssl/modes.h
94238405Sjkimcmll_cbc.o: ../../include/openssl/opensslconf.h cmll_cbc.c
95238405Sjkimcmll_cfb.o: ../../include/openssl/camellia.h ../../include/openssl/modes.h
96238405Sjkimcmll_cfb.o: ../../include/openssl/opensslconf.h cmll_cfb.c
97238405Sjkimcmll_ctr.o: ../../include/openssl/camellia.h ../../include/openssl/modes.h
98238405Sjkimcmll_ctr.o: ../../include/openssl/opensslconf.h cmll_ctr.c
99238405Sjkimcmll_ecb.o: ../../include/openssl/camellia.h
100162911Ssimoncmll_ecb.o: ../../include/openssl/opensslconf.h cmll_ecb.c cmll_locl.h
101205128Ssimoncmll_misc.o: ../../include/openssl/camellia.h ../../include/openssl/crypto.h
102238405Sjkimcmll_misc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
103205128Ssimoncmll_misc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
104205128Ssimoncmll_misc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
105205128Ssimoncmll_misc.o: ../../include/openssl/symhacks.h cmll_locl.h cmll_misc.c
106238405Sjkimcmll_ofb.o: ../../include/openssl/camellia.h ../../include/openssl/modes.h
107238405Sjkimcmll_ofb.o: ../../include/openssl/opensslconf.h cmll_ofb.c
108238405Sjkimcmll_utl.o: ../../include/openssl/camellia.h ../../include/openssl/crypto.h
109238405Sjkimcmll_utl.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
110238405Sjkimcmll_utl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
111238405Sjkimcmll_utl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
112238405Sjkimcmll_utl.o: ../../include/openssl/symhacks.h cmll_locl.h cmll_utl.c
113