home *** CD-ROM | disk | FTP | other *** search
- # makefile. - makefile for swaplib
- # Copyright (C) 1990 by Thorsten Ohl, td12@ddagsi3.bitnet
-
- # This file is part of SWAPLIB (the library), a library for efficient
- # execution of child processes under MS-DOS.
-
- # The library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 1, or (at your option)
- # any later version.
-
- # The library is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
-
- # You should have received a copy of the GNU General Public License
- # along with the library; if not, write to the Free Software
- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- # $Header: e:/gnu/swaplib/RCS/makefile.'v 0.9 90/09/09 23:12:29 tho Stable $
- #
-
- # Configuration section:
-
- # Memory model:
- MODEL = L
-
- # Where to put the library
- LIBDIR = d:/usr/lib
- INCDIR = d:/usr/include
-
- INSTALL = cp -v
- DISK = b:
- ZIPFILE = swaplib.zip
-
- # -DUSE_XMS, -DUSE_EMS, -DBROKEN_EMM
- SWAPCFG = -DUSE_XMS
-
- ARFLAGS = /noi -+
- CFLAGS = -A$(MODEL) -W4 -Za -Ox
-
- LDFLAGS = /map/far/e
-
- # Files:
-
- # swaplib$(MODEL).lib doesn't work because of case sensivity...
-
- ifeq ($(MODEL),S)
- SWAPLIB = swaplibs.lib
- endif
- ifeq ($(MODEL),C)
- SWAPLIB = swaplibc.lib
- endif
- ifeq ($(MODEL),M)
- SWAPLIB = swaplibm.lib
- endif
- ifeq ($(MODEL),L)
- SWAPLIB = swaplibl.lib
- endif
- ifeq ($(MODEL),H)
- SWAPLIB = swaplibh.lib
- endif
-
- SWAPPER = swap.obj
-
- LIBOBJS = sw_env.obj sw_misc.obj sw_mode.obj sw_path.obj sw_resp.obj \
- sw_shell.obj sw_smart.obj \
- sw_cl.obj sw_fl.obj sw_masm.obj sw_msc.obj \
- sw_lib.obj sw_link.obj sw_zip.obj \
- sw_spl.obj sw_sple.obj sw_splp.obj sw_splpe.obj \
- sw_spv.obj sw_spve.obj sw_spvp.obj sw_spvpe.obj \
- sw_sys.obj sw_popen.obj
- LIBSRCS = $(LIBOBJS:.obj=.c) version.c swap.c testswap.c
- LIBINCS = swaplib.h
- LIBDOCS = swaplib.tex
-
- RCSFILES= $(patsubst %, RCS/%'v, $(LIBSRCS) $(LIBINCS)) \
- RCS/swaplib.t'v RCS/makefile.'v
- MISC = changelo readme
-
- VERSION = 0.9 (beta)
- DISTFILES1 = readme copying $(LIBDOCS) makefile $(LIBINCS)
- DISTFILES2 = $(LIBSRCS) _swap_l.asm
-
- # You probably don't want to edit anything beyond this line...
-
- .PHONY: all
- all: $(SWAPPER) $(SWAPLIB)
-
- $(SWAPLIB): $(LIBOBJS) version.c
- $(CC) $(CFLAGS) -c version.c
- $(AR) $@ $(ARFLAGS) $(?:.c=.obj), swaplib.log,,
-
- $(SWAPPER): swap.c
- $(CC) -A$(MODEL) -Od -W4 $(SWAPCFG) -Fo$@ -c $<
-
- .PHONY: test
- test: testswap.exe
-
- testswap.exe: testswap.obj $(SWAPPER) $(SWAPLIB)
- $(LINK) $(LDFLAGS) $(SWAPPER) $<, $@, testswap.map, $(SWAPLIB),
-
- .PHONY: install
- install: all swap.c
- $(INSTALL) $(SWAPLIB) swap.c $(LIBDIR)
- $(INSTALL) $(LIBINCS) $(INCDIR)
-
- $(LIBOBJS) testswap.obj: $(LIBINCS)
-
- .PHONY: docs info tex
- docs: info tex
- info: swaplib.inf
- tex: swaplib.dvi
-
- swaplib.inf: swaplib.tex
- makeinfo $<
-
- swaplib.dvi: swaplib.tex swaplib.cps
- tex $<
-
- swaplib.cps: swaplib.cp
- texindex swaplib.cp swaplib.fn
-
- swaplib.cp: swaplib.tex
- tex $<
-
-
- .PHONY: tags
- tags: $(LIBSRCS) $(LIBINCS)
- etags *.c *.h
-
- .PHONY: clean
- clean:
- rm -fr *.obj *.lib *.exe *.map *.log *.bak tags errs *.dvi \
- *.aux *.toc *.inf *.dlg swaplib.?? swaplib.??s *.uue \
- _swap_l.asm
- rcsclean *.c *.h *.tex makefile
-
-
- .PHONY: zip disk
- zip: $(ZIPFILE)
- disk: $(DISK)/$(ZIPFILE)
-
- $(ZIPFILE): $(RCSFILES) $(MISC)
- pkzip -frp $@
-
- $(DISK)/$(ZIPFILE): $(ZIPFILE)
- cp $< $@
- pkunzip -t $@ | grep -vw OK
-
-
- .PHONY: dist
- dist: swaplib1.uue swaplib2.uue
-
- swaplib1.uue: dist1.zip
- uuencode $< swaplib1.zip > $@
- rm -f $<
-
- swaplib2.uue: dist2.zip
- uuencode $< swaplib2.zip > $@
- rm -f $<
-
- dist1.zip: $(DISTFILES1)
- echo swaplib Version $(VERSION) (1 of 2) | pkzip -z $@
- pkzip $@ $^
-
- dist2.zip: $(DISTFILES2)
- echo swaplib Version $(VERSION) (2 of 2) | pkzip -z $@
- pkzip $@ $^
-
- _swap_l.asm: swap.c
- $(CC) -AL -Od -W4 -DUSE_XMS -DUSE_EMS -Fa$@ -c $<
-
-
- #
- # Local Variables:
- # mode:Text
- # ChangeLog:ChangeLog
- # End:
-
-