home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / crypl200.zip / DMAKEFIL.E < prev    next >
Text File  |  1995-08-18  |  4KB  |  121 lines

  1. #****************************************************************************
  2. #*                                                                            *
  3. #*                        Makefile for the encryption library                    *
  4. #*                                                                            *
  5. #****************************************************************************
  6.  
  7. CC        = dcc -v -c
  8.  
  9. PROJ    = crypt
  10. LIBNAME    = $(PROJ).lib
  11.  
  12. # Where object files go (/tmp is a good place)
  13. OUTPATH    = DObjs/
  14. # Extension for object files
  15. OBJ        = .o
  16.  
  17. # Linker (just use the C compiler)
  18. LD        = dcc -v
  19. # Echo to screen command
  20. ECHO    = echo
  21. # The make command
  22. MAKE    = dmake
  23.  
  24. # The object files which make up the library
  25.  
  26. OBJS    = $(OUTPATH)crypt$(OBJ) $(OUTPATH)lib_3des$(OBJ) $(OUTPATH)lib_des$(OBJ) $(OUTPATH)lib_idea$(OBJ) $(OUTPATH)lib_mdc$(OBJ) $(OUTPATH)lib_null$(OBJ) $(OUTPATH)lib_rc4$(OBJ) $(OUTPATH)idea$(OBJ) $(OUTPATH)3ecb_enc$(OBJ) $(OUTPATH)ecb_enc$(OBJ) $(OUTPATH)pcbc_enc$(OBJ) $(OUTPATH)set_key$(OBJ) $(OUTPATH)rc4$(OBJ) $(OUTPATH)shs$(OBJ)
  27.  
  28. #****************************************************************************
  29. #*                                                                            *
  30. #*            If no args are given, print a usage message and exit            *
  31. #*                                                                            *
  32. #****************************************************************************
  33.  
  34. default:    $(LIBNAME)
  35.  
  36. love:
  37.         @$(ECHO) "Nicht wahr?"
  38.         @$(ECHO)
  39.  
  40. #****************************************************************************
  41. #*                                                                            *
  42. #*                    Rules to build the encryption library                    *
  43. #*                                                                            *
  44. #****************************************************************************
  45.  
  46. # Main directory
  47.  
  48. $(OUTPATH)crypt$(OBJ):        crypt.h crypt.c
  49.                             $(CC) -o %(left) crypt.c
  50.  
  51. $(OUTPATH)lib_3des$(OBJ):    crypt.h libdes/des.h lib_3des.c
  52.                             $(CC) -o %(left) lib_3des.c
  53.  
  54. $(OUTPATH)lib_des$(OBJ):    crypt.h testdes.h libdes/des.h lib_des.c
  55.                             $(CC) -o %(left) lib_des.c
  56.  
  57. $(OUTPATH)lib_idea$(OBJ):    crypt.h idea/idea.h testidea.h lib_idea.c
  58.                             $(CC) -o %(left) lib_idea.c
  59.  
  60. $(OUTPATH)lib_mdc$(OBJ):    crypt.h mdc/shs.h lib_mdc.c
  61.                             $(CC) -o %(left) lib_mdc.c
  62.  
  63. $(OUTPATH)lib_null$(OBJ):    crypt.h lib_null.c
  64.                             $(CC) -o %(left) lib_null.c
  65.  
  66. $(OUTPATH)lib_rc4$(OBJ):    crypt.h testrc4.h rc4/rc4.h lib_rc4.c
  67.                             $(CC) -o %(left) lib_rc4.c
  68.  
  69. $(OUTPATH)test$(OBJ):        crypt.h test.c
  70.                             $(CC) -o %(left) test.c
  71.  
  72. # idea subdirectory
  73.  
  74. $(OUTPATH)idea$(OBJ):        idea/idea.h idea/idea.c
  75.                             $(CC) -o %(left) idea/idea.c
  76.  
  77. # libdes subdirectory
  78.  
  79. $(OUTPATH)3ecb_enc$(OBJ):    libdes/des.h libdes/des_locl.h libdes/3ecb_enc.c
  80.                             $(CC) -o %(left) libdes/3ecb_enc.c
  81.  
  82. $(OUTPATH)ecb_enc$(OBJ):    libdes/des.h libdes/des_locl.h libdes/spr.h libdes/version.h libdes/ecb_enc.c
  83.                             $(CC) -o %(left) libdes/ecb_enc.c
  84.  
  85. $(OUTPATH)pcbc_enc$(OBJ):    libdes/des.h libdes/des_locl.h libdes/pcbc_enc.c
  86.                             $(CC) -o %(left) libdes/pcbc_enc.c
  87.  
  88. $(OUTPATH)set_key$(OBJ):    libdes/des.h libdes/des_locl.h libdes/podd.h libdes/sk.h libdes/set_key.c
  89.                             $(CC) -o %(left) libdes/set_key.c
  90.  
  91. # rc4 subdirectory
  92.  
  93. $(OUTPATH)rc4$(OBJ):        rc4/rc4.h rc4/rc4.c
  94.                             $(CC) -o %(left) rc4/rc4.c
  95.  
  96. # mdc subdirectory
  97.  
  98. $(OUTPATH)shs$(OBJ):        mdc/shs.h mdc/shs.c
  99.                             $(CC) -o %(left) mdc/shs.c
  100.  
  101. # Create the library.  The test program is also listed as a dependancy
  102. # since we need to use OS-specific compiler options for it which a
  103. # simple 'make test' won't give us (yuck).
  104.  
  105. $(LIBNAME):                    $(OBJS) $(OUTPATH)test$(OBJ)
  106.                             join as $(LIBNAME) $(OBJS)
  107.  
  108. # Link everything into a test program
  109.  
  110. test:    $(LIBNAME) $(OUTPATH)test$(OBJ)
  111.         $(LD) -o testcrypt $(OUTPATH)test$(OBJ) -l$(PROJ)
  112.  
  113. #****************************************************************************
  114. #*                                                                            *
  115. #*                        Cleanup after make has finished                        *
  116. #*                                                                            *
  117. #****************************************************************************
  118.  
  119. clean:
  120.         delete force #?.o testcrypt $(LIBNAME)
  121.