home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / yacl-012.zip / makefile.bc < prev    next >
Makefile  |  1995-04-09  |  4KB  |  159 lines

  1.  
  2.  
  3. !if !$d(YACLPATH)
  4. !error Please define the environment variable YACLPATH.
  5. !endif
  6.  
  7.  
  8. # If you have a RAM drive of 1 meg or so, define the environment variable
  9. # RAMDRIVE to point to that drive (e.g., set RAMDRIVE=h:). Then, if you type
  10. #             make -fmakefile.bc
  11. # it will first copy all the header files to the ram drive, make clean and
  12. # do the whole make. Reading header files from the ram drive speeds up
  13. # compilation significantly.
  14.  
  15.  
  16. !include $(YACLPATH)\control\bcmak.ctl
  17.  
  18.  
  19. !if $d(RAMDRIVE)
  20. # COPY_TO_RAM   = copyToRam
  21. !endif
  22.  
  23.  
  24. FLAGS = -DYACLPLATFORM=$(YACLPLATFORM)
  25. !if $d(DEBUG)
  26. FLAGS = $(FLAGS) -DDEBUG
  27. !endif
  28.  
  29. !if $d(BUILD_DLL)
  30. FLAGS = $(FLAGS) -DBUILD_DLL
  31. !endif
  32.  
  33. yacl: $(COPY_TO_RAM) libdir base io ui
  34.  
  35. libdir:
  36.     -md $(YACLPATH)\lib
  37.     -md $(YACLPATH)\lib\$(YACLPLATFORM)
  38.  
  39. base:
  40.     cd base
  41.     -$(MAKE) -fmakefile.bc $(FLAGS)
  42.     -cd ..
  43.  
  44. io:
  45.         cd io
  46.     -$(MAKE) -fmakefile.bc $(FLAGS)
  47.         -cd ..
  48.  
  49.  
  50. ui:
  51. !if $(YACLPLATFORM) == windows || $(YACLPLATFORM) == os2
  52.     cd ui
  53.     -$(MAKE) -fmakefile.bc $(FLAGS)
  54.         -cd ..
  55. !else
  56.     @echo  UI not made: not supported for $(YACLPLATFORM)
  57. !endif
  58.  
  59.  
  60.  
  61. # -------------------- Targets below are for my use only ---------------
  62.  
  63.     
  64. uidemos:
  65.     cd uidemo
  66.     make -fmakefile.bc
  67.     cd ..
  68.  
  69.  
  70.  
  71. everything: yacl uidemos
  72.  
  73.  
  74.  
  75.  
  76.  
  77. copyToRam:
  78.     -md $(RAMDRIVE)\base
  79.     copy base\*.h $(RAMDRIVE)\base
  80.     -md $(RAMDRIVE)\io
  81.     copy io\*.h $(RAMDRIVE)\io
  82.     -md $(RAMDRIVE)\ui
  83.     copy ui\*.h $(RAMDRIVE)\ui
  84.  
  85.  
  86.  
  87.     
  88. dist:
  89.     -rm -f yacl.zip
  90.     -copy $(BCPATH)\include\ctl3d.h lib\windows
  91.     ls control/* base/*.h base/*.cxx base/makefile.* io/*.h io/*.cxx \
  92.     io/makefile.* ui/*.h ui/*.cxx ui/makefile.* > $(TMP)\makxxx.tmp
  93.     find basedemo uidemo -type f -print > $(TMP)\makyyy.tmp
  94.     find lib -name ctl3d* -print >> $(TMP)\makyyy.tmp
  95.     egrep -v "\.(cfg|ini|tdw|log|lib|zip|bak|obj|exe|map|res|rws|o)$" $(TMP)\makyyy.tmp >>  $(TMP)\makxxx.tmp
  96.     find tools -print >> $(TMP)\makxxx.tmp
  97.     echo shipping.lst >> $(TMP)\makxxx.tmp
  98.     ls *.txt makefile.* >> $(TMP)\makxxx.tmp
  99.     egrep -v "misc|zzsave" < $(TMP)\makxxx.tmp > $(TMP)\makyyy.tmp
  100.     sort $(TMP)\makyyy.tmp > $(TMP)\makxxx.tmp
  101.     $(ZIP) yacl.zip -@ < $(TMP)\makxxx.tmp
  102.     
  103.     
  104.   
  105. zip:
  106.     rm -f yacl_all.zip
  107.     find . -print > $(TMP)\makxxxx.tmp
  108.     egrep -v "\.(cfg|lib|a|zip|map|bak|obj|exe|res|rws|~h|~rc|log|dvi|aux|cmt|tbl|o|dll)$" < $(TMP)\makxxxx.tmp > $(TMP)\makyyy.tmp
  109.     echo ./lib/windows/ctl3d.dll  >> $(TMP)\makyyy.tmp
  110.     sort < $(TMP)\makyyy.tmp >  $(TMP)\makxxxx.tmp
  111.     $(ZIP) yacl_all.zip -@ < $(TMP)\makxxxx.tmp
  112.     rm -f $(TMP)/makxxxx.tmp $(TMP)/makyyy.tmp
  113.  
  114.  
  115.  
  116. srczip:
  117.     -rm -f yaclsrc.zip
  118.     -copy $(BCPATH)\include\ctl3d.h lib\windows
  119.     ls base/*.h base/*.cxx base/makefile.* io/*.h io/*.cxx io/makefile.* \
  120.     ui/*.h ui/*.cxx ui/makefile.* > $(TMP)\makxxx.tmp
  121.     find basedemo uidemo uidevlop -type f -print > $(TMP)\makyyy.tmp
  122.     egrep "makefile|cxx$|h$|rc$|def$|txt$" $(TMP)\makyyy.tmp >>  $(TMP)\makxxx.tmp
  123.     find tools -print >> $(TMP)\makxxx.tmp
  124.     echo "shipping.lst" >> $(TMP)\makxxx.tmp
  125.     echo "lib/windows/ctl3d.dll"  >> $(TMP)\makxxx.tmp
  126.     echo "lib/windows/ctl3d.h"  >> $(TMP)\makxxx.tmp
  127.     echo "changlog"  >> $(TMP)\makxxx.tmp
  128.     ls *.txt *.ctl makefile.* >> $(TMP)\makxxx.tmp
  129.     egrep -v "misc|zzsave" < $(TMP)\makxxx.tmp > $(TMP)\makyyy.tmp
  130.     sort $(TMP)\makyyy.tmp > $(TMP)\makxxx.tmp
  131.     $(ZIP) yaclsrc.zip -@ < $(TMP)\makxxx.tmp
  132.     
  133.     
  134.  
  135.  
  136.    
  137.  
  138. clean:
  139.     cd base
  140.     -make -fmakefile.bc clean
  141.     cd ..\io
  142.     -make -fmakefile.bc clean
  143.     cd ..\ui
  144.     -make -fmakefile.bc clean
  145.     cd ..
  146.     cd basedemo
  147.     -rm -f */*.obj */*.exe */*.map
  148.     cd ..\uidemo
  149.     -rm -f */*.obj */*.exe */*.map
  150.     cd ..
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.