Add 2013 to yet more FSF copyright years
[emacs.git] / lib / makefile.w32-in
blob2f6cb3f52a919c12138dcee88bd8f7b2a9e23eb8
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/>.
19 ALL = gnulib
21 .PHONY: $(ALL)
23 LOCAL_FLAGS     = -I. -I../nt/inc -I../src
24 LIBS            =
26 GNULIBOBJS = $(BLD)/c-ctype.$(O) \
27              $(BLD)/c-strcasecmp.$(O) \
28              $(BLD)/c-strncasecmp.$(O) \
29              $(BLD)/dtoastr.$(O) \
30              $(BLD)/dtotimespec.$(O)  \
31              $(BLD)/execinfo.$(O)  \
32              $(BLD)/getopt.$(O)  \
33              $(BLD)/getopt1.$(O) \
34              $(BLD)/gettime.$(O) \
35              $(BLD)/strftime.$(O) \
36              $(BLD)/time_r.$(O) \
37              $(BLD)/timespec-add.$(O) \
38              $(BLD)/timespec-sub.$(O) \
39              $(BLD)/md5.$(O) \
40              $(BLD)/sha1.$(O) \
41              $(BLD)/sha256.$(O) \
42              $(BLD)/sha512.$(O) \
43              $(BLD)/stat-time.$(O) \
44              $(BLD)/timespec.$(O) \
45              $(BLD)/u64.$(O) \
46              $(BLD)/filemode.$(O)
49 # Build the library
51 $(BLD)/libgnu.$(A):     $(GNULIBOBJS)
52         - $(DEL) $@
53         $(AR) $(AR_OUT)$@ $(ALL_DEPS)
55 gnulib:         $(BLD)/libgnu.$(A)
58 # Build everything
60 all:            $(ALL)
62 ### TAGS ###
64 FRC:
66 TAGS: FRC
67          ../lib-src/$(BLD)/etags.exe *.c *.h
69 ### DEPENDENCIES ###
71 EMACS_ROOT      = ..
72 GNU_LIB         = .
73 SRC             = $(EMACS_ROOT)/src
74 NT_INC          = $(EMACS_ROOT)/nt/inc
76 C_CTYPE_H      = $(GNU_LIB)/c-ctype.h \
77                  $(NT_INC)/stdbool.h
78 MS_W32_H       = $(NT_INC)/ms-w32.h \
79                  $(NT_INC)/sys/stat.h
80 CONF_POST_H    = $(SRC)/conf_post.h \
81                  $(MS_W32_H)
82 CONFIG_H       = $(SRC)/config.h \
83                  $(CONF_POST_H)
84 FILEMODE_H     = $(GNU_LIB)/filemode.h \
85                  $(NT_INC)/sys/stat.h
86 FTOASTR_H      = $(GNU_LIB)/ftoastr.h \
87                  $(GNU_LIB)/intprops.h
88 FTOASTR_C      = $(GNU_LIB)/ftoastr.c \
89                  $(CONFIG_H) \
90                  $(FTOASTR_H)
91 GETOPT_INT_H   = $(GNU_LIB)/getopt_int.h \
92                  $(GNU_LIB)/getopt.h
93 MD5_H          = $(GNU_LIB)/md5.h \
94                  $(NT_INC)/stdint.h
95 SHA1_H         = $(GNU_LIB)/sha1.h \
96                  $(NT_INC)/stdint.h
97 SHA256_H       = $(GNU_LIB)/sha256.h \
98                  $(NT_INC)/stdint.h
99 U64_H          = $(GNU_LIB)/u64.h \
100                  $(NT_INC)/stdint.h
101 SHA512_H       = $(GNU_LIB)/sha512.h \
102                  $(U64_H)
103 STAT_TIME_H    = $(GNU_LIB)/stat-time.h \
104                  $(NT_INC)/sys/stat.h
106 $(BLD)/c-ctype.$(O) : \
107         $(GNU_LIB)/c-ctype.c \
108         $(CONFIG_H) \
109         $(C_CTYPE_H)
111 $(BLD)/c-strcasecmp.$(O) : \
112         $(GNU_LIB)/c-strcasecmp.c \
113         $(GNU_LIB)/c-strcase.h \
114         $(CONFIG_H) \
115         $(C_CTYPE_H)
117 $(BLD)/c-strncasecmp.$(O) : \
118         $(GNU_LIB)/c-strncasecmp.c \
119         $(GNU_LIB)/c-strcase.h \
120         $(CONFIG_H) \
121         $(C_CTYPE_H)
123 $(BLD)/dtoastr.$(O) : \
124         $(GNU_LIB)/dtoastr.c \
125         $(FTOASTR_C)
127 $(BLD)/dtotimespec.$(O) : \
128         $(GNU_LIB)/dtotimespec.c \
129         $(GNU_LIB)/intprops.h \
130         $(GNU_LIB)/timespec.h \
131         $(CONFIG_H)
133 $(BLD)/execinfo.$(O) : \
134         $(GNU_LIB)/execinfo.c \
135         $(GNU_LIB)/execinfo.h \
136         $(CONFIG_H)
138 $(BLD)/getopt.$(O) : \
139         $(GNU_LIB)/getopt.c \
140         $(GNU_LIB)/getopt.h \
141         $(GNU_LIB)/gettext.h \
142         $(NT_INC)/unistd.h \
143         $(CONFIG_H) \
144         $(GETOPT_INT_H)
146 $(BLD)/getopt1.$(O) : \
147         $(GNU_LIB)/getopt1.c \
148         $(GNU_LIB)/getopt.h \
149         $(CONFIG_H) \
150         $(GETOPT_INT_H)
152 $(BLD)/gettime.$(O) : \
153         $(GNU_LIB)/gettime.c \
154         $(GNU_LIB)/timespec.h \
155         $(NT_INC)/sys/time.h \
156         $(CONFIG_H)
158 $(BLD)/strftime.$(O) : \
159         $(GNU_LIB)/strftime.c \
160         $(GNU_LIB)/strftime.h \
161         $(NT_INC)/stdbool.h \
162         $(CONFIG_H)
164 $(BLD)/time_r.$(O) : \
165         $(GNU_LIB)/time_r.c \
166         $(CONFIG_H)
168 $(BLD)/timespec-add.$(O) : \
169         $(GNU_LIB)/timespec-add.c \
170         $(GNU_LIB)/intprops.h \
171         $(GNU_LIB)/timespec.h \
172         $(CONFIG_H)
174 $(BLD)/timespec-sub.$(O) : \
175         $(GNU_LIB)/timespec-sub.c \
176         $(GNU_LIB)/intprops.h \
177         $(GNU_LIB)/timespec.h \
178         $(CONFIG_H)
180 $(BLD)/md5.$(O) : \
181         $(GNU_LIB)/md5.c \
182         $(NT_INC)/stdalign.h \
183         $(NT_INC)/stdint.h \
184         $(CONFIG_H) \
185         $(MD5_H)
187 $(BLD)/sha1.$(O) : \
188         $(GNU_LIB)/sha1.c \
189         $(NT_INC)/stdalign.h \
190         $(NT_INC)/stdint.h \
191         $(CONFIG_H) \
192         $(SHA1_H)
194 $(BLD)/sha256.$(O) : \
195         $(GNU_LIB)/sha256.c \
196         $(NT_INC)/stdalign.h \
197         $(NT_INC)/stdint.h \
198         $(CONFIG_H) \
199         $(SHA256_H)
201 $(BLD)/sha512.$(O) : \
202         $(GNU_LIB)/sha512.c \
203         $(NT_INC)/stdalign.h \
204         $(NT_INC)/stdint.h \
205         $(CONFIG_H) \
206         $(SHA512_H)
208 $(BLD)/stat-time.$(O) : \
209         $(GNU_LIB)/stat-time.c \
210         $(CONFIG_H) \
211         $(STAT_TIME_H)
213 $(BLD)/timespec.$(O) : \
214         $(GNU_LIB)/timespec.c \
215         $(GNU_LIB)/timespec.h \
216         $(CONFIG_H)
218 $(BLD)/u64.$(O) : \
219         $(GNU_LIB)/u64.c \
220         $(CONFIG_H) \
221         $(U64_H)
223 $(BLD)/filemode.$(O) : \
224         $(GNU_LIB)/filemode.c \
225         $(CONFIG_H) \
226         $(FILEMODE_H)
228 # The following dependencies are for supporting parallel builds, where
229 # we must make sure $(BLD) exists before any compilation starts.
231 $(GNULIBOBJS): stamp_BLD
234 # Headers we would preprocess if we could.
236 getopt.h:       getopt_.h
237         $(CP) $(ALL_DEPS) $@
240 # Maintenance
242 clean:
243         - $(DEL) $(COMPILER_TEMP_FILES)
244         - $(DEL) getopt.h
245         - $(DEL_TREE) $(OBJDIR)
246         - $(DEL) stamp_BLD
248 distclean:      cleanall
249         - $(DEL) TAGS
250         - $(DEL) Makefile
252 maintainer-clean: distclean
253         - $(DEL) getopt_.h
255 cleanall:       clean
256         - $(DEL_TREE) obj
257         - $(DEL_TREE) obj-spd
258         - $(DEL_TREE) oo
259         - $(DEL_TREE) oo-spd
261 # A dummy target to force other targets to be evaluated.
262 doit:
264 getopt_.h: getopt.in.h $(ARG_NONNULL_H)
265         $(MAKE) $(MFLAGS) getopt_.h-$(SHELLTYPE)
267 getopt_.h-CMD: doit
268         @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h.
269         @echo Run "$(MAKETYPE) getopt_h" in the lib/ subdirectory.
270         @echo You will need GNU Sed to be installed.
271         exit -1
273 getopt_.h-SH: doit
274         @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h.
275         @echo Run '"$(MAKETYPE) getopt_h"' in the lib/ subdirectory.
276         @echo You will need GNU Sed to be installed.
277         exit -1
279 # Generating getopt_.h from getopt.in.h.
281 # To avoid requiring all end users to install Sed, we have below
282 # a maintainer-only target that produces getopt_.h from getopt.in.h.
283 # For easier maintenance, all the strings that replace the @FOO@
284 # placeholder are defined as Make macros below.
286 HAVE_GETOPT_H = HAVE_GETOPT_H
287 INCLUDE_NEXT = include_next
288 PRAGMA_COLUMNS =
289 NEXT_GETOPT_H = <getopt.h>
290 ARG_NONNULL_H = ../build-aux/snippet/arg-nonnull.h
292 getopt_h:
293         - $(DEL) getopt_.h-t getopt_.h
294         sed -e "s!@GUARD_PREFIX@!GL!g" \
295             -e "s!@HAVE_GETOPT_H@!$(HAVE_GETOPT_H)!g" \
296             -e "s!@INCLUDE_NEXT@!$(INCLUDE_NEXT)!g" \
297             -e "s!@PRAGMA_SYSTEM_HEADER@!$(PRAGMA_SYSTEM_HEADER)!g" \
298             -e "s!@PRAGMA_COLUMNS@!$(PRAGMA_COLUMNS)!g" \
299             -e "s!@NEXT_GETOPT_H@!$(NEXT_GETOPT_H)!g" \
300             -e "/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)" \
301             -e "/^\# include_next/i # ifndef __GNUC__" \
302             -e "/^\# include_next/i # include <next_getopt.h>" \
303             -e "/^\# include_next/i # else" \
304             -e "/^\# include_next/a # endif" \
305               < getopt.in.h > getopt_.h-t
306         $(CP) getopt_.h-t getopt_.h
307         - $(DEL) getopt_.h-t
309 execinfo.h: execinfo.in.h
310         $(CP) execinfo.in.h $@