1 | # NOTE: If you have no `make' program at all to process this makefile, run
|
---|
2 | # `build.bat' instead.
|
---|
3 | #
|
---|
4 | # Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc
|
---|
5 | # This file is part of GNU Make.
|
---|
6 | #
|
---|
7 | # GNU Make 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 2, or (at your option)
|
---|
10 | # any later version.
|
---|
11 | #
|
---|
12 | # GNU Make 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 GNU Make; see the file COPYING. If not, write to
|
---|
19 | # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
20 |
|
---|
21 | #
|
---|
22 | # NMakefile for GNU Make (subproc library)
|
---|
23 | #
|
---|
24 | LIB = lib
|
---|
25 | CC = cl
|
---|
26 | MAKE = nmake
|
---|
27 |
|
---|
28 | OUTDIR=.
|
---|
29 | MAKEFILE=NMakefile
|
---|
30 |
|
---|
31 | CFLAGS_any = /nologo /MT /W3 /GX /Z7 /YX /D WIN32 /D WINDOWS32 /D _WINDOWS -I. -I../include -I../../
|
---|
32 | CFLAGS_debug = $(CFLAGS_any) /Od /D _DEBUG /FR.\WinDebug\ /Fp.\WinDebug\subproc.pch /Fo.\WinDebug/
|
---|
33 | CFLAGS_release = $(CFLAGS_any) /O2 /FR.\WinRel\ /Fp.\WinRel\subproc.pch /Fo.\WinRel/
|
---|
34 |
|
---|
35 | all: Release Debug
|
---|
36 |
|
---|
37 | Release:
|
---|
38 | $(MAKE) /f $(MAKEFILE) OUTDIR=WinRel CFLAGS="$(CFLAGS_release)" WinRel/subproc.lib
|
---|
39 | Debug:
|
---|
40 | $(MAKE) /f $(MAKEFILE) OUTDIR=WinDebug CFLAGS="$(CFLAGS_debug)" WinDebug/subproc.lib
|
---|
41 |
|
---|
42 | clean:
|
---|
43 | rmdir /s /q WinRel WinDebug
|
---|
44 | erase *.pdb
|
---|
45 |
|
---|
46 | $(OUTDIR):
|
---|
47 | if not exist .\$@\nul mkdir .\$@
|
---|
48 |
|
---|
49 | OBJS = $(OUTDIR)/misc.obj $(OUTDIR)/w32err.obj $(OUTDIR)/sub_proc.obj
|
---|
50 |
|
---|
51 | $(OUTDIR)/subproc.lib: $(OUTDIR) $(OBJS)
|
---|
52 | $(LIB) -out:$@ @<<
|
---|
53 | $(OBJS)
|
---|
54 | <<
|
---|
55 |
|
---|
56 | .c{$(OUTDIR)}.obj:
|
---|
57 | $(CC) $(CFLAGS) /c $<
|
---|
58 |
|
---|
59 | $(OUTDIR)/misc.obj: misc.c proc.h
|
---|
60 | $(OUTDIR)/sub_proc.obj: sub_proc.c ../include/sub_proc.h ../include/w32err.h proc.h
|
---|
61 | $(OUTDIR)/w32err.obj: w32err.c ../include/w32err.h
|
---|