1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
# @configure_input@
#
#
# Makefile.comm.in
#
# This file is part of a free library for the Win32 API.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
#
# Establish the default build rule early, to ensure it is not
# hijacked by any other common rule defined herein; note that
# this requires us to specify the real default rule using the
# alternative name, 'all-default'.
#
all: all-default
SHELL = @SHELL@
host_alias = @host@
build_alias = @build@
target_alias = @target@
with_cross_host = @with_cross_host@
# Identify the tools required to build the package.
# Note that we don't specify associated option flags here,
# since different settings may be required in individual
# makefiles which include this common fragment.
#
CC = @CC@
AS = @AS@
LD = @LD@
CFLAGS = @CFLAGS@
ALL_CFLAGS = $(CFLAGS) $(INCLUDES)
EXTRA_INCLUDES = -nostdinc -iwithprefix include @EXTRA_INCLUDES@
DLLTOOL = @DLLTOOL@
DLLTOOL_FLAGS = --as=$(AS) -k
WINDRES = @WINDRES@
RANLIB = @RANLIB@
AR = @AR@
# In spite of its general unsuitability for use on MS-Windows hosts,
# Cygwin is able to, and likes to support the $(DESTDIR) capability;
# provide a graceful rejection mechanism, for any (non-Cygwin) cases
# where it cannot be used.
#
need-DESTDIR-compatibility = prefix libdir includedir
.PHONY: $(need-DESTDIR-compatibility) fail-DESTDIR-compatibility
$(need-DESTDIR-compatibility):
@test -z "$(DESTDIR)" || case "$($@)" in ?:*) \
$(MAKE) --no-print-directory reject="$@" fail-DESTDIR-compatibility ;; \
esac
fail-DESTDIR-compatibility:
$(error DESTDIR is not supported when $(reject) contains Win32 path `$($(reject))'; \
try `make install $(reject)=$(shell echo '$($(reject))' | sed s,:,:$(DESTDIR),) ...' instead)
# Define the set of generic build rules, which are common to
# the build processes for all subdirectories.
#
%.o: %.c
$(CC) -c $(ALL_CFLAGS) -o $@ $<
lib%.a : %.def %.o
$(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def ${srcdir}/$*.def
$(AR) r $@ $*.o
$(RANLIB) $@
lib%.a: %.def
$(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $<
lib%.a: %.o
$(AR) rc $@ $*.o
$(RANLIB) $@
# Install headers and libraries in a target specified directory.
#
mkinstalldirs = @MKDIR_P@
prefix = @prefix@
exec_prefix = @exec_prefix@
ifeq ($(target_alias),$(host_alias))
ifeq ($(build_alias),$(host_alias))
tooldir = ${exec_prefix}
else
tooldir = ${exec_prefix}/$(target_alias)
endif
else
tooldir = ${exec_prefix}/$(target_alias)
endif
ifneq (,$(findstring cygwin,$(target_alias)))
inst_includedir = $(tooldir)/include/w32api
inst_libdir = $(tooldir)/lib/w32api
else
ifneq (,$(with_cross_host))
inst_includedir = $(tooldir)/include/w32api
inst_libdir = $(tooldir)/lib
else
inst_includedir = @includedir@
inst_libdir = @libdir@
endif
endif
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
# The "clean" class of rules is common to all subdirs.
#
mostlyclean:
rm -f *~ *.o *.s
clean:
rm -f *.o *.a *.s *~
distclean: clean
rm -f config.cache config.status config.log Makefile
maintainer-clean: distclean
# Rules for rebuilding makefiles in sub-directories:
#
# Each of these should be rebuilt when its own Makefile.in is modified,
# or when ${top_builddir}/config.status is updated. Rebuilding is achieved
# by running ${top_builddir}/config.status, with ${top_builddir} as CWD; as
# a side effect this also rebuilds all other makefiles in the package tree.
# In particular, it causes ${top_builddir}/Makefile.comm.in to be rebuilt,
# BEFORE any sub-directory specific Makefile is updated.
#
# Since ${top_builddir}/Makefile.comm is also required by each individual
# sub-directory Makefile, and since all sub-directory makefiles are ALWAYS
# updated along with ${top_builddir}/Makefile.comm, we may simply declare
# the dependency...
#
Makefile: ${top_builddir}/Makefile.comm
# ...then by adding Makefile.in as an artificial prerequisite of this,
# together with its own real dependence on ${top_builddir}/config.status
# and ${top_srcdir}/Makefile.comm.in, we can simply rely on the mutually
# effective rebuilding side effects to update both the subdirectory's own
# Makefile, and ${top_builddir}/Makefile.comm, in a single operation.
#
${top_builddir}/Makefile.comm: ${top_builddir}/config.status
${top_builddir}/Makefile.comm: Makefile.in ${top_srcdir}/Makefile.comm.in
cd ${top_builddir} && $(SHELL) config.status
# ${top_builddir}/config.status must itself be updated, at any time when
# ${top_srcdir}/configure has been modified; this is a distinct operation
# from the rebuilding of makefiles.
#
${top_builddir}/config.status: ${top_srcdir}/configure
cd ${top_builddir} && $(SHELL) config.status --recheck
# Makefile.comm.in: end of file
|