home *** CD-ROM | disk | FTP | other *** search
/ Mega CD-ROM 1 / megacd_rom_1.zip / megacd_rom_1 / GNUISH / SWALIB0.ZIP / MAKEFILE < prev    next >
Text File  |  1990-09-10  |  4KB  |  182 lines

  1. # makefile. - makefile for swaplib
  2. # Copyright (C) 1990 by Thorsten Ohl, td12@ddagsi3.bitnet
  3.  
  4. # This file is part of SWAPLIB (the library), a library for efficient
  5. # execution of child processes under MS-DOS.
  6.  
  7. # The library is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 1, or (at your option)
  10. # any later version.
  11.  
  12. # The library is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU General Public License for more details.
  16.  
  17. # You should have received a copy of the GNU General Public License
  18. # along with the library; if not, write to the Free Software
  19. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21. # $Header: e:/gnu/swaplib/RCS/makefile.'v 0.9 90/09/09 23:12:29 tho Stable $
  22. #
  23.  
  24. # Configuration section:
  25.  
  26. # Memory model:
  27. MODEL    = L
  28.  
  29. # Where to put the library
  30. LIBDIR    = d:/usr/lib
  31. INCDIR    = d:/usr/include
  32.  
  33. INSTALL    = cp -v
  34. DISK    = b:
  35. ZIPFILE    = swaplib.zip
  36.  
  37. # -DUSE_XMS, -DUSE_EMS, -DBROKEN_EMM
  38. SWAPCFG    = -DUSE_XMS
  39.  
  40. ARFLAGS = /noi -+
  41. CFLAGS    = -A$(MODEL) -W4 -Za -Ox
  42.  
  43. LDFLAGS    = /map/far/e
  44.  
  45. # Files:
  46.  
  47. # swaplib$(MODEL).lib doesn't work because of case sensivity...
  48.  
  49. ifeq ($(MODEL),S)
  50. SWAPLIB    = swaplibs.lib
  51. endif
  52. ifeq ($(MODEL),C)
  53. SWAPLIB    = swaplibc.lib
  54. endif
  55. ifeq ($(MODEL),M)
  56. SWAPLIB    = swaplibm.lib
  57. endif
  58. ifeq ($(MODEL),L)
  59. SWAPLIB    = swaplibl.lib
  60. endif
  61. ifeq ($(MODEL),H)
  62. SWAPLIB    = swaplibh.lib
  63. endif
  64.  
  65. SWAPPER = swap.obj
  66.  
  67. LIBOBJS    = sw_env.obj sw_misc.obj sw_mode.obj sw_path.obj sw_resp.obj \
  68.       sw_shell.obj sw_smart.obj \
  69.       sw_cl.obj sw_fl.obj sw_masm.obj sw_msc.obj \
  70.       sw_lib.obj sw_link.obj sw_zip.obj \
  71.       sw_spl.obj sw_sple.obj sw_splp.obj sw_splpe.obj \
  72.       sw_spv.obj sw_spve.obj sw_spvp.obj sw_spvpe.obj \
  73.       sw_sys.obj sw_popen.obj
  74. LIBSRCS    = $(LIBOBJS:.obj=.c) version.c swap.c testswap.c
  75. LIBINCS    = swaplib.h
  76. LIBDOCS    = swaplib.tex
  77.  
  78. RCSFILES= $(patsubst %, RCS/%'v, $(LIBSRCS) $(LIBINCS)) \
  79.       RCS/swaplib.t'v RCS/makefile.'v
  80. MISC    = changelo readme
  81.  
  82. VERSION    = 0.9 (beta)
  83. DISTFILES1 = readme copying $(LIBDOCS) makefile $(LIBINCS)
  84. DISTFILES2 = $(LIBSRCS) _swap_l.asm
  85.  
  86. #  You probably don't want to edit anything beyond this line...
  87.  
  88. .PHONY: all
  89. all: $(SWAPPER) $(SWAPLIB)
  90.  
  91. $(SWAPLIB): $(LIBOBJS) version.c
  92.     $(CC) $(CFLAGS) -c version.c
  93.     $(AR) $@ $(ARFLAGS) $(?:.c=.obj), swaplib.log,,
  94.  
  95. $(SWAPPER): swap.c
  96.     $(CC) -A$(MODEL) -Od -W4 $(SWAPCFG) -Fo$@ -c $<
  97.  
  98. .PHONY: test
  99. test: testswap.exe
  100.  
  101. testswap.exe: testswap.obj $(SWAPPER) $(SWAPLIB)
  102.     $(LINK) $(LDFLAGS) $(SWAPPER) $<, $@, testswap.map, $(SWAPLIB),
  103.  
  104. .PHONY: install
  105. install: all swap.c
  106.     $(INSTALL) $(SWAPLIB) swap.c $(LIBDIR)
  107.     $(INSTALL) $(LIBINCS) $(INCDIR)
  108.  
  109. $(LIBOBJS) testswap.obj: $(LIBINCS)
  110.  
  111. .PHONY: docs info tex
  112. docs: info tex
  113. info: swaplib.inf
  114. tex: swaplib.dvi
  115.  
  116. swaplib.inf: swaplib.tex
  117.     makeinfo $<
  118.  
  119. swaplib.dvi: swaplib.tex swaplib.cps
  120.     tex $<
  121.  
  122. swaplib.cps: swaplib.cp
  123.     texindex swaplib.cp swaplib.fn
  124.  
  125. swaplib.cp: swaplib.tex
  126.     tex $<
  127.  
  128.  
  129. .PHONY: tags
  130. tags: $(LIBSRCS) $(LIBINCS)
  131.     etags  *.c *.h
  132.  
  133. .PHONY: clean
  134. clean:
  135.     rm -fr *.obj *.lib *.exe *.map *.log *.bak tags errs *.dvi \
  136.            *.aux *.toc *.inf *.dlg swaplib.?? swaplib.??s *.uue \
  137.            _swap_l.asm
  138.     rcsclean *.c *.h *.tex makefile
  139.  
  140.  
  141. .PHONY: zip disk
  142. zip: $(ZIPFILE)
  143. disk: $(DISK)/$(ZIPFILE)
  144.  
  145. $(ZIPFILE): $(RCSFILES) $(MISC)
  146.     pkzip -frp $@
  147.  
  148. $(DISK)/$(ZIPFILE): $(ZIPFILE)
  149.     cp $< $@
  150.     pkunzip -t $@ | grep -vw OK
  151.  
  152.  
  153. .PHONY: dist
  154. dist: swaplib1.uue swaplib2.uue
  155.  
  156. swaplib1.uue: dist1.zip
  157.     uuencode $< swaplib1.zip > $@
  158.     rm -f $<
  159.  
  160. swaplib2.uue: dist2.zip
  161.     uuencode $< swaplib2.zip > $@
  162.     rm -f $<
  163.  
  164. dist1.zip: $(DISTFILES1)
  165.     echo swaplib Version $(VERSION) (1 of 2) | pkzip -z $@
  166.     pkzip $@ $^
  167.  
  168. dist2.zip: $(DISTFILES2)
  169.     echo swaplib Version $(VERSION) (2 of 2) | pkzip -z $@
  170.     pkzip $@ $^
  171.  
  172. _swap_l.asm: swap.c
  173.     $(CC) -AL -Od -W4 -DUSE_XMS -DUSE_EMS -Fa$@ -c $<
  174.  
  175.  
  176. #
  177. # Local Variables:
  178. # mode:Text
  179. # ChangeLog:ChangeLog
  180. # End:
  181.  
  182.