1 # NOTE: If you have no `make' program at all to process this makefile, run
\r
2 # `build_w32.bat' instead.
\r
4 # Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
\r
5 # This file is part of GNU Make.
\r
7 # GNU Make is free software; you can redistribute it and/or modify
\r
8 # it under the terms of the GNU General Public License as published by
\r
9 # the Free Software Foundation; either version 2, or (at your option)
\r
10 # any later version.
\r
12 # GNU Make is distributed in the hope that it will be useful,
\r
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
15 # GNU General Public License for more details.
\r
17 # You should have received a copy of the GNU General Public License
\r
18 # along with GNU Make; see the file COPYING. If not, write to
\r
19 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
\r
22 # NMakefile for GNU Make
\r
30 SUBPROC_MAKEFILE=NMakefile
\r
32 CFLAGS_any = /nologo /MT /W3 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES
\r
33 CFLAGS_debug = $(CFLAGS_any) /Od /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb
\r
34 CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
\r
36 LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
\r
37 /INCREMENTAL:no /PDB:WinDebug/make.pdb /MACHINE:I386 \
\r
38 /OUT:WinDebug/make.exe /DEBUG
\r
39 LDFLAGS_release = w32\subproc\WinRel\subproc.lib /NOLOGO /SUBSYSTEM:console\
\r
40 /INCREMENTAL:no /MACHINE:I386 /OUT:WinRel/make.exe
\r
42 all: config.h subproc Release Debug
\r
45 # Make sure we build the subproc library first. It has it's own
\r
46 # makefile. To be portable to Windows 95, we put the instructions
\r
47 # on how to build the library into a batch file. On NT, we could
\r
48 # simply have done foo && bar && dog, but this doesn't port.
\r
50 subproc: w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib
\r
52 w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib:
\r
53 subproc.bat $(SUBPROC_MAKEFILE)
\r
55 config.h: config.h.WIN32
\r
59 nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe
\r
61 nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe
\r
64 rmdir /s /q WinDebug WinRel
\r
67 if not exist .\$@\nul mkdir .\$@
\r
69 LIBS = kernel32.lib user32.lib advapi32.lib
\r
73 $(OUTDIR)/arscan.obj \
\r
74 $(OUTDIR)/commands.obj \
\r
75 $(OUTDIR)/default.obj \
\r
77 $(OUTDIR)/expand.obj \
\r
78 $(OUTDIR)/file.obj \
\r
79 $(OUTDIR)/function.obj \
\r
80 $(OUTDIR)/getloadavg.obj \
\r
81 $(OUTDIR)/getopt.obj \
\r
82 $(OUTDIR)/getopt1.obj \
\r
83 $(OUTDIR)/implicit.obj \
\r
85 $(OUTDIR)/main.obj \
\r
86 $(OUTDIR)/misc.obj \
\r
87 $(OUTDIR)/read.obj \
\r
88 $(OUTDIR)/remake.obj \
\r
89 $(OUTDIR)/remote-stub.obj \
\r
90 $(OUTDIR)/rule.obj \
\r
91 $(OUTDIR)/signame.obj \
\r
92 $(OUTDIR)/variable.obj \
\r
93 $(OUTDIR)/version.obj \
\r
94 $(OUTDIR)/vpath.obj \
\r
95 $(OUTDIR)/glob.obj \
\r
96 $(OUTDIR)/fnmatch.obj \
\r
97 $(OUTDIR)/dirent.obj \
\r
98 $(OUTDIR)/pathstuff.obj
\r
100 $(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
\r
102 $(LDFLAGS) $(LIBS) $(OBJS)
\r
106 $(CC) $(CFLAGS) /c $<
\r
108 $(OUTDIR)/ar.obj : ar.c make.h filedef.h dep.h
\r
109 $(OUTDIR)/arscan.obj : arscan.c make.h
\r
110 $(OUTDIR)/commands.obj : commands.c
\r
111 $(OUTDIR)/default.obj : default.c make.h rule.h dep.h filedef.h job.h commands.h variable.h
\r
112 $(OUTDIR)/dir.obj : dir.c make.h
\r
113 $(OUTDIR)/expand.obj : expand.c make.h filedef.h job.h commands.h variable.h
\r
114 $(OUTDIR)/file.obj : file.c make.h dep.h filedef.h job.h commands.h variable.h
\r
115 $(OUTDIR)/function.obj : function.c make.h filedef.h variable.h dep.h job.h commands.h
\r
116 $(OUTDIR)/getloadavg.obj : getloadavg.c
\r
117 $(OUTDIR)/getopt.obj : getopt.c
\r
118 $(OUTDIR)/getopt1.obj : getopt1.c getopt.h
\r
119 $(OUTDIR)/implicit.obj : implicit.c make.h rule.h dep.h filedef.h
\r
120 $(OUTDIR)/job.obj : job.c make.h job.h filedef.h commands.h variable.h
\r
121 $(OUTDIR)/main.obj : main.c make.h dep.h filedef.h variable.h job.h commands.h getopt.h
\r
122 $(OUTDIR)/misc.obj : misc.c make.h dep.h
\r
123 $(OUTDIR)/read.obj : read.c make.h dep.h filedef.h job.h commands.h variable.h glob/glob.h
\r
124 $(OUTDIR)/remake.obj : remake.c make.h filedef.h job.h commands.h dep.h
\r
125 $(OUTDIR)/remote-stub.obj : remote-stub.c make.h filedef.h job.h commands.h
\r
126 $(OUTDIR)/rule.obj : rule.c make.h dep.h filedef.h job.h commands.h variable.h rule.h
\r
127 $(OUTDIR)/signame.obj : signame.c signame.h
\r
128 $(OUTDIR)/variable.obj : variable.c make.h dep.h filedef.h job.h commands.h variable.h
\r
129 $(OUTDIR)/version.obj : version.c
\r
130 $(OUTDIR)/vpath.obj : vpath.c make.h filedef.h variable.h
\r
131 $(OUTDIR)/glob.obj : glob/glob.c
\r
132 $(CC) $(CFLAGS) /c $?
\r
133 $(OUTDIR)/fnmatch.obj : glob/fnmatch.c
\r
134 $(CC) $(CFLAGS) /c $?
\r
135 $(OUTDIR)/dirent.obj : w32/compat/dirent.c
\r
136 $(CC) $(CFLAGS) /c $?
\r
137 $(OUTDIR)/pathstuff.obj : w32/pathstuff.c
\r
138 $(CC) $(CFLAGS) /c $?
\r