* texinfo.tex (\acronym): New Texinfo command.
[make.git] / NMakefile.template
blobd82dbce49874eb7dd200fa6d580bcc8524e473bb
1 # NOTE: If you have no `make' program at all to process this makefile, run\r
2 # `build_w32.bat' instead.\r
3 #\r
4 # Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc.\r
5 # This file is part of GNU Make.\r
6 #\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
11 #\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
16 #\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
21 #\r
22 #       NMakefile for GNU Make\r
23 #\r
25 LINK = link\r
26 CC = cl\r
28 OUTDIR=.\r
29 MAKEFILE=NMakefile\r
30 SUBPROC_MAKEFILE=NMakefile\r
32 CFLAGS_any = /nologo /MT /W3 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D WINDOWS32 /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
44 #\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
49 #\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.W32\r
56         copy $? $@\r
58 Release:\r
59         nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe\r
60 Debug:\r
61         nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe\r
63 clean:\r
64         rmdir /s /q WinDebug WinRel\r
65         rmdir /s /q w32\subproc\WinDebug w32\subproc\WinRel\r
66         erase config.h\r
68 $(OUTDIR):\r
69         if not exist .\$@\nul mkdir .\$@\r
71 LIBS = kernel32.lib user32.lib advapi32.lib\r
73 OBJS = \\r
74         $(OUTDIR)/ar.obj \\r
75         $(OUTDIR)/arscan.obj \\r
76         $(OUTDIR)/commands.obj \\r
77         $(OUTDIR)/default.obj \\r
78         $(OUTDIR)/dir.obj \\r
79         $(OUTDIR)/expand.obj \\r
80         $(OUTDIR)/file.obj \\r
81         $(OUTDIR)/function.obj \\r
82         $(OUTDIR)/getloadavg.obj \\r
83         $(OUTDIR)/getopt.obj \\r
84         $(OUTDIR)/getopt1.obj \\r
85         $(OUTDIR)/implicit.obj \\r
86         $(OUTDIR)/job.obj \\r
87         $(OUTDIR)/main.obj \\r
88         $(OUTDIR)/misc.obj \\r
89         $(OUTDIR)/read.obj \\r
90         $(OUTDIR)/remake.obj \\r
91         $(OUTDIR)/remote-stub.obj \\r
92         $(OUTDIR)/rule.obj \\r
93         $(OUTDIR)/signame.obj \\r
94         $(OUTDIR)/variable.obj \\r
95         $(OUTDIR)/version.obj \\r
96         $(OUTDIR)/vpath.obj \\r
97         $(OUTDIR)/glob.obj \\r
98         $(OUTDIR)/fnmatch.obj \\r
99         $(OUTDIR)/dirent.obj \\r
100         $(OUTDIR)/pathstuff.obj\r
102 $(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)\r
103         $(LINK) @<<\r
104                 $(LDFLAGS) $(LIBS) $(OBJS)\r
105 <<\r
107 .c{$(OUTDIR)}.obj:\r
108         $(CC) $(CFLAGS) /c $<\r
109         \r
110 $(OUTDIR)/ar.obj : ar.c make.h filedef.h dep.h\r
111 $(OUTDIR)/arscan.obj : arscan.c make.h\r
112 $(OUTDIR)/commands.obj : commands.c\r
113 $(OUTDIR)/default.obj : default.c make.h rule.h dep.h filedef.h job.h commands.h variable.h\r
114 $(OUTDIR)/dir.obj :  dir.c make.h\r
115 $(OUTDIR)/expand.obj : expand.c make.h filedef.h job.h commands.h variable.h\r
116 $(OUTDIR)/file.obj : file.c make.h dep.h filedef.h job.h commands.h variable.h\r
117 $(OUTDIR)/function.obj : function.c make.h filedef.h variable.h dep.h job.h commands.h\r
118 $(OUTDIR)/getloadavg.obj : getloadavg.c\r
119 $(OUTDIR)/getopt.obj : getopt.c\r
120 $(OUTDIR)/getopt1.obj : getopt1.c getopt.h\r
121 $(OUTDIR)/implicit.obj : implicit.c make.h rule.h dep.h filedef.h\r
122 $(OUTDIR)/job.obj : job.c make.h job.h filedef.h commands.h variable.h\r
123 $(OUTDIR)/main.obj : main.c make.h dep.h filedef.h variable.h job.h commands.h getopt.h\r
124 $(OUTDIR)/misc.obj : misc.c make.h dep.h\r
125 $(OUTDIR)/read.obj : read.c make.h dep.h filedef.h job.h commands.h variable.h glob/glob.h\r
126 $(OUTDIR)/remake.obj : remake.c make.h filedef.h job.h commands.h dep.h\r
127 $(OUTDIR)/remote-stub.obj : remote-stub.c make.h filedef.h job.h commands.h\r
128 $(OUTDIR)/rule.obj : rule.c make.h dep.h filedef.h job.h commands.h variable.h rule.h\r
129 $(OUTDIR)/signame.obj : signame.c signame.h\r
130 $(OUTDIR)/variable.obj : variable.c make.h dep.h filedef.h job.h commands.h variable.h\r
131 $(OUTDIR)/version.obj : version.c\r
132 $(OUTDIR)/vpath.obj : vpath.c make.h filedef.h variable.h\r
133 $(OUTDIR)/glob.obj : glob/glob.c\r
134         $(CC) $(CFLAGS) /c $?\r
135 $(OUTDIR)/fnmatch.obj : glob/fnmatch.c\r
136         $(CC) $(CFLAGS) /c $?\r
137 $(OUTDIR)/dirent.obj : w32/compat/dirent.c\r
138         $(CC) $(CFLAGS) /c $?\r
139 $(OUTDIR)/pathstuff.obj : w32/pathstuff.c\r
140         $(CC) $(CFLAGS) /c $?\r