Home | History | Annotate | Download | only in subproc
      1 # NOTE: If you have no `make' program at all to process this makefile, run
      2 # `build.bat' instead.
      3 #
      4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
      5 # 2006 Free Software Foundation, Inc.
      6 # This file is part of GNU Make.
      7 #
      8 # GNU Make is free software; you can redistribute it and/or modify it under the
      9 # terms of the GNU General Public License as published by the Free Software
     10 # Foundation; either version 2, or (at your option) any later version.
     11 #
     12 # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
     13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     14 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     15 #
     16 # You should have received a copy of the GNU General Public License along with
     17 # GNU Make; see the file COPYING.  If not, write to the Free Software
     18 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
     19 
     20 #
     21 #       NMakefile for GNU Make (subproc library)
     22 #
     23 LIB = lib
     24 CC = cl
     25 MAKE = nmake
     26 
     27 OUTDIR=.
     28 MAKEFILE=NMakefile
     29 
     30 CFLAGS_any = /nologo /MT /W4 /GX /Z7 /YX /D WIN32 /D WINDOWS32 /D _WINDOWS  -I. -I../include -I../../
     31 CFLAGS_debug = $(CFLAGS_any) /Od /D _DEBUG /FR.\WinDebug\ /Fp.\WinDebug\subproc.pch /Fo.\WinDebug/
     32 CFLAGS_release = $(CFLAGS_any) /O2 /FR.\WinRel\ /Fp.\WinRel\subproc.pch /Fo.\WinRel/
     33 
     34 all: Release Debug
     35 
     36 Release:
     37 	$(MAKE) /f $(MAKEFILE) OUTDIR=WinRel CFLAGS="$(CFLAGS_release)" WinRel/subproc.lib
     38 Debug:
     39 	$(MAKE) /f $(MAKEFILE) OUTDIR=WinDebug CFLAGS="$(CFLAGS_debug)" WinDebug/subproc.lib
     40 
     41 clean:
     42 	rmdir /s /q WinRel WinDebug
     43 	erase *.pdb
     44 
     45 $(OUTDIR):
     46 	if not exist .\$@\nul mkdir .\$@
     47 
     48 OBJS = $(OUTDIR)/misc.obj $(OUTDIR)/w32err.obj $(OUTDIR)/sub_proc.obj
     49 
     50 $(OUTDIR)/subproc.lib: $(OUTDIR) $(OBJS)
     51 	$(LIB) -out:$@ @<<
     52 		$(OBJS)
     53 <<
     54 
     55 .c{$(OUTDIR)}.obj:
     56 	$(CC) $(CFLAGS) /c $<
     57 
     58 $(OUTDIR)/misc.obj: misc.c proc.h
     59 $(OUTDIR)/sub_proc.obj: sub_proc.c  ../include/sub_proc.h ../include/w32err.h proc.h
     60 $(OUTDIR)/w32err.obj: w32err.c ../include/w32err.h
     61