home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / rcs / sources / nmake.mk < prev    next >
Makefile  |  1992-03-06  |  7KB  |  258 lines

  1. # $Id: Makefile,v 5.19 1992/01/24 18:44:19 eggert Exp $
  2. # Copyright (C) 1982, 1988, 1989 Walter Tichy
  3. # Copyright 1990, 1991 by Paul Eggert
  4. #   Distributed under license by the Free Software Foundation, Inc.
  5. #
  6. # This file is part of RCS.
  7. #
  8. # RCS is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 2, or (at your option)
  11. # any later version.
  12. #
  13. # RCS is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with RCS; see the file COPYING.  If not, write to
  20. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21. #
  22. # Report problems and direct all questions to:
  23. #
  24. #    rcs-bugs@cs.purdue.edu
  25. #
  26.  
  27. # default target
  28. default : all
  29.  
  30. # See README for more information on the configuration section.
  31. # ----- start of configuration section -----
  32. # nmake makefile definitions for MS-DOS and OS/2 (Microsoft C or Quick C)
  33.  
  34. #    $Id: nmake.mkh,v 1.7 1992/03/01 23:26:14 eggert Exp $
  35.  
  36. CC = cl -nologo
  37. BIND = bind -nologo
  38. BINDN = -n DOSLOADMODULE DOSGETPROCADDR DOSFREEMODULE
  39.  
  40. !IF "$(OS)" == "os2"
  41. CC_286 = -G2
  42. CC_D = -D__OS2__=1 -Dbad_creat0=0 -Dbad_chmod_close=0
  43. LDLIBS = ms\rcs.def -Lp -link $(LDFLAGS)
  44. LINK = cl -nologo
  45. !ELSE
  46. CC_286 =
  47. CC_D = -D__MSDOS__=1 -Dbad_creat0=1 -Dbad_chmod_close=1
  48. LDLIBS = nul
  49. LINK = link /nologo $(LDFLAGS) $(OTHER_OBJECT)
  50. !ENDIF
  51.  
  52. !IF "$(DEBUG)" == "Y"
  53. CC_DEBUG = -Zi -Od
  54. LD_DEBUG = /CO
  55. !ELSE
  56. CC_DEBUG = -Gs -Ocegit
  57. LD_DEBUG =
  58. !ENDIF
  59.  
  60. !IF "$(EM)" == "Y"
  61. CC_EM = -EM
  62. !ENDIF
  63.  
  64. !IF "$(QUICK)" == "Y"
  65. CC_GMQC = -qc
  66. !ELSE
  67. CC_GMQC = -Gm
  68. !ENDIF
  69.  
  70. CC_MODEL = S
  71.  
  72. CFLAGS = -A$(CC_MODEL) $(CC_286) -Ims -D__MSC__=1 $(CC_D) $(CC_DEBUG) $(CC_EM) $(CC_GMQC) -Zp
  73.  
  74. INSTALL = copy
  75.  
  76. LDFLAGS = $(LD_DEBUG)/ST:16384 /NOE
  77.  
  78. # You may have to change the following line; there's no standard.
  79. LIB = d:\ms\lib\$(s)
  80.  
  81. LOGIN_FLAGS =
  82.  
  83. OTHER_OBJECT = login$(OS).obj spawnvpq.obj $(LIB)setargv.obj
  84.  
  85. RCSDIR = ..\bin
  86.  
  87. REMOVE = -del
  88.  
  89. # makefile definitions for MS-DOS and OS/2
  90.  
  91. #    $Id: ms.mkh,v 1.6 1992/03/01 23:26:13 eggert Exp $
  92.  
  93. # empty string to avoid makefile misparsing of \ at line end with buggy makes
  94. s =
  95.  
  96. TESTPREFIX = ms\$(s)
  97.  
  98. o = .obj
  99. x = .exe
  100.  
  101. conf.h : ms\conf.h
  102.     copy ms\conf.h .
  103.     echo /* */ >> $@
  104.  
  105. login$(OS)$(o) : ms\login$(OS).c
  106.     $(CC) $(CFLAGS) $(LOGIN_FLAGS) -c ms\login$(OS).c
  107.  
  108. dirent$(o) : ms\dirent.c
  109.     $(CC) $(CFLAGS) -c ms\dirent.c
  110.  
  111. spawnvpq$(o) : ms\spawnvpq.c
  112.     $(CC) $(CFLAGS) -c ms\spawnvpq.c
  113.  
  114. utime$(o) : ms\utime.c
  115.     $(CC) $(CFLAGS) $(LOGIN_FLAGS) -c ms\utime.c
  116.  
  117. # On non-Unix hosts you must manually create and edit conf.h from conf.heg.
  118.  
  119. # ----- end of configuration section -----
  120. # You shouldn't have to change anything past this point.
  121.  
  122.  
  123. # Avoid brain damage in some versions of 'make'.
  124. SHELL = /bin/sh
  125.  
  126. # all commands
  127. RCSCOMMANDS = ci$(x) co$(x) ident$(x) merge$(x) rcs$(x) rcsdiff$(x) rcsmerge$(x) rlog$(x)
  128.  
  129. all : $(RCSCOMMANDS)
  130.  
  131. install : all
  132.     $(INSTALL) ci$(x) $(DESTRCSDIR)
  133.     $(INSTALL) co$(x) $(DESTRCSDIR)
  134.     $(INSTALL) ident$(x) $(DESTRCSDIR)
  135.     $(INSTALL) merge$(x) $(DESTRCSDIR)
  136.     $(INSTALL) rcs$(x) $(DESTRCSDIR)
  137.     $(INSTALL) rcsdiff$(x) $(DESTRCSDIR)
  138.     $(INSTALL) rcsmerge$(x) $(DESTRCSDIR)
  139.     $(INSTALL) rlog$(x) $(DESTRCSDIR)
  140.  
  141. # Install RCS and (if applicable) GNU diff before running these tests.
  142. # To test RCS before installing it, see README.
  143. RCSTEST = PATH=$(RCSDIR):$(DIFFPREFIX).:$$PATH sh $(TESTPREFIX)rcstest
  144. installtest :
  145.     $(RCSTEST)
  146. installdebug :
  147.     $(RCSTEST) -v
  148.  
  149. clean :
  150.     $(REMOVE) a.* *$(o) conf.h conf.error $(RCSCOMMANDS) rcsclean$(x)
  151.  
  152.  
  153. ci = ci$(o) rcslex$(o) rcssyn$(o) rcsgen$(o) rcsedit$(o) rcskeys$(o) rcsmap$(o) \
  154.     rcsrev$(o) rcsutil$(o) rcsfnms$(o) partime$(o) maketime$(o) rcskeep$(o) \
  155.     rcsfcmp$(o) $(OTHER_OBJECT)
  156. ci$(x) : $(ci)
  157. !IF "$(OS)" == "os2"
  158.     $(LINK) $(ci) -o $@ $(LDLIBS)
  159.     $(BIND) $@ $(BINDN)
  160. !ELSE
  161.     $(LINK) @ms\$*.rsp,$*,nul,$(LDLIBS)
  162. !ENDIF
  163.  
  164. co = co$(o) rcslex$(o) rcssyn$(o) rcsgen$(o) rcsedit$(o) rcskeys$(o) rcsmap$(o) \
  165.     rcsrev$(o) rcsutil$(o) rcsfnms$(o) partime$(o) maketime$(o) rcskeep$(o) $(OTHER_OBJECT)
  166. co$(x) : $(co)
  167. !IF "$(OS)" == "os2"
  168.     $(LINK) $(co) -o $@ $(LDLIBS)
  169.     $(BIND) $@ $(BINDN)
  170. !ELSE
  171.     $(LINK) @ms\$*.rsp,$*,nul,$(LDLIBS)
  172. !ENDIF
  173.  
  174. ident = ident$(o) rcsmap$(o) $(OTHER_OBJECT)
  175. ident$(x) : $(ident)
  176. !IF "$(OS)" == "os2"
  177.     $(LINK) $(ident) -o $@ $(LDLIBS)
  178.     $(BIND) $@ $(BINDN)
  179. !ELSE
  180.     $(LINK) @ms\$*.rsp,$*,nul,$(LDLIBS)
  181. !ENDIF
  182.  
  183. merge = merge$(o) merger$(o) rcsfnms$(o) rcslex$(o) \
  184.     rcsmap$(o) rcsrev$(o) rcssyn$(o) rcsutil$(o) \
  185.     rcskeep$(o) rcskeys$(o) $(OTHER_OBJECT)
  186. merge$(x) : $(merge)
  187. !IF "$(OS)" == "os2"
  188.     $(LINK) $(merge) -o $@ $(LDLIBS)
  189.     $(BIND) $@ $(BINDN)
  190. !ELSE
  191.     $(LINK) @ms\$*.rsp,$*,nul,$(LDLIBS)
  192. !ENDIF
  193.  
  194. rlog = rlog$(o) rcslex$(o) rcsmap$(o) rcssyn$(o) rcsrev$(o) rcsutil$(o) partime$(o) \
  195.     maketime$(o) rcsfnms$(o) rcskeep$(o) rcskeys$(o) $(OTHER_OBJECT)
  196. rlog$(x) : $(rlog)
  197. !IF "$(OS)" == "os2"
  198.     $(LINK) $(rlog) -o $@ $(LDLIBS)
  199.     $(BIND) $@ $(BINDN)
  200. !ELSE
  201.     $(LINK) @ms\$*.rsp,$*,nul,$(LDLIBS)
  202. !ENDIF
  203.  
  204. rcs = rcs$(o) rcslex$(o) rcssyn$(o) rcsrev$(o) rcsutil$(o) rcsgen$(o) rcsedit$(o) rcskeys$(o) \
  205.     rcsmap$(o) rcsfnms$(o) rcskeep$(o) $(OTHER_OBJECT)
  206. rcs$(x) : $(rcs)
  207. !IF "$(OS)" == "os2"
  208.     $(LINK) $(rcs) -o $@ $(LDLIBS)
  209.     $(BIND) $@ $(BINDN)
  210. !ELSE
  211.     $(LINK) @ms\$*.rsp,$*,nul,$(LDLIBS)
  212. !ENDIF
  213.  
  214. rcsclean = rcsclean$(o) rcsedit$(o) rcsfcmp$(o) rcsfnms$(o) rcsgen$(o) rcskeys$(o) dirent$(o) \
  215.     rcslex$(o) rcsmap$(o) rcsrev$(o) rcssyn$(o) rcsutil$(o) rcskeep$(o) $(OTHER_OBJECT)
  216. rcsclean$(x) : $(rcsclean)
  217. !IF "$(OS)" == "os2"
  218.     $(LINK) $(rcsclean) -o $@ $(LDLIBS)
  219.     $(BIND) $@ $(BINDN)
  220. !ELSE
  221.     $(LINK) @ms\$*.rsp,$*,nul,$(LDLIBS)
  222. !ENDIF
  223.  
  224. rcsdiff = rcsdiff$(o) rcsutil$(o) rcsfnms$(o) rcsmap$(o) rcsrev$(o) rcssyn$(o) rcslex$(o) \
  225.     maketime$(o) partime$(o) rcskeep$(o) rcskeys$(o) $(OTHER_OBJECT)
  226. rcsdiff$(x) : $(rcsdiff)
  227. !IF "$(OS)" == "os2"
  228.     $(LINK) $(rcsdiff) -o $@ $(LDLIBS)
  229.     $(BIND) $@ $(BINDN)
  230. !ELSE
  231.     $(LINK) @ms\$*.rsp,$*,nul,$(LDLIBS)
  232. !ENDIF
  233.  
  234. rcsmerge = rcsmerge$(o) merger$(o) rcsutil$(o) rcsfnms$(o) rcsmap$(o) rcsrev$(o) rcssyn$(o) \
  235.     rcslex$(o) rcskeep$(o) rcskeys$(o) $(OTHER_OBJECT)
  236. rcsmerge$(x) : $(rcsmerge)
  237. !IF "$(OS)" == "os2"
  238.     $(LINK) $(rcsmerge) -o $@ $(LDLIBS)
  239.     $(BIND) $@ $(BINDN)
  240. !ELSE
  241.     $(LINK) @ms\$*.rsp,$*,nul,$(LDLIBS)
  242. !ENDIF
  243.  
  244. SOURCE=    ci.c co.c ident.c maketime.c merge.c merger.c partime.c rcs.c \
  245.     rcsclean.c rcsdiff.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \
  246.     rcskeep.c rcskeys.c rcslex.c rcsmap.c rcsmerge.c rcsrev.c rcssyn.c \
  247.     rcsutil.c rlog.c
  248. OBJECT=    ci$(o) co$(o) ident$(o) maketime$(o) merge$(o) merger$(o) partime$(o) rcs$(o) \
  249.     rcsclean$(o) rcsdiff$(o) rcsedit$(o) rcsfcmp$(o) rcsfnms$(o) rcsgen$(o) \
  250.     rcskeep$(o) rcskeys$(o) rcslex$(o) rcsmap$(o) rcsmerge$(o) rcsrev$(o) rcssyn$(o) \
  251.     rcsutil$(o) rlog$(o)
  252.  
  253. lint : conf.h
  254.     $(LINT) $(CC_D) -DRCS_lint=1 $(SOURCE)
  255.  
  256. conf_h = conf.h
  257. $(OBJECT) : $(conf_h) rcsbase.h
  258.