home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / word2x0a.zip / source / Makefile < prev    next >
Makefile  |  1998-08-08  |  3KB  |  140 lines

  1.  
  2. # Makefile for word2x
  3. # This makefile is for OS/2 and emx
  4. # joerg@gmx.de
  5.  
  6. CPPFLAGS=-Wall
  7. LD=ld
  8.  
  9. CCFLAGS=-O3
  10. CFLAGS=-O3
  11. LIBOBJS=wordwrap.o nullproc.o tblock.o scan_num.o map_chars.o col-align.o \
  12.     ukdate.o usdate.o
  13. AR=ar
  14. RANLIB=ranlib
  15. MYLIBS=liboutfmt.a
  16. READER=reader.o
  17. FMTS=fmt-text.o fmt-latex.o fmt-html.o
  18. CPP=gcc
  19. CC=gcc
  20. #Set to gopt.o if you lack getopt_long
  21. GETOPT=gopt.o strcase-os2.o num_unit_probe.o
  22. PROGOBJS=$(READER) word2x.o $(FMTS) $(GETOPT) $(MYLIBS) 
  23. TARGETS=word2x.exe rtest2.exe
  24.  
  25. all:    $(TARGETS)
  26.  
  27. clean:
  28.     rm -f *.o
  29.     rm -f $(MYLIBS)
  30.  
  31. clobber: clean
  32.     rm -f $(TARGETS)
  33.  
  34. word2x.o: word2x.cc
  35.     $(CPP) $(CPPFLAGS) -c -o $@ word2x.cc
  36.  
  37. text-fmt.o: text-fmt.cc
  38.     $(CPP) $(CPPFLAGS) -DOUTPUT_CHARSET_IBM850 -c -o $@ text-fmt.cc
  39.  
  40. text-table.o: text-table.cc
  41.     $(CPP) $(CPPFLAGS) -c -o $@ text-table.cc
  42.  
  43. latex-fmt.o: latex-fmt.cc
  44.     $(CPP) $(CPPFLAGS) -c -o $@ latex-fmt.cc
  45.  
  46. latex-table.o: latex-table.cc
  47.     $(CPP) $(CPPFLAGS) -c -o $@ latex-table.cc
  48.  
  49. latex-embed.o: latex-embed.cc
  50.     $(CPP) $(CPPFLAGS) -c -o $@ latex-embed.cc
  51.  
  52. html-fmt.o: html-fmt.cc
  53.     $(CPP) $(CPPFLAGS) -c -o $@ html-fmt.cc
  54.  
  55. html-table.o: html-table.cc
  56.     $(CPP) $(CPPFLAGS) -c -o $@ html-table.cc
  57.  
  58. html-embed.o: html-embed.cc
  59.     $(CPP) $(CPPFLAGS) -c -o $@ html-embed.cc
  60.  
  61. wordwrap.o: wordwrap.cc
  62.     $(CPP) $(CPPFLAGS) -c -o $@ wordwrap.cc
  63.  
  64. nullproc.o: nullproc.cc
  65.     $(CPP) $(CPPFLAGS) -c -o $@ nullproc.cc
  66.  
  67. tblock.o: tblock.cc
  68.     $(CPP) $(CPPFLAGS) -c -o $@ tblock.cc
  69.  
  70. scan_num.o: scan_num.cc
  71.     $(CPP) $(CPPFLAGS) -c -o $@ scan_num.cc
  72.  
  73. map_chars.o: map_chars.cc
  74.     $(CPP) $(CPPFLAGS) -c -o $@ map_chars.cc
  75.  
  76. col-align.o: col-align.cc
  77.     $(CPP) $(CPPFLAGS) -c -o $@ col-align.cc
  78.  
  79. ukdate.o: ukdate.cc
  80.     $(CPP) $(CPPFLAGS) -c -o $@ ukdate.cc
  81.  
  82. usdate.o: usdate.cc
  83.     $(CPP) $(CPPFLAGS) -c -o $@ usdate.cc
  84.  
  85.  
  86. liboutfmt.a: $(LIBOBJS)
  87.     $(AR) rc $@ $(LIBOBJS)
  88.     $(AR) s $@
  89.  
  90. rtest2.exe:    rtest2.o reader.o tblock.o
  91.     gcc -o rtest2.exe rtest2.o reader.o tblock.o -lstdcpp
  92.  
  93. fmt-text.o: text-fmt.o text-table.o
  94.     $(LD) -r -o $@ text-fmt.o text-table.o
  95.  
  96. fmt-latex.o: latex-fmt.o latex-table.o latex-embed.o
  97.     $(LD) -r -o $@ latex-fmt.o latex-table.o latex-embed.o
  98.  
  99. fmt-html.o: html-fmt.o html-table.o html-embed.o
  100.     $(LD) -r -o $@ html-fmt.o html-table.o html-embed.o
  101.  
  102. getopt.o: getopt.c
  103.     $(CC) $(CFLAGS) -D_LIBC=1 -DHAVE_CONFIG_H -c -o $@ getopt.c
  104.  
  105. getopt1.o: getopt1.c
  106.     $(CC) $(CFLAGS) -D_LIBC=1 -DHAVE_CONFIG_H -c -o $@ getopt1.c
  107.  
  108. strcase-os2.o: strcase-os2.c
  109.     $(CC) $(CFLAGS) -D_LIBC=1 -c -o $@ strcase-os2.c
  110.  
  111. num_unit_probe.o: num_unit_probe.c
  112.     $(CC) $(CFLAGS) -D_LIBC=1 -c -o $@ num_unit_probe.c
  113.  
  114. part_num_probe.o: part_num_probe.c
  115.     $(CC) $(CFLAGS) -D_LIBC=1 -c -o $@ part_num_probe.c
  116.  
  117. gopt.o: getopt.o getopt1.o
  118.     $(LD) -r -o gopt.o getopt.o getopt1.o
  119.  
  120.  
  121. word2x.exe: $(PROGOBJS)
  122.     $(CPP) -o $@ $(PROGOBJS) -lstdcpp
  123.  
  124. rtest2.o: rtest2.cc
  125.     $(CPP) $(CPPFLAGS) -c -o $@ rtest2.cc
  126.  
  127. reader.o: reader.cc
  128.     $(CPP) $(CPPFLAGS) -c -o $@ reader.cc
  129.  
  130.  
  131. md5:
  132.     rm -f checksums.*
  133.     md5sum -b * >checksums.tmp
  134.     grep -v checksums.tmp checksums.tmp > checksums.md5
  135.     rm -f checksums.tmp
  136.     pgp -sab checksums.md5
  137.  
  138. checkmd5:
  139.     md5sum -b --check checksums.md5
  140.