Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. #
  2. # OpenSSL/crypto/rc5/Makefile
  3. #
  4. DIR= rc5
  5. TOP= ../..
  6. CC= cc
  7. CPP= $(CC) -E
  8. INCLUDES=
  9. CFLAG=-g
  10. MAKEFILE= Makefile
  11. AR= ar r
  12. RC5_ENC= rc5_enc.o
  13. # or use
  14. #DES_ENC= r586-elf.o
  15. CFLAGS= $(INCLUDES) $(CFLAG)
  16. ASFLAGS= $(INCLUDES) $(ASFLAG)
  17. AFLAGS= $(ASFLAGS)
  18. GENERAL=Makefile
  19. TEST=rc5test.c
  20. APPS=
  21. LIB=$(TOP)/libcrypto.a
  22. LIBSRC=rc5_skey.c rc5_ecb.c rc5_enc.c rc5cfb64.c rc5ofb64.c
  23. LIBOBJ=rc5_skey.o rc5_ecb.o $(RC5_ENC) rc5cfb64.o rc5ofb64.o
  24. SRC= $(LIBSRC)
  25. EXHEADER= rc5.h
  26. HEADER= rc5_locl.h $(EXHEADER)
  27. ALL= $(GENERAL) $(SRC) $(HEADER)
  28. top:
  29. (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
  30. all: lib
  31. lib: $(LIBOBJ)
  32. $(ARX) $(LIB) $(LIBOBJ)
  33. $(RANLIB) $(LIB) || echo Never mind.
  34. @touch lib
  35. # ELF
  36. r586-elf.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
  37. (cd asm; $(PERL) rc5-586.pl elf $(CFLAGS) > ../$@)
  38. # COFF
  39. r586-cof.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
  40. (cd asm; $(PERL) rc5-586.pl coff $(CFLAGS) > ../$@)
  41. # a.out
  42. r586-out.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
  43. (cd asm; $(PERL) rc5-586.pl a.out $(CFLAGS) > ../$@)
  44. files:
  45. $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
  46. links:
  47. @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
  48. @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
  49. @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
  50. install:
  51. @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
  52. @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
  53. do \
  54. (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
  55. chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
  56. done;
  57. tags:
  58. ctags $(SRC)
  59. tests:
  60. lint:
  61. lint -DLINT $(INCLUDES) $(SRC)>fluff
  62. depend:
  63. @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
  64. $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
  65. dclean:
  66. $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
  67. mv -f Makefile.new $(MAKEFILE)
  68. clean:
  69. rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
  70. # DO NOT DELETE THIS LINE -- make depend depends on it.
  71. rc5_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
  72. rc5_ecb.o: ../../include/openssl/rc5.h rc5_ecb.c rc5_locl.h
  73. rc5_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc5.h
  74. rc5_enc.o: rc5_enc.c rc5_locl.h
  75. rc5_skey.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc5.h
  76. rc5_skey.o: rc5_locl.h rc5_skey.c
  77. rc5cfb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc5.h
  78. rc5cfb64.o: rc5_locl.h rc5cfb64.c
  79. rc5ofb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc5.h
  80. rc5ofb64.o: rc5_locl.h rc5ofb64.c