Don't build the profile directory.
[cegcc.git] / cegcc / src / mingw / Makefile.in
blob28f2aa7b6defbdfbb0c22e4f4a53697c4d349f1a
1 # Makefile.in for the winsup/mingw directory.
2 # Copyright (c) 1995-2008, 1996, 1997, 1998 Cygnus Solutions
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 # This makefile requires GNU make.
20 PACKAGE = @PACKAGE_TARNAME@
21 VERSION = @PACKAGE_VERSION@
22 CYGRELEASE = 1
24 VPATH = @srcdir@
25 srcdir = @srcdir@
26 top_srcdir = @top_srcdir@
27 top_builddir = @top_builddir@
29 # FIXME: I see no reason to define `objdir';
30 # it appears to be unused, and could be removed.
31 objdir = .
33 build = @build@
34 build_alias = @build_alias@
35 host = @host@
36 host_alias = @host_alias@
37 target = @target@
38 target_alias = @target_alias@
39 with_cross_host = @with_cross_host@
40 prefix = @prefix@
41 conf_prefix = @prefix@
42 host_os = @host_os@
44 datarootdir = @datarootdir@
45 program_transform_name = @program_transform_name@
46 exec_prefix = @exec_prefix@
47 bindir = @bindir@
48 libdir = @libdir@
50 ifneq (,$(findstring cygwin,$(target_alias)))
52 # FIXME: What is the purpose of such logic, testing `target_alias'?
54 # Firstly, there is no code generator being built here. The concept
55 # of `target' is meaningless, and there is no valid reason to expect
56 # that `target_alias' would be anything other than an empty string.
57 # Thus, the validity of such tests is extremely suspect.
59 # Secondly, the decisions being taken, on the basis of these tests,
60 # rightfully belong in the configure script; all this logic should be
61 # removed, and properly implemented in `configure.in'.
63 mandir = $(prefix)/share/man
64 mansection = mingw
65 else
66 mandir = @mandir@
67 mansection = 3
68 endif
69 manpage_transform = @mingw_manpage_transform@
70 ifeq ($(target_alias),$(host_alias))
71 ifeq ($(build_alias),$(host_alias))
72 tooldir:=$(exec_prefix)
73 else
74 tooldir:=$(exec_prefix)/$(host_alias)
75 endif
76 else
77 tooldir:=$(exec_prefix)/$(host_alias)
78 endif
79 datadir = @datadir@
80 infodir = @infodir@
81 includedir = @includedir@
82 ifneq (,$(findstring cygwin,$(host_alias)))
84 # FIXME: Doubtful use of `target_alias', again.
86 # Here we not only have a dubious test, based on `target_alias',
87 # but we also assign local alternatives for the standard autoconf
88 # installation path macros. This should not be necessary; the
89 # configure script should simply assign appropriate values to
90 # the standard macros, which should be used herein.
92 inst_bindir:=$(tooldir)/bin
93 inst_includedir:=$(tooldir)/include/mingw
94 inst_libdir:=$(tooldir)/lib/mingw
95 inst_docdir:=$(tooldir)/share/doc/mingw-runtime
96 else
97 ifneq (,$(findstring mingw32ce,$(host_alias)))
98 inst_bindir:=$(tooldir)/bin
99 inst_includedir:=$(tooldir)/include
100 inst_libdir:=$(tooldir)/lib
101 inst_docdir:=$(prefix)/share/doc/mingw-runtime
102 else
103 ifneq (,$(with_cross_host))
105 # FIXME: What is the intended purpose of `with_cross_host'?
107 # Notwithstanding that this conforms to no known standard, and
108 # is completely undocumented, it does not belong here; every one
109 # of these settings is the prerogative of the configure script,
110 # and they should use standard names, as noted above.
112 inst_bindir:=$(tooldir)/bin
113 inst_includedir:=$(tooldir)/include
114 inst_libdir:=$(tooldir)/lib
115 inst_docdir:=$(tooldir)/share/doc/mingw-runtime
116 else
117 inst_bindir:=$(bindir)
118 inst_includedir:=$(includedir)
119 inst_libdir:=$(libdir)
120 inst_docdir:=$(prefix)/doc/runtime
121 endif
122 endif
123 endif
125 # The Mingw headers are installed under a subdirectory of
126 # $(tooldir)/include when configuring in Cygwin.
127 HEADER_SUBDIR = @HEADER_SUBDIR@
129 SHELL = /bin/sh
131 INSTALL = @INSTALL@
132 INSTALL_DATA = @INSTALL_DATA@
133 INSTALL_PROGRAM = @INSTALL_PROGRAM@
134 mkinstalldirs = $(SHELL) @MKINSTALLDIRS@
136 CC := @CC@
137 ifneq (,$(findstring cygwin,$(host_alias)))
139 # FIXME: What is the purpose of this hideous kludge?
141 # Again, we have a dubious use of `target_alias'. Worse, `CC'
142 # should have been appropriately set by the configure script; to
143 # mess with it, in this fashion, should neither be necessary,
144 # nor accepted.
146 override CC := ${filter-out -L% -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\) *[^ ]*\( \|$$\)% %g'}}
147 endif
148 # FIXME: Which is it, CC or CC_FOR_TARGET?
149 CC_FOR_TARGET = $(CC)
150 AS_FOR_TARGET = $(AS)
151 CFLAGS = @CFLAGS@
152 CXXFLAGS = @CXXFLAGS@
154 # compiling with Cygwin?
155 NO_CYGWIN := @NO_CYGWIN@
156 ifdef NO_CYGWIN
158 # FIXME: Again, this should have been resolved by `configure',
159 # and this kludge should be unnecessary.
161 override CC := ${NO_CYGWIN} $(firstword ${CC})
162 endif
164 # Either crtdll (CRT_ID 1) or msvcrt (CRT_ID 2) or coredll (CRT_ID 3).
165 RUNTIME = @RUNTIME@
166 CRT_ID = @CRT_ID@
168 # Needed for threading dll.
169 THREAD_DLL = @THREAD_DLL@
170 THREAD_DLL_VERSION = 10
171 THREAD_DLL_NAME = $(THREAD_DLL)$(THREAD_DLL_VERSION).dll
173 # Various libraries.
174 LIBM_A=@LIBM_A@
176 W32API_INCLUDE = @W32API_INCLUDE@
177 INCLUDES = -I$(srcdir)/include \
178 -I$(srcdir)/../include \
179 -nostdinc \
180 -iwithprefixbefore include
181 ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(W32API_INCLUDE)
182 ALL_CXXFLAGS = $(CXXFLAGS) $(INCLUDES) -nostdinc++ $(W32API_INCLUDE)
184 AS = @AS@
185 AR = @AR@
186 LD = @LD@
187 AR_FLAGS = rcv
188 RANLIB = @RANLIB@
189 DLLTOOL = @DLLTOOL@
190 DLLTOOLFLAGS =
191 DLLTOOL_FOR_TARGET = $(DLLTOOL)
192 DLLTOOL_FLAGS = --as $(AS_FOR_TARGET)
193 DLLWRAP = @DLLWRAP@
194 DLLWRAP_FOR_TARGET = $(DLLWRAP)
195 DLLWRAP_FLAGS = --dlltool $(DLLTOOL) --as $(AS) --driver-name $(CC)
196 OBJCOPY = @OBJCOPY@
197 NM = @NM@
199 TAR = tar
200 TARFLAGS = z
201 TARFILEEXT = .tar.gz
203 SUBDIRS = mingwex
205 # FIXME: Most of these are either redundant, or should be set
206 # directly in the subdirectories' Makefiles, by `configure'.
207 FLAGS_TO_PASS:=\
208 AS="$(AS)" \
209 CC="$(CC)" \
210 CFLAGS="$(CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_CONFIG)" \
211 CXXFLAGS="$(CXXFLAGS) $(CFLAGS_COMMON) $(CFLAGS_CONFIG)" \
212 EXE_LDFLAGS="$(EXE_LDFLAGS)" \
213 AR="$(AR)" \
214 RANLIB="$(RANLIB)" \
215 LD="$(LD)" \
216 DLLTOOL="$(DLLTOOL)" \
217 exec_prefix="$(exec_prefix)" \
218 bindir="$(bindir)" \
219 libdir="$(libdir)" \
220 tooldir="$(tooldir)" \
221 datadir="$(datadir)" \
222 infodir="$(infodir)" \
223 includedir="$(includedir)" \
224 inst_bindir="$(inst_bindir)" \
225 inst_includedir="$(inst_includedir)" \
226 inst_libdir="$(inst_libdir)" \
227 inst_docdir="$(inst_docdir)" \
228 prefix="$(prefix)" \
229 build="$(build)" \
230 build_alias="$(build_alias)" \
231 host="$(host)" \
232 host_alias="$(host_alias)" \
233 target="$(target)" \
234 target_alias="$(target_alias)" \
235 TAR="$(TAR)" \
236 TARFLAGS="$(TARFLAGS)" \
237 TARFILEEXT="$(TARFILEEXT)"
239 CRT0S = CRT_noglob.o crtmt.o crtst.o
240 ifneq (,$(findstring mingw32ce,$(host_alias)))
241 CRT0S += crt3.o dllcrt3.o
242 else
243 CRT0S += crt1.o dllcrt1.o crt2.o dllcrt2.o CRT_fp8.o CRT_fp10.o txtmode.o binmode.o
244 endif
246 MINGW_OBJS = CRTglob.o CRTfmode.o CRTinit.o dllmain.o gccmain.o \
247 crtst.o mthr_stub.o \
248 pseudo-reloc.o pseudo-reloc-list.o cpu_features.o
250 ifneq (,$(findstring mingw32ce,$(target_alias)))
251 MINGW_OBJS += winmain_ce.o abort.o atexit.o assert.o
252 else
253 MINGW_OBJS += main.o CRT_fp10.o txtmode.o
254 endif
256 MOLD_OBJS = isascii.o iscsym.o iscsymf.o toascii.o \
257 strcasecmp.o strncasecmp.o wcscmpi.o
259 ifneq (,$(findstring mingw32ce,$(target_alias)))
260 LIBS = libcoredll.a libcoredll6.a \
261 libmingw32.a \
262 libceoldname.a \
263 $(LIBM_A) \
264 libmingwthrd.a
265 else
266 LIBS = libcrtdll.a \
267 libmsvcrt.a libmsvcrtd.a \
268 libmsvcr70.a libmsvcr70d.a \
269 libmsvcr71.a libmsvcr71d.a \
270 libmsvcr80.a libmsvcr80d.a \
271 libmsvcr90.a libmsvcr90d.a \
272 libmingw32.a \
273 libcoldname.a \
274 libmoldname.a libmoldnamed.a \
275 libmoldname70.a libmoldname70d.a \
276 libmoldname71.a libmoldname71d.a \
277 libmoldname80.a libmoldname80d.a \
278 libmoldname90.a libmoldname90d.a \
279 $(LIBM_A) \
280 libmingwthrd.a
281 endif
283 DLLS = $(THREAD_DLL_NAME)
285 INSTDOCS = CONTRIBUTORS \
286 DISCLAIMER \
287 README
289 SRCDIST_FILES = CRT_noglob.c CRTfmode.c CRTglob.c CRTinit.c ChangeLog \
290 Makefile.in README TODO config.guess config.sub configure configure.in \
291 aclocal.m4 crt1.c crtdll.def crtmt.c crtst.c dllcrt1.c dllmain.c \
292 gccmain.c init.c install-sh jamfile main.c mkinstalldirs \
293 moldname.def.in msvcrt.def.in ofmt_stub.s \
294 mthr.c mthr_init.c mthr_stub.c readme.txt \
295 isascii.c iscsym.c iscsymf.c toascii.c \
296 strcasecmp.c strncasecmp.c wcscmpi.c \
297 CRT_fp8.c CRT_fp10.c test_headers.c txtmode.c binmode.c pseudo-reloc.c \
298 pseudo-reloc-list.c cpu_features.c cpu_features.h \
299 DISCLAIMER CONTRIBUTORS
302 all_dlls_host = @all_dlls_host@
303 install_dlls_host = @install_dlls_host@
305 all: $(CRT0S) $(LIBS) $(all_dlls_host)
307 all_dlls_host: $(DLLS)
309 install_dlls_host:
310 for i in $(DLLS); do \
311 $(INSTALL_PROGRAM) $$i $(inst_bindir)/$$i ; \
312 done
314 _libm_dummy.o:
315 rm -f _libm_dummy.c
316 echo "static int __mingw_libm_dummy;" > _libm_dummy.c
317 $(CC) -c $(ALL_CFLAGS) _libm_dummy.c
318 rm -f _libm_dummy.c
320 libm.a: _libm_dummy.o
321 $(AR) rc $@ _libm_dummy.o
322 $(RANLIB) $@
324 libmingwthrd.a: crtmt.o mingwthrd.def
325 $(DLLTOOL) $(DLLTOOL_FLAGS) --dllname $(THREAD_DLL_NAME) \
326 --def mingwthrd.def --output-lib $@
327 $(AR) $(ARFLAGS) $@ crtmt.o
328 $(RANLIB) $@
331 # Special rule because this target has a leading underscore
332 # where others (ARM) do not.
334 ifeq ($(target_alias),i386-mingw32ce)
335 DLLSTARTUPSYM=_DllMainCRTStartup
336 else
337 DLLSTARTUPSYM=DllMainCRTStartup
338 endif
340 DLL_OFILES = mthr.o mthr_init.o
341 DLL_CC_STUFF = -B./ -shared $(MNO_CYGWIN) -Wl,--image-base,0x6FBC0000 \
342 -Wl,--entry,$(DLLSTARTUPSYM) \
343 $(DLL_OFILES) mingwthrd.def \
344 -Lmingwex
346 $(THREAD_DLL_NAME) mingwthrd.def: $(DLL_OFILES) Makefile $(SUBDIRS)
347 $(DLLTOOL) --as $(AS) --output-def mingwthrd.def $(DLL_OFILES)
348 $(CC) $(DLL_CC_STUFF) -o $(THREAD_DLL_NAME)
350 libmingw32.a: $(MINGW_OBJS)
351 $(AR) rc $@ $(MINGW_OBJS)
352 $(RANLIB) $@
354 msvcrt.def msvcrtd.def \
355 msvcr70.def msvcr70d.def \
356 msvcr71.def msvcr71d.def \
357 msvcr80.def msvcr80d.def \
358 msvcr90.def msvcr90d.def: msvcrt.def.in
359 $(CC) -DRUNTIME=$(basename $(notdir $@)) \
360 -D__$(basename $(notdir $@))__=1 \
361 -D__MSVCRT__ -C -E -P \
362 -xc-header $? > $@
364 moldname-crtdll.def: moldname.def.in
365 $(CC) -DRUNTIME=crtdll \
366 -D__FILENAME__=moldname-crtdll.def \
367 -D__CRTDLL__ -C -E -P \
368 -xc-header $? > $@
370 moldname-msvcrt.def: moldname.def.in
371 $(CC) -DRUNTIME=msvcrt \
372 -D__FILENAME__=moldname-msvcrt.def \
373 -D__MSVCRT__ -C -E -P \
374 -xc-header $? > $@
376 moldname-coredll.def: moldname.def.in
377 $(CC) -DRUNTIME=coredll \
378 -D__FILENAME__=moldname-coredll.def \
379 -D__COREDLL__ -C -E -P \
380 -xc-header $? > $@
382 libcoldname.a: moldname-crtdll.def $(MOLD_OBJS)
383 $(DLLTOOL) --as $(AS) -k -U \
384 --dllname crtdll.dll \
385 --def moldname-crtdll.def \
386 --output-lib $@
387 $(AR) rc $@ $(MOLD_OBJS)
388 $(RANLIB) $@
390 libmoldname.a libmoldnamed.a: moldname-msvcrt.def $(MOLD_OBJS)
391 $(DLLTOOL) --as $(AS) -k -U \
392 --dllname msvcrt$(@:libmoldname%a=%)dll \
393 --def moldname-msvcrt.def \
394 --output-lib $@
395 $(AR) rc $@ $(MOLD_OBJS)
396 $(RANLIB) $@
398 libmoldname70.a libmoldname70d.a \
399 libmoldname71.a libmoldname71d.a \
400 libmoldname80.a libmoldname80d.a \
401 libmoldname90.a libmoldname90d.a: moldname-msvcrt.def $(MOLD_OBJS)
402 $(DLLTOOL) --as $(AS) -k -U \
403 --dllname msvcr$(@:libmoldname%a=%)dll \
404 --def moldname-msvcrt.def \
405 --output-lib $@
406 $(AR) rc $@ $(MOLD_OBJS)
407 $(RANLIB) $@
409 libceoldname.a: moldname-coredll.def $(MOLD_OBJS)
410 $(DLLTOOL) --as $(AS) -k -U \
411 --dllname COREDLL.dll \
412 --def moldname-coredll.def \
413 --output-lib $@
414 $(AR) rc $@ $(MOLD_OBJS)
415 $(RANLIB) $@
417 # These special rules are necessary...
419 crt1.o dllcrt1.o:
420 $(CC) -c -D__CRTDLL__ -U__MSVCRT__ $(ALL_CFLAGS) $< -o $@
422 crt2.o dllcrt2.o:
423 $(CC) -c -D__MSVCRT__ -U__CRTDLL__ $(ALL_CFLAGS) $< -o $@
425 crt3.o dllcrt3.o:
426 $(CC) -c -D__COREDLL__ -U__CRTDLL__ -U__MSVCRT__ $(ALL_CFLAGS) $< -o $@
428 check: check-headers
430 TEST_H_OPTIONS = $(ALL_CFLAGS) -Wall -W -Wsystem-headers -c \
431 $(srcdir)/test_headers.c -o test_headers.o
433 .PHONY: check-headers
434 check-headers: force
435 @echo "Testing runtime headers..."
436 @for lang in c c++ objective-c ; do \
437 echo "$$lang ..."; \
438 $(CC) -x$$lang $(TEST_H_OPTIONS) ; \
439 echo "$$lang -ansi"; \
440 $(CC) -x$$lang -ansi $(TEST_H_OPTIONS) ; \
441 done
442 # specify -std=xx only for C
443 @for std in gnu89 gnu99 c89 c99 ; do \
444 echo "std = $$std"; \
445 $(CC) -std=$$std $(TEST_H_OPTIONS) ; \
446 done
448 @rm -f test_headers.o
450 clean:
451 -rm -f *.o *.a *~ core a.out mingwthrd.def mingwthrd.base mingwthrd.exp
452 -rm -f $(THREAD_DLL_NAME) mingwthrd_dummy.exe
453 -rm -f msvcr*.def moldname-*.def
454 @$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
456 distclean: clean
457 @$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
458 -rm -f config.cache config.status config.log
459 -rm -f Makefile
461 ifdef SNAPDATE
462 distdir=$(PACKAGE)-$(VERSION)-$(SNAPDATE)
463 else
464 ifneq (,$(findstring cygwin, $(target_alias)))
465 distdir=$(PACKAGE)-$(VERSION)-$(CYGRELEASE)
466 else
467 distdir=$(PACKAGE)-$(VERSION)-$(host_os)
468 endif
469 endif
471 ifneq (,$(findstring cygwin, $(target_alias)))
473 # FIXME: Dubious use of `target_alias', yet again.
475 # Once more, the default settings for these macros could be
476 # more productively determined by `configure'.
478 TARFLAGS = j
479 TARFILEEXT = .tar.bz2
480 dist_prefix = $(conf_prefix)
481 endif
483 dist: srcdist bindist
485 srcdist:
486 rm -rf $(distdir)
487 mkdir $(distdir)
488 chmod 755 $(distdir)
489 for i in $(SRCDIST_FILES); do \
490 cp -p $(srcdir)/$$i $(distdir)/$$i ; \
491 done
492 for i in $(SUBDIRS); do \
493 (cd $$i; $(MAKE) distdir=../$(distdir) dist); \
494 done
495 #FIXME this needs to be done with SUBDIRS and Makefiles.
497 # Maybe, but this is simpler, and adequate for now!
498 # However, as more manpages are added, spanning multiple sections,
499 # we'll probably need a separate Makefile to organise them.
501 mkdir $(distdir)/include
502 mkdir $(distdir)/include/sys
503 cp $(srcdir)/include/*.h $(distdir)/include/
504 cp $(srcdir)/include/sys/*.h $(distdir)/include/sys/
505 mkdir $(distdir)/man
506 cp $(srcdir)/man/*.man $(distdir)/man/
508 #end FIXME
509 rm -f $(distdir)-src.tar.gz
510 $(TAR) $(TARFLAGS)cf $(distdir)-src$(TARFILEEXT) $(distdir)
512 # Binary package structure is determined according to the
513 # preferred package name assigned at configure time...
515 bindist: bindist-$(PACKAGE)
517 # The directory structure is common to both package styles...
519 bindist-common:
520 rm -rf $(distdir)
521 mkdir $(distdir)
522 chmod 755 $(distdir)
523 $(MAKE) install prefix=$(shell pwd)/$(distdir)$(dist_prefix)
524 rm -f $(distdir).tar.gz
526 # Current MinGW distributions prefer separate `dev' and `dll' bundles,
527 # and use the abbreviated `mingwrt' form for the package name...
529 DEVDIST_FILES = * --exclude=bin
530 DLLDIST_FILES = bin/*.dll doc/*
532 bindist-mingwrt: bindist-common
533 cd $(distdir); \
534 $(TAR) $(TARFLAGS)cf ../$(distdir)-dev$(TARFILEEXT) $(DEVDIST_FILES); \
535 $(TAR) $(TARFLAGS)cf ../$(distdir)-dll$(TARFILEEXT) $(DLLDIST_FILES)
536 rm -rf $(distdir)
538 # However, Cygwin maintainers continue to prefer a composite package,
539 # retaining the older `mingw-runtime' naming convention...
541 BINDIST_FILES = *
543 bindist-mingw-runtime: bindist-common
544 cd $(distdir); \
545 $(TAR) $(TARFLAGS)cf ../$(distdir)$(TARFILEEXT) $(BINDIST_FILES)
546 rm -rf $(distdir)
548 snapshot:
549 make dist SNAPDATE=$(shell date '+%Y%m%d')
551 info:
553 info-html:
555 install-info: info
557 install-dirs:
558 $(mkinstalldirs) $(inst_bindir)
559 $(mkinstalldirs) $(inst_includedir)
560 $(mkinstalldirs) $(inst_libdir)
561 $(mkinstalldirs) $(inst_docdir)
562 $(mkinstalldirs) $(mandir)/man$(mansection)
564 install-headers: install-dirs
565 for sub in . sys ; do \
566 dstdir=$(inst_includedir)/$$sub ; \
567 $(mkinstalldirs) $$dstdir ; \
568 for i in $(srcdir)/include/$$sub/*.h ; do \
569 $(INSTALL_DATA) $$i $$dstdir/`basename $$i` ; \
570 done ; \
571 done
573 install: all install-dirs $(install_dlls_host)
574 for i in $(LIBS); do \
575 $(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
576 done
577 for i in $(CRT0S); do \
578 $(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
579 done
580 for i in $(INSTDOCS); do \
581 $(INSTALL_DATA) $(srcdir)/$$i $(inst_docdir)/$$i ; \
582 done
583 for sub in . sys ; do \
584 dstdir=$(inst_includedir)/$$sub ; \
585 $(mkinstalldirs) $$dstdir ; \
586 for i in $(srcdir)/include/$$sub/*.h ; do \
587 $(INSTALL_DATA) $$i $$dstdir/`basename $$i` ; \
588 done ; \
589 done
591 # This provisional hack installs the only manpage we have at present...
592 # It simply CANNOT suffice, when we have more manpages to ship.
594 $(mkinstalldirs) $(mandir)/man$(mansection)
595 $(INSTALL_DATA) $(srcdir)/man/dirname.man $(mandir)/man$(mansection)/`\
596 echo dirname.man|sed '$(manpage_transform);s,man$$,$(mansection),'`
597 $(INSTALL_DATA) $(srcdir)/man/dirname.man $(mandir)/man$(mansection)/`\
598 echo basename.man|sed '$(manpage_transform);s,man$$,$(mansection),'`
600 # End provisional hack.
602 @$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
604 subdirs: $(SUBDIRS)
605 $(SUBDIRS): force
606 @test -n "$(DO)" && g="$(DO)" || g=all; echo "Making \`$$g' in \`$@'"
607 @cd $@; $(MAKE) $(FLAGS_TO_PASS) $(DO)
609 force:
612 # Dependencies
614 libcoredll.a: coredll.def
615 libcoredll6.a: coredll6.def
616 libcrtdll.a: crtdll.def
617 libmsvcrt.a: msvcrt.def
618 libmsvcrtd.a: msvcrtd.def
619 CRT_noglob.o: CRT_noglob.c
620 CRTfmode.o: CRTfmode.c
621 CRTglob.o: CRTglob.c
622 CRTinit.o: CRTinit.c
623 crt1.o: crt1.c init.c
624 crt2.o: crt1.c init.c
625 crt3.o: crt3.c
626 crtmt.o: crtmt.c
627 crtst.o: crtst.c
628 ctype_old.o: ctype_old.c
629 dllcrt1.o: dllcrt1.c
630 dllcrt2.o: dllcrt1.c
631 dllcrt3.o: dllcrt1.c
632 dllmain.o: dllmain.c
633 main.o: main.c
634 winmain_ce.o: winmain_ce.c
635 oldnames.o: oldnames.c
636 string_old.o: string_old.c
637 CRT_fp8.o: CRT_fp8.c
638 CRT_fp10.o: CRT_fp10.c
639 abort.o: abort.c
640 atexit.o: atexit.c
641 assert.o: assert.c
643 Makefile: Makefile.in config.status configure
644 $(SHELL) config.status
646 config.status: configure
647 $(SHELL) config.status --recheck
649 .SUFFIXES: .y $(SUFFIXES) .cc .def .a
651 sym_prefix = __msvcrt
653 NM_LOOKUP = $(NM) $@ | sed -n \
654 -e '/:$$/h;/^[0-7][0-7]* *T */{s///;H;g;s/\n//p' \
655 -e '}' | sed -n 's/:_'"$$key"'$$//p'
657 MINGW_REPL_FUNCS = printf fprintf sprintf vprintf vfprintf vsprintf
659 # If the .def file specifies an explicit LIBRARY name, then don't
660 # override it with --dllname.
661 lib%.a: %.def
662 grep -q "^LIBRARY " $< 2>&1 1>/dev/null \
663 && $(DLLTOOL) --as=$(AS) -k --output-lib $@ --def $< \
664 || $(DLLTOOL) --as=$(AS) -k --dllname $*.dll --output-lib $@ --def $<
665 for key in $(MINGW_REPL_FUNCS); do \
666 src=`$(NM_LOOKUP)`; \
667 if test -n "$$src"; then \
668 dst=`echo "$$src" | sed 's/0/4/'`; repl="$$repl $$dst"; \
669 tmpfiles="$$tmpfiles $$src $$dst"; \
670 $(AR) x $@ $$src; \
671 $(OBJCOPY) --redefine-sym _$$key=_$(sym_prefix)_$$key \
672 --redefine-sym __imp__$$key=__imp__$(sym_prefix)_$$key \
673 $$src $$dst; \
674 fi; done; \
675 test -n "$$repl" && $(AR) rcs $@ $$repl; \
676 $(RM) $$tmpfiles
678 libmsvcrt.a libmsvcrtd.a: ofmt_stub.o
679 libmsvcr70.a libmsvcr70d.a: ofmt_stub.o
680 libmsvcr71.a libmsvcr71d.a: ofmt_stub.o
681 libcrtdll.a libcrtdlld.a: ofmt_stub.o
683 .c.o:
684 $(CC) -c $(ALL_CFLAGS) $< -o $@
686 # $RCSfile$: end of file