1 # -*- Makefile -*- for GNU Emacs on the Microsoft Windows API.
2 # Copyright (C) 2011-2013 Free Software Foundation, Inc.
4 # This file is part of GNU Emacs.
6 # GNU Emacs is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # GNU Emacs is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
23 LOCAL_FLAGS = -I. -I../nt/inc -I../src
26 GNULIBOBJS = $(BLD)/acl-errno-valid.$(O) \
28 $(BLD)/c-strcasecmp.$(O) \
29 $(BLD)/c-strncasecmp.$(O) \
30 $(BLD)/close-stream.$(O) \
32 $(BLD)/dtotimespec.$(O) \
33 $(BLD)/execinfo.$(O) \
34 $(BLD)/fpending.$(O) \
39 $(BLD)/strftime.$(O) \
41 $(BLD)/timespec-add.$(O) \
42 $(BLD)/timespec-sub.$(O) \
48 $(BLD)/stat-time.$(O) \
49 $(BLD)/timespec.$(O) \
56 $(BLD)/libgnu.$(A): $(GNULIBOBJS)
58 $(AR) $(AR_OUT)$@ $(ALL_DEPS)
60 gnulib: $(BLD)/libgnu.$(A)
72 ../lib-src/$(BLD)/etags.exe *.c *.h
78 SRC = $(EMACS_ROOT)/src
79 NT_INC = $(EMACS_ROOT)/nt/inc
81 C_CTYPE_H = $(GNU_LIB)/c-ctype.h \
83 MS_W32_H = $(NT_INC)/ms-w32.h \
85 CONF_POST_H = $(SRC)/conf_post.h \
87 CONFIG_H = $(SRC)/config.h \
89 FILEMODE_H = $(GNU_LIB)/filemode.h \
91 FTOASTR_H = $(GNU_LIB)/ftoastr.h \
93 FTOASTR_C = $(GNU_LIB)/ftoastr.c \
96 GETOPT_INT_H = $(GNU_LIB)/getopt_int.h \
98 MD5_H = $(GNU_LIB)/md5.h \
100 SHA1_H = $(GNU_LIB)/sha1.h \
102 SHA256_H = $(GNU_LIB)/sha256.h \
104 U64_H = $(GNU_LIB)/u64.h \
106 SHA512_H = $(GNU_LIB)/sha512.h \
108 SIG2STR_H = $(GNU_LIB)/sig2str.h \
109 $(GNU_LIB)/intprops.h
110 STAT_TIME_H = $(GNU_LIB)/stat-time.h \
113 $(BLD)/acl-errno-valid.$(O) : \
114 $(GNU_LIB)/acl-errno-valid.c \
119 $(BLD)/c-ctype.$(O) : \
120 $(GNU_LIB)/c-ctype.c \
124 $(BLD)/c-strcasecmp.$(O) : \
125 $(GNU_LIB)/c-strcasecmp.c \
126 $(GNU_LIB)/c-strcase.h \
130 $(BLD)/c-strncasecmp.$(O) : \
131 $(GNU_LIB)/c-strncasecmp.c \
132 $(GNU_LIB)/c-strcase.h \
136 $(BLD)/close-stream.$(O) : \
137 $(GNU_LIB)/close-stream.c \
138 $(GNU_LIB)/close-stream.h \
139 $(GNU_LIB)/fpending.h \
140 $(NT_INC)/stdbool.h \
143 $(BLD)/dtoastr.$(O) : \
144 $(GNU_LIB)/dtoastr.c \
147 $(BLD)/dtotimespec.$(O) : \
148 $(GNU_LIB)/dtotimespec.c \
149 $(GNU_LIB)/intprops.h \
150 $(GNU_LIB)/timespec.h \
153 $(BLD)/execinfo.$(O) : \
154 $(GNU_LIB)/execinfo.c \
155 $(GNU_LIB)/execinfo.h \
158 $(BLD)/fpending.$(O) : \
159 $(GNU_LIB)/fpending.c \
160 $(GNU_LIB)/fpending.h \
163 $(BLD)/getopt.$(O) : \
164 $(GNU_LIB)/getopt.c \
165 $(GNU_LIB)/getopt.h \
166 $(GNU_LIB)/gettext.h \
171 $(BLD)/getopt1.$(O) : \
172 $(GNU_LIB)/getopt1.c \
173 $(GNU_LIB)/getopt.h \
177 $(BLD)/gettime.$(O) : \
178 $(GNU_LIB)/gettime.c \
179 $(GNU_LIB)/timespec.h \
180 $(NT_INC)/sys/time.h \
183 $(BLD)/strftime.$(O) : \
184 $(GNU_LIB)/strftime.c \
185 $(GNU_LIB)/strftime.h \
186 $(NT_INC)/stdbool.h \
189 $(BLD)/time_r.$(O) : \
190 $(GNU_LIB)/time_r.c \
193 $(BLD)/timespec-add.$(O) : \
194 $(GNU_LIB)/timespec-add.c \
195 $(GNU_LIB)/intprops.h \
196 $(GNU_LIB)/timespec.h \
199 $(BLD)/timespec-sub.$(O) : \
200 $(GNU_LIB)/timespec-sub.c \
201 $(GNU_LIB)/intprops.h \
202 $(GNU_LIB)/timespec.h \
207 $(NT_INC)/stdalign.h \
212 $(BLD)/memrchr.$(O) : \
213 $(GNU_LIB)/memrchr.c \
218 $(NT_INC)/stdalign.h \
223 $(BLD)/sha256.$(O) : \
224 $(GNU_LIB)/sha256.c \
225 $(NT_INC)/stdalign.h \
230 $(BLD)/sha512.$(O) : \
231 $(GNU_LIB)/sha512.c \
232 $(NT_INC)/stdalign.h \
237 $(BLD)/stat-time.$(O) : \
238 $(GNU_LIB)/stat-time.c \
242 $(BLD)/timespec.$(O) : \
243 $(GNU_LIB)/timespec.c \
244 $(GNU_LIB)/timespec.h \
252 $(BLD)/filemode.$(O) : \
253 $(GNU_LIB)/filemode.c \
257 $(BLD)/sig2str.$(O) : \
258 $(GNU_LIB)/sig2str.c \
263 # The following dependencies are for supporting parallel builds, where
264 # we must make sure $(BLD) exists before any compilation starts.
266 $(GNULIBOBJS): stamp_BLD
269 # Headers we would preprocess if we could.
278 - $(DEL) $(COMPILER_TEMP_FILES)
280 - $(DEL_TREE) $(OBJDIR)
287 maintainer-clean: distclean
292 - $(DEL_TREE) obj-spd
296 # A dummy target to force other targets to be evaluated.
299 getopt_.h: getopt.in.h $(ARG_NONNULL_H)
300 $(MAKE) $(MFLAGS) getopt_.h-$(SHELLTYPE)
303 @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h.
304 @echo Run "$(MAKETYPE) getopt_h" in the lib/ subdirectory.
305 @echo You will need GNU Sed to be installed.
309 @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h.
310 @echo Run '"$(MAKETYPE) getopt_h"' in the lib/ subdirectory.
311 @echo You will need GNU Sed to be installed.
314 # Generating getopt_.h from getopt.in.h.
316 # To avoid requiring all end users to install Sed, we have below
317 # a maintainer-only target that produces getopt_.h from getopt.in.h.
318 # For easier maintenance, all the strings that replace the @FOO@
319 # placeholder are defined as Make macros below.
321 HAVE_GETOPT_H = HAVE_GETOPT_H
322 INCLUDE_NEXT = include_next
324 NEXT_GETOPT_H = <getopt.h>
325 ARG_NONNULL_H = ../build-aux/snippet/arg-nonnull.h
328 - $(DEL) getopt_.h-t getopt_.h
329 sed -e "s!@GUARD_PREFIX@!GL!g" \
330 -e "s!@HAVE_GETOPT_H@!$(HAVE_GETOPT_H)!g" \
331 -e "s!@INCLUDE_NEXT@!$(INCLUDE_NEXT)!g" \
332 -e "s!@PRAGMA_SYSTEM_HEADER@!$(PRAGMA_SYSTEM_HEADER)!g" \
333 -e "s!@PRAGMA_COLUMNS@!$(PRAGMA_COLUMNS)!g" \
334 -e "s!@NEXT_GETOPT_H@!$(NEXT_GETOPT_H)!g" \
335 -e "/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)" \
336 -e "/^\# include_next/i # ifndef __GNUC__" \
337 -e "/^\# include_next/i # include <next_getopt.h>" \
338 -e "/^\# include_next/i # else" \
339 -e "/^\# include_next/a # endif" \
340 < getopt.in.h > getopt_.h-t
341 $(CP) getopt_.h-t getopt_.h
344 execinfo.h: execinfo.in.h
345 $(CP) execinfo.in.h $@