home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / jove-4.16-src.tgz / tar.out / bsd / jove / Makefile.zor < prev    next >
Makefile  |  1996-09-28  |  5KB  |  146 lines

  1. ########################################################################
  2. # This program is Copyright (C) 1986-1996 by Jonathan Payne.  JOVE is  #
  3. # provided to you without charge, and with no warranty.  You may give  #
  4. # away copies of JOVE, including sources, provided that this notice is #
  5. # included in all the files.                                           #
  6. ########################################################################
  7.  
  8. # Makefile for Zortech C 3.0
  9. #
  10. # - supported targets:
  11. #   + jjove.exe (build JOVE, but don't install it)
  12. #   + jovedosx.zoo (build executable JOVE kit)
  13. #   + jovedosx.zip (build executable JOVE kit)
  14. #   + clean
  15. #
  16. # - to install, do the following:
  17. #   + copy jjove.exe where you wish
  18. #   + copy doc/cmds.doc to <SHAREDIR>/cmds.doc
  19. #   + optional: copy some jove rc (none supplied) file to <SHAREDIR>/jove.rc
  20.  
  21. # ===================================================================
  22. # Jove configuration: default JOVE paths.
  23. # Note that all these can be set from environment variables as well;
  24. # see README.DOS for details.
  25. #
  26. # TMPDIR is where the tmp files get stored, usually /tmp or /usr/tmp.
  27. # RECDIR is the directory in which RECOVER looks for JOVE's tempfiles.
  28. # LIBDIR is for the PORTSRV and RECOVER programs.
  29. # SHAREDIR is for online documentation, and the system-wide jove.rc file.
  30. ## BINDIR is where to put the executables JOVE and TEACHJOVE.
  31. # DFLTSHELL is the default shell invoked by JOVE and TEACHJOVE.
  32.  
  33. TMPDIR = c:/tmp
  34. RECDIR = c:/tmp
  35. LIBDIR = c:/jove
  36. SHAREDIR = $(LIBDIR)
  37. # BINDIR = c:/jove
  38. DFLTSHELL = command
  39.  
  40. # Compiler:
  41.  
  42. CC = ztc
  43.  
  44. # Zortech Compiler Flags:
  45. # -e    show effects of the preprocessor in error messages and list file (-l)
  46. # -m    memory model (M for medium, L for large), also i for integer-only
  47. #
  48. # Same as UNIX:
  49. # -c    compile, don't link
  50. # -D    define macro
  51. # -g    debugger info
  52. # -o    optimize (not O!!)
  53. # -ofilename    object output
  54. #
  55. # NOTE: quotes around the macro body in a -D are actually taken as part
  56. # of that body!!
  57.  
  58. # CFLAGS =    -g -e -mLi -DZTCDOS
  59. # CFLAGS =    -g -e -mMi -DZTCDOS
  60. CFLAGS =    -o -e -mMi -DZTCDOS
  61.  
  62. # Linker:
  63.  
  64. LD = $(CC)
  65.  
  66. LDFLAGS = $(CFLAGS)
  67.  
  68. # ===================================================================
  69. # Zortech's make has no default rules!
  70. # Rules must only refer to defined macros.
  71.  
  72. .c.obj:
  73.     $(CC) $(CFLAGS) -c $<
  74.  
  75. .obj.exe:
  76.     $(LD) $(LDFLAGS) $<
  77.  
  78.  
  79. OBJECTS = keys.obj commands.obj abbrev.obj ask.obj buf.obj c.obj \
  80.     case.obj jctype.obj delete.obj extend.obj argcount.obj insert.obj \
  81.     io.obj jove.obj macros.obj marks.obj misc.obj mouse.obj move.obj \
  82.     paragrap.obj proc.obj re.obj reapp.obj scandir.obj list.obj \
  83.     keymaps.obj util.obj vars.obj wind.obj fmt.obj disp.obj term.obj \
  84.     fp.obj screen.obj msgetch.obj ibmpcdos.obj
  85.  
  86. HEADERS = abbrev.h argcount.h ask.h buf.h c.h case.h chars.h commands.h \
  87.     jctype.h dataobj.h delete.h disp.h extend.h externs.h \
  88.     fmt.h fp.h insert.h io.h iproc.h jove.h \
  89.     keymaps.h list.h loadavg.h mac.h macros.h marks.h \
  90.     misc.h mouse.h move.h paragraph.h proc.h \
  91.     re.h reapp.h rec.h scandir.h screen.h \
  92.     sysdep.h sysprocs.h temp.h term.h ttystate.h \
  93.     tune.h util.h vars.h version.h wind.h
  94.  
  95. # This is what we really want to use, but Zortech's make doesn't work
  96. # when a target appears in more than one rule.  So, as it stands,
  97. # changing a header will *not* force recompilation :-(
  98. #
  99. # $(OBJECTS):    $(HEADERS)
  100. #
  101. # For this reason, we can only force the building of paths.h
  102. # by adding it to the dependencies for explicit targets.
  103. # In the hope that it is built soon enough, we put it at the front.
  104.  
  105. jjove.exe:    paths.h $(OBJECTS)
  106.     $(LD) $(LDFLAGS) -o$* $(OBJECTS)
  107.  
  108. jovedosx.zoo:    paths.h jjove.exe
  109.     -del jovedosx.zoo
  110.     -del jove.exe
  111.     rename jjove.exe jove.exe
  112.     zoo -add jovedosx.zoo jove.exe doc\cmds.doc doc\jove.man doc\jove.doc paths.h README.dos
  113.  
  114. jovedosx.zip:    paths.h jjove.exe
  115.     -del jovedosx.zip
  116.     -del jove.exe
  117.     rename jjove.exe jove.exe
  118.     pkzip -aP jovedosx.zip jove.exe doc\cmds.doc doc\jove.man doc\jove.doc paths.h README.dos
  119.  
  120. # Note that quotes are not stripped by the shell that will
  121. # execute the recipe for paths.h
  122.  
  123. paths.h:    Makefile.zor
  124.     echo /* Changes should be made in Makefile, not to this file! */ > paths.h
  125.     echo \#define TMPDIR "$(TMPDIR)" >> paths.h
  126.     echo \#define RECDIR "$(RECDIR)" >> paths.h
  127.     echo \#define LIBDIR "$(LIBDIR)" >> paths.h
  128.     echo \#define SHAREDIR "$(SHAREDIR)" >> paths.h
  129.     echo \#define DFLTSHELL "$(DFLTSHELL)" >> paths.h
  130.  
  131. setmaps.exe:    commands.tab keys.txt setmaps.c
  132.     $(CC) $(CFLAGS) setmaps.c -osetmaps.exe
  133.  
  134. # Zortech's make can't handle redirection in commands.
  135. # A prefix of + forces the use of the more powerful (!) command.com.
  136. keys.c:    setmaps.exe keys.txt
  137.     + setmaps < keys.txt > keys.c
  138.  
  139. clean:
  140.     -del *.obj
  141.     -del *.exe
  142.     -del *.bak
  143.     -del *.map
  144.     -del keys.c
  145.     -del paths.h
  146.