]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/i386/t-cygming
ABOUT-GCC-NLS, [...]: Add copyright and license notices.
[thirdparty/gcc.git] / gcc / config / i386 / t-cygming
CommitLineData
ad41bd84
JM
1# Copyright (C) 2003, 2005, 2008, 2009 Free Software Foundation, Inc.
2#
3# This file is part of GCC.
4#
5# GCC is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3, or (at your option)
8# any later version.
9#
10# GCC is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with GCC; see the file COPYING3. If not see
17# <http://www.gnu.org/licenses/>.
18
70e5e841
CF
19LIB1ASMSRC = i386/cygwin.asm
20LIB1ASMFUNCS = _chkstk
21
22# cygwin and mingw always have a limits.h, but, depending upon how we are
23# doing the build, it may not be installed yet.
24LIMITS_H_TEST = true
25
26# If we are building next to winsup, this will let us find the real
27# limits.h when building libgcc2. Otherwise, winsup must be installed
28# first.
29LIBGCC2_INCLUDES = -I$(srcdir)/../winsup/w32api/include
30
e980df8e
TT
31winnt.o: $(srcdir)/config/i386/winnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
32 $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h output.h $(TREE_H) flags.h \
33 $(TM_P_H) toplev.h $(HASHTAB_H) $(GGC_H)
34 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
35 $(srcdir)/config/i386/winnt.c
70e5e841 36
e980df8e
TT
37winnt-cxx.o: $(srcdir)/config/i386/winnt-cxx.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
38 $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h output.h $(TREE_H) flags.h \
39 $(TM_P_H) toplev.h $(HASHTAB_H) $(GGC_H)
40 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
41 $(srcdir)/config/i386/winnt-cxx.c
43d9ad1d
DS
42
43
e980df8e
TT
44winnt-stubs.o: $(srcdir)/config/i386/winnt-stubs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
45 $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h output.h $(TREE_H) flags.h \
46 $(TM_P_H) toplev.h $(HASHTAB_H) $(GGC_H)
47 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
48 $(srcdir)/config/i386/winnt-stubs.c
49
50msformat-c.o: $(srcdir)/config/i386/msformat-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
51 $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h output.h $(TREE_H) flags.h \
52 $(TM_P_H) toplev.h $(HASHTAB_H) $(GGC_H)
53 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
54 $(srcdir)/config/i386/msformat-c.c
6590fc9f 55
70e5e841 56STMP_FIXINC=stmp-fixinc
d89f0ad6
AL
57
58# Build a shared libgcc library for PECOFF with a DEF file
59# with the GNU linker.
60#
61# mkmap-flat.awk is used with the pe_dll option to produce a DEF instead
62# of an ELF map file.
63#
3cbfaf98
DK
64# Warning: If SHLIB_SOVERSION or SHLIB_SONAME are updated, LIBGCC_SONAME
65# in mingw32.h and SHLIB_MKMAP_OPTS below must be updated also.
d89f0ad6
AL
66
67SHLIB_EXT = .dll
68SHLIB_IMPLIB = @shlib_base_name@.a
69SHLIB_SOVERSION = 1
3cbfaf98 70SHLIB_SONAME = @shlib_base_name@_$(EH_MODEL)-$(SHLIB_SOVERSION)$(SHLIB_EXT)
d89f0ad6
AL
71SHLIB_MAP = @shlib_map_file@
72SHLIB_OBJS = @shlib_objs@
73SHLIB_DIR = @multilib_dir@/shlib
74SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
d89f0ad6 75
3dae586d 76SHLIB_LINK = $(LN_S) -f $(SHLIB_MAP) $(SHLIB_MAP).def && \
d89f0ad6 77 if [ ! -d $(SHLIB_DIR) ]; then \
3cbfaf98 78 mkdir $(SHLIB_DIR); \
d89f0ad6
AL
79 else true; fi && \
80 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
81 $(SHLIB_MAP).def \
82 -Wl,--out-implib,$(SHLIB_DIR)/$(SHLIB_IMPLIB).tmp \
83 -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
84 $(SHLIB_OBJS) $(SHLIB_LC) && \
d89f0ad6
AL
85 if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
86 mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
87 $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
88 else true; fi && \
89 mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
90 mv $(SHLIB_DIR)/$(SHLIB_IMPLIB).tmp $(SHLIB_DIR)/$(SHLIB_IMPLIB)
91# $(slibdir) double quoted to protect it from expansion while building
92# libgcc.mk. We want this delayed until actual install time.
93SHLIB_INSTALL = \
94 $$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
95 $(INSTALL_PROGRAM) $(SHLIB_DIR)/$(SHLIB_SONAME) \
96 $$(DESTDIR)$$(bindir)/$(SHLIB_SONAME); \
97 $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_IMPLIB) \
98 $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_IMPLIB)
99SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
3cbfaf98
DK
100# We'd like to use SHLIB_SONAME here too, but shlib_base_name
101# does not get substituted before mkmap-flat.awk is run.
102SHLIB_MKMAP_OPTS = -v pe_dll=libgcc_s_$(EH_MODEL)-$(SHLIB_SOVERSION)$(SHLIB_EXT)
d89f0ad6 103SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver