OSDN Git Service

Enable to track git://github.com/monaka/binutils.git
[pf3gnuchains/pf3gnuchains3x.git] / winsup / w32api / Makefile.in
1 #
2 #       Makefile.in
3 #
4 #       This file is part of a free library for the Win32 API.
5
6 #       This library is distributed in the hope that it will be useful,
7 #       but WITHOUT ANY WARRANTY; without even the implied warranty of
8 #       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
10 # start config section
11
12 SHELL = @SHELL@
13
14 srcdir = @srcdir@
15 VPATH = @srcdir@
16
17 build_alias = @build@
18 host_alias = @host@
19 target_alias = @target@
20 prefix = @prefix@
21 conf_prefix = @prefix@
22 # FIXME: this needs an appropriate AC_SUBST
23 host_os = mingw32
24
25 program_transform_name = @program_transform_name@
26 exec_prefix = @exec_prefix@
27 bindir = @bindir@
28 libdir = @libdir@
29 tooldir = $(exec_prefix)/$(target_alias)
30 datadir = @datadir@
31 infodir = @infodir@
32 includedir = @includedir@
33
34 CC = @CC@
35 CC_FOR_TARGET = $(CC)
36 CFLAGS = @CFLAGS@
37
38 DLLTOOL = @DLLTOOL@
39 AS = @AS@
40 AS_FOR_TARGET = $(AS_FOR_TARGET)
41 WINDRES = @WINDRES@
42
43 RANLIB = @RANLIB@
44 AR = @AR@
45 LD = @LD@
46
47 TAR = tar
48 TARFLAGS = z
49 TARFILEEXT = .tar.gz
50
51 FLAGS_TO_PASS = \
52         AS="$(AS)" \
53         CC="$(CC)" \
54         CPPFLAGS="$(CPPFLAGS)" \
55         CFLAGS="$(CFLAGS)" \
56         CXXFLAGS="$(CXXFLAGS)" \
57         AR="$(AR)" \
58         RANLIB="$(RANLIB)" \
59         LD="$(LD)" \
60         DLLTOOL="$(DLLTOOL)" \
61         TAR="$(TAR)" \
62         TARFLAGS="$(TARFLAGS)" \
63         TARFILEEXT="$(TARFILEEXT)" \
64         WINDRES="$(WINDRES)"
65
66 # end config section
67
68 SUBDIRS = lib
69
70 PACKAGE = w32api
71 VERSION = 3.14
72 CYGRELEASE = 1
73
74 DIST_FILES = Makefile.in configure.in configure config.guess config.sub \
75 aclocal.m4 install-sh README.w32api ChangeLog TODO CONTRIBUTIONS
76
77 all: lib
78
79 %-subdirs:
80         for i in $(SUBDIRS); do \
81           $(MAKE) $(FLAGS_TO_PASS) -C $$i $*; \
82         done
83
84 lib:
85         $(MAKE) $(FLAGS_TO_PASS) -C $@
86
87 test:
88         $(MAKE) -C lib test $(FLAGS_TO_PASS)
89
90 install uninstall:
91         for i in $(SUBDIRS); do \
92                 (cd $$i; $(MAKE) $@ $(FLAGS_TO_PASS)); \
93         done
94
95 ifdef SNAPDATE
96     distdir = $(PACKAGE)-$(VERSION)-$(SNAPDATE)-$(host_os)
97 else
98    ifneq (,$(findstring cygwin, $(target_alias)))
99       distdir=$(PACKAGE)-$(VERSION)-$(CYGRELEASE)
100    else
101       distdir=$(PACKAGE)-$(VERSION)-$(host_os)
102    endif
103 endif
104
105 ifneq (,$(findstring mingw, $(target_alias)))
106     dist_prefix=
107 else
108     dist_prefix=/$(conf_prefix)
109 endif
110
111 ifneq (,$(findstring cygwin, $(target_alias)))
112   TARFLAGS = j
113   TARFILEEXT = .tar.bz2
114 endif
115
116 dist: srcdist bindist
117
118 srcdist:
119         rm -rf $(distdir)
120         mkdir $(distdir)
121         chmod 755 $(distdir)
122         for i in $(DIST_FILES); do \
123                 cp -p $(srcdir)/$$i $(distdir)/$$i ; \
124         done
125         for i in $(SUBDIRS); do \
126                 (cd $$i; $(MAKE) distdir=../$(distdir) dist); \
127         done
128         rm -f $(distdir)-src$(TARFILEEXT)
129         $(TAR) $(TARFLAGS)cf $(distdir)-src$(TARFILEEXT) $(distdir)
130
131 ifneq (,$(findstring cygwin, $(target_alias)))
132 bindist:
133         rm -rf $(distdir)
134         mkdir $(distdir)
135         chmod 755 $(distdir)
136         $(MAKE) install prefix=`pwd`/$(distdir)$(dist_prefix) exec_prefix=`pwd`/$(distdir)$(dist_prefix)
137         rm -f $(distdir)$(TARFILEEXT)
138         cd $(distdir); $(TAR) $(TARFLAGS)cf ../$(distdir)$(TARFILEEXT) *
139 else
140 bindist:
141         rm -rf $(distdir)
142         mkdir $(distdir)
143         chmod 755 $(distdir)
144         $(MAKE) install prefix=`pwd`/$(distdir)$(dist_prefix) exec_prefix=`pwd`/$(distdir)$(dist_prefix)
145         rm -f $(distdir)$(TARFILEEXT)
146         cd $(distdir); $(TAR) $(TARFLAGS)cf ../$(distdir)-dev$(TARFILEEXT) *
147 endif
148
149 snapshot:
150         make dist SNAPDATE=$(shell date '+%Y%m%d')
151
152 Makefile: Makefile.in config.status configure
153         $(SHELL) config.status
154
155 mostlyclean-top:
156         rm -f *~
157 clean-top: mostlyclean-top
158         rm -rf $(distdir)
159         rm -f $(distdir)*$(TARFILEEXT)
160 maintainer-clean-top:
161
162 mostlyclean: mostlyclean-top mostlyclean-subdirs
163 clean: mostlyclean-top clean-subdirs
164 distclean: clean-top
165         $(MAKE) -C lib/directx distclean
166         $(MAKE) -C lib/ddk distclean
167         $(MAKE) -C lib distclean
168         rm -f Makefile config.status config.log config.cache TAGS *~
169 maintainer-clean: maintainer-clean-subdirs
170
171 .PHONY: lib test