home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / hpack79o.zip / makefile.os2 < prev    next >
Makefile  |  1994-01-07  |  11KB  |  286 lines

  1. #****************************************************************************
  2. #*                                                                            *
  3. #*            Makefile for the OS/2 version of the HPACK archiver                *
  4. #*                                                                            *
  5. #****************************************************************************
  6.  
  7. # 32bit: Use gcc
  8. #        gcc 2.2.2 - Max Nilson, Max_Nilson@kcbbs.gen.nz
  9. #        emx - John Burnell, johnb@maths.grace.cri.nz
  10. # microsoft: Microsoft C (not fully tested)
  11. #        Microsoft C 7.0 - Chris Sullivan
  12. # topspeed: TopSpeed C (NB should use the TopSpeed better-make, not this makefile)
  13. #        TopSpeed C - John Burnell, johnb@maths.grace.cri.nz
  14. # watcom: Watcom C (not fully tested)
  15. # zortech: Zortech C
  16. #        Zortech C - Chris Sullivan
  17.  
  18. PROJ    = hpack.exe
  19.  
  20. CFLAGS    = -c -D__OS2__ -O $(DEBUG) -I. $(CMDC)    # Flags for compiler
  21.  
  22. LFLAGS    = -o $(PROJ) $(DEBUG) $(CMDL)            # Flags for linker
  23.  
  24. OUTPATH    =             # Where object files go (/tmp is a good place)
  25. OBJ    = .obj            # Extension for object files
  26. EXE    = .exe            # Extension for executables
  27.  
  28. LD    = $(CC)            # Linker (just use the C compiler)
  29. LS    = dir            # Directory command
  30. ECHO    = echo            # Echo to screen command
  31.  
  32. # Defines for RSAREF use (needed for RSA encryption in the US).  Uncomment
  33. # these to build the RSAREF version of HPACK.
  34.  
  35. #RSAREF        = -DRSAREF
  36. #RSAREF_OBJ    = $(OUTPATH)digit$(OBJ) $(OUTPATH)digit$(OBJ) \
  37. #              $(OUTPATH)nn$(OBJ)
  38.  
  39. #****************************************************************************
  40. #*                                                                            *
  41. #*            If no args are given, print a usage message and exit            *
  42. #*                                                                            *
  43. #****************************************************************************
  44.  
  45. default:
  46.         @$(ECHO) off
  47.         @$(ECHO) .
  48.         @$(ECHO) You have to enter the OS/2 compiler you want to build HPACK with.
  49.         @$(ECHO) Possible options are: 32bit, microsoft, topspeed, watcom, and zortech.
  50.         @$(ECHO) If you want to use another compiler, edit the makefile to accomodate it
  51.         @$(ECHO) and send a copy of any changes necessary to the author.
  52.  
  53. love:
  54.         @$(ECHO) off
  55.         @$(ECHO) Nicht wahr?
  56.  
  57. #****************************************************************************
  58. #*                                                                            *
  59. #*                                Rules to build HPACK                        *
  60. #*                                                                            *
  61. #****************************************************************************
  62.  
  63. $(OUTPATH)arcdir$(OBJ):        arcdir.h defs.h error.h filehdr.h flags.h \
  64.     hpacklib.h sql.h system.h tags.h asn1/asn1.h io/fastio.h arcdir.c
  65.     $(CC) $(CFLAGS) arcdir.c
  66.  
  67. $(OUTPATH)arcdirio$(OBJ):    arcdir.h filehdr.h choice.h defs.h error.h \
  68.     hpacklib.h flags.h system.h asn1/asn1.h crc/crc16.h crypt/crypt.h \
  69.     io/fastio.h io/hpackio.h store/store.h arcdirio.c
  70.     $(CC) $(CFLAGS) -DARCHIVE_TYPE=3 arcdirio.c
  71.  
  72. $(OUTPATH)archive$(OBJ):    arcdir.h filehdr.h choice.h defs.h error.h \
  73.     filesys.h flags.h frontend.h hpacklib.h system.h tags.h asn1/asn1.h \
  74.     crypt/crypt.h io/fastio.h io/hpackio.h store/store.h archive.c
  75.     $(CC) $(CFLAGS) archive.c
  76.  
  77. $(OUTPATH)cli$(OBJ):        arcdir.h choice.h defs.h error.h filehdr.h \
  78.     filesys.h flags.h frontend.h hpacklib.h script.h sql.h system.h \
  79.     wildcard.h asn1/asn1.h crypt/crypt.h io/fastio.h language/language.h cli.c
  80.     $(CC) $(CFLAGS) cli.c
  81.  
  82. $(OUTPATH)error$(OBJ):        arcdir.h defs.h filehdr.h error.h flags.h \
  83.     frontend.h hpacklib.h system.h asn1/asn1.h crypt/crypt.h io/fastio.h \
  84.     io/hpackio.h store/store.h error.c
  85.     $(CC) $(CFLAGS) error.c
  86.  
  87. $(OUTPATH)filesys$(OBJ):    arcdir.h defs.h error.h filehdr.h filesys.h \
  88.     flags.h frontend.h hpacklib.h system.h tags.h \
  89.     io/fastio.h io/hpackio.h filesys.c
  90.     $(CC) $(CFLAGS) filesys.c
  91.  
  92. $(OUTPATH)frontend$(OBJ):    arcdir.h filehdr.h choice.h defs.h error.h \
  93.     filesys.h flags.h frontend.h hpacklib.h system.h tags.h wildcard.h \
  94.     asn1/asn1.h crypt/crypt.h io/fastio.h io/hpackio.h store/store.h frontend.c
  95.     $(CC) $(CFLAGS) frontend.c
  96.  
  97. $(OUTPATH)script$(OBJ):        arcdir.h choice.h defs.h error.h filehdr.h \
  98.     filesys.h flags.h frontend.h hpacklib.h script.h sql.h system.h \
  99.     wildcard.h asn1/asn1.h io/fastio.h io/hpackio.h language/language.h script.c
  100.     $(CC) $(CFLAGS) script.c
  101.  
  102. $(OUTPATH)sql$(OBJ):        arcdir.h choice.h defs.h filehdr.h flags.h \
  103.     frontend.h hpacklib.h script.h sql.h system.h \
  104.     asn1/asn1.h io/hpackio.h language/language.h sql.c
  105.     $(CC) $(CFLAGS) sql.c
  106.  
  107. $(OUTPATH)tags$(OBJ):        defs.h error.h hpacklib.h system.h tags.h \
  108.     io/fastio.h tags.c
  109.     $(CC) $(CFLAGS) tags.c
  110.  
  111. $(OUTPATH)os2$(OBJ):        defs.h arcdir.h filehdr.h frontend.h system.h \
  112.     wildcard.h hpacklib.h asn1/asn1.h crc/crc16.h io/fastio.h system/os2.c
  113.     $(CC) $(CFLAGS) system/os2.c
  114.  
  115. $(OUTPATH)viewfile$(OBJ):    arcdir.h choice.h defs.h error.h filehdr.h \
  116.     flags.h frontend.h hpacklib.h sql.h system.h \
  117.     tags.h wildcard.h asn1/asn1.h io/fastio.h \
  118.     io/hpackio.h language/language.h viewfile.c
  119.     $(CC) $(CFLAGS) viewfile.c
  120.  
  121. $(OUTPATH)wildcard$(OBJ):    defs.h system.h wildcard.h wildcard.c
  122.     $(CC) $(CFLAGS) wildcard.c
  123.  
  124. $(OUTPATH)asn1$(OBJ):        defs.h error.h hpacklib.h asn1/asn1.h \
  125.     asn1/ber.h io/fastio.h asn1/asn1.c
  126.     $(CC) $(CFLAGS) asn1/asn1.c
  127.  
  128. $(OUTPATH)memmgr$(OBJ):        defs.h hpacklib.h system.h asn1/memmgr.h \
  129.     asn1/memmgr.c
  130.     $(CC) $(CFLAGS) asn1/memmgr.c
  131.  
  132. $(OUTPATH)pemcode$(OBJ):    defs.h error.h frontend.h hpacklib.h script.h \
  133.     io/fastio.h asn1/pemcode.c
  134.     $(CC) $(CFLAGS) asn1/pemcode.c
  135.  
  136. $(OUTPATH)pemparse$(OBJ):    defs.h script.h asn1/pemcode.h asn1/pemparse.c
  137.     $(CC) $(CFLAGS) asn1/pemparse.c
  138.  
  139. $(OUTPATH)crc16$(OBJ):        defs.h crc/crc16.c
  140.     $(CC) $(CFLAGS) crc/crc16.c
  141.  
  142. $(OUTPATH)crypt$(OBJ):        choice.h defs.h error.h filesys.h flags.h \
  143.     frontend.h hpacklib.h system.h crc/crc16.h \
  144.     crypt/crypt.h crypt/keymgmt.h crypt/md5.h \
  145.     crypt/mdc.h crypt/packet.h crypt/rsa.h \
  146.     crypt/shs.h io/fastio.h io/hpackio.h \
  147.     language/language.h crypt/crypt.c
  148.     $(CC) $(CFLAGS) $(RSAREF) crypt/crypt.c
  149.  
  150. $(OUTPATH)keymgmt$(OBJ):    defs.h error.h frontend.h hpacklib.h system.h \
  151.     crc/crc16.h crypt/crypt.h crypt/md5.h \
  152.     crypt/mdc.h crypt/keymgmt.h crypt/shs.h \
  153.     io/fastio.h io/hpackio.h language/language.h crypt/keymgmt.c
  154.     $(CC) $(CFLAGS) crypt/keymgmt.c
  155.  
  156. $(OUTPATH)md5$(OBJ):        defs.h crypt/md5.h crypt/mdc.h crypt/md5.c
  157.     $(CC) $(CFLAGS) crypt/md5.c
  158.  
  159. $(OUTPATH)mdc$(OBJ):        defs.h error.h hpacklib.h crypt/crypt.h \
  160.     crypt/md5.h crypt/mdc.h crypt/shs.h crypt/mdc.c
  161.     $(CC) $(CFLAGS) crypt/mdc.c
  162.  
  163. $(OUTPATH)rsa$(OBJ):        defs.h crypt/keymgmt.h crypt/rsa.h crypt/rsadef.h \
  164.     crypt/rsa.c
  165.     $(CC) $(CFLAGS) crypt/rsa.c
  166.  
  167. $(OUTPATH)shs$(OBJ):        defs.h crypt/mdc.h crypt/shs.h crypt/shs.c
  168.     $(CC) $(CFLAGS) crypt/shs.c
  169.  
  170. $(OUTPATH)display$(OBJ):    defs.h frontend.h hpacklib.h io/display.c
  171.     $(CC) $(CFLAGS) io/display.c
  172.  
  173. $(OUTPATH)fastio$(OBJ):        arcdir.h defs.h error.h flags.h filehdr.h \
  174.     frontend.h hpacklib.h system.h asn1/asn1.h \
  175.     crc/crc16.h crypt/crypt.h data/ebcdic.h \
  176.     io/fastio.h io/hpackio.h io/fastio.c
  177.     $(CC) $(CFLAGS) io/fastio.c
  178.  
  179. $(OUTPATH)stream$(OBJ):        defs.h hpacklib.h crc/crc16.h crypt/crypt.h \
  180.     io/stream.h io/stream.c
  181.     $(CC) $(CFLAGS) io/stream.c
  182.  
  183. $(OUTPATH)language$(OBJ):    defs.h error.h filehdr.h frontend.h hpacklib.h \
  184.     system.h asn1/asn1.h crypt/crypt.h io/fastio.h \
  185.     io/hpackio.h io/stream.h language/language.h \
  186.     language/language.c
  187.     $(CC) $(CFLAGS) language/language.c
  188.  
  189. $(OUTPATH)lza$(OBJ):        defs.h choice.h error.h flags.h hpacklib.h system.h \
  190.     crc/crc16.h crypt/crypt.h io/fastio.h \
  191.     io/hpackio.h lza/model.h lza/model2.h lza/model3.h \
  192.     lza/model4.h lza/lza.c
  193.     $(CC) $(CFLAGS) lza/lza.c
  194.  
  195. $(OUTPATH)model$(OBJ):        defs.h error.h flags.h hpacklib.h io/hpackio.h \
  196.     lza/model.h lza/model.c
  197.     $(CC) $(CFLAGS) lza/model.c
  198.  
  199. $(OUTPATH)model2$(OBJ):        defs.h lza/model2.h lza/model2.c
  200.     $(CC) $(CFLAGS) lza/model2.c
  201.  
  202. $(OUTPATH)model3$(OBJ):        defs.h lza/model3.h lza/model3.c
  203.     $(CC) $(CFLAGS) lza/model3.c
  204.  
  205. $(OUTPATH)model4$(OBJ):        defs.h lza/model4.h lza/model4.c
  206.     $(CC) $(CFLAGS) lza/model4.c
  207.  
  208. $(OUTPATH)pack$(OBJ):        defs.h io/hpackio.h io/fastio.h lza/pack.c
  209.     $(CC) $(CFLAGS) lza/pack.c
  210.  
  211. $(OUTPATH)unpack$(OBJ):        defs.h crc/crc16.h io/hpackio.h io/fastio.h \
  212.     lza/model.h lza/unpack.c
  213.     $(CC) $(CFLAGS) lza/unpack.c
  214.  
  215. $(OUTPATH)digit$(OBJ):        rsaref/digit.h rsaref/global.h rsaref/nn.h \
  216.     rsaref/rsaref.h rsaref/digit.c
  217.     $(CC) $(CFLAGS) -DPROTOTYPES=1 -Irsaref rsaref/digit.c
  218.  
  219. $(OUTPATH)nn$(OBJ):        rsaref/digit.h rsaref/global.h rsaref/nn.h \
  220.     rsaref/rsaref.h rsaref/nn.c
  221.     $(CC) $(CFLAGS) -DPROTOTYPES=1 -Irsaref rsaref/nn.c
  222.  
  223. #$(OUTPATH)rsa$(OBJ):        rsaref/global.h rsaref/nn.h rsaref/rsaref.h \
  224. #    rsaref/r_random.h rsaref/rsa.c
  225. #    $(CC) $(CFLAGS) -DPROTOTYPES=1 -Irsaref rsaref/rsa.c
  226.  
  227. $(OUTPATH)store$(OBJ):        defs.h error.h hpacklib.h system.h crc/crc16.h \
  228.     crypt/crypt.h io/fastio.h io/hpackio.h \
  229.     store/store.h store/store.c
  230.     $(CC) $(CFLAGS) store/store.c
  231.  
  232. # Note: The following two rules are for emx - not sure what other compilers
  233. # will use (the standard 32-bit version is compiled with emx).
  234.  
  235. OBJS = $(OUTPATH)arcdir$(OBJ) $(OUTPATH)arcdirio$(OBJ) \
  236.     $(OUTPATH)archive$(OBJ) $(OUTPATH)cli$(OBJ) $(OUTPATH)display$(OBJ) \
  237.     $(OUTPATH)error$(OBJ) $(OUTPATH)fastio$(OBJ) $(OUTPATH)stream$(OBJ) \
  238.     $(OUTPATH)filesys$(OBJ) $(OUTPATH)frontend$(OBJ) \
  239.     $(OUTPATH)language$(OBJ) $(OUTPATH)script$(OBJ) \
  240.     $(OUTPATH)sql$(OBJ) $(OUTPATH)tags$(OBJ) $(OUTPATH)viewfile$(OBJ) \
  241.     $(OUTPATH)wildcard$(OBJ) $(OUTPATH)asn1$(OBJ) $(OUTPATH)memmgr$(OBJ) \
  242.     $(OUTPATH)pemcode$(OBJ) $(OUTPATH)pemparse$(OBJ) \
  243.     $(OUTPATH)crc16$(OBJ) $(OUTPATH)crypt$(OBJ) $(OUTPATH)keymgmt$(OBJ) \
  244.     $(OUTPATH)md5$(OBJ) $(OUTPATH)mdc$(OBJ) $(OUTPATH)rsa$(OBJ) \
  245.     $(OUTPATH)shs$(OBJ) $(OUTPATH)os2$(OBJ) $(OUTPATH)store$(OBJ) \
  246.     $(OUTPATH)lza$(OBJ) $(OUTPATH)model$(OBJ) $(OUTPATH)model2$(OBJ) \
  247.     $(OUTPATH)model3$(OBJ) $(OUTPATH)model4$(OBJ) $(OUTPATH)pack$(OBJ) \
  248.     $(OUTPATH)unpack$(OBJ) $(RSAREF_OBJ)
  249.  
  250. $(PROJ): $(OBJS)
  251.     $(LD) $(OBJS) $(LFLAGS)
  252.  
  253.  
  254. #****************************************************************************
  255. #*                                                                            *
  256. #*                    Defines for each compiler/OS variation                    *
  257. #*                                                                            *
  258. #****************************************************************************
  259.  
  260. # Generic 32-bit version: Use gcc/emx
  261.  
  262. 32bit:
  263.         @$(MAKE) -f system/makefile.os2 hpack.exe CC="gcc -Zomf" \
  264.         CMDC="-DOS2_32 -D__GCC__" CMDL="-s -Zsys -Zstack 512"
  265.  
  266. # Microsoft C: Use cl
  267.  
  268. microsoft:
  269.         @$(MAKE) hpack.exe CC=cl CMDC=-ml
  270.  
  271. # TopSpeed C: Use tsc (NB should use the TopSpeed better-make, not this
  272. #              makefile).
  273.  
  274. topspeed:
  275.         @$(MAKE) hpack.exe CC=tsc
  276.  
  277. # Watcom C: Use wc (Ba-woosh!)
  278.  
  279. watcom:
  280.         @$(MAKE) hpack.exe CC=wc
  281.  
  282. # Zortech C: Use zcc, -Ju to ignore signed/unsigned chars
  283.  
  284. zortech:
  285.         @$(MAKE) hpack.exe CC="ztc" CMDC="-Ju -ml"
  286.