1 ## Process this file with automake to produce Makefile.in
5 # Copyright (c) 2000, Red Hat, Inc.
6 # Copyright (c) 2002, Robert Collins
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # A copy of the GNU General Public License can be found at
16 # Written by Christopher Faylor <cgf@redhat.com>
17 # and Robert Collins <rbtcollins@hotmail.com>
19 # Makefile for Cygwin installer
21 AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.6 foreign
22 DIST_SUBDIRS = bz2lib zlib libgetopt++ tests
23 SUBDIRS = bz2lib zlib libgetopt++ @RSYNC@ tests
25 ## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
27 # We would like to use -Winline for C++ as well, but some STL code triggers
28 # this warning. (Bug verified present in gcc-3.3)
29 AM_CXXFLAGS = -Werror -Wall -Wpointer-arith -Wcomments \
30 -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
31 AM_CFLAGS = $(AM_CXXFLAGS) -Wmissing-declarations -Winline
35 INCLUDES = -I$(srcdir)/bz2lib -I$(srcdir)/libgetopt++/include
41 EXTRA_PROGRAMS = inilint
42 ## noinst_PROGRAMS +=inilint
44 # to avoid false errors that assembly generates
45 WARNONLY_CFLAGS = -Winline -Wall -Wpointer-arith -Wcast-align \
46 -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
47 -Wmissing-declarations -Wcomments $(INCLUDES)
60 BUILT_SOURCES = setup_version.c \
80 inilint_LDADD = libgetopt++/libgetopt++.la -luser32 -lkernel32
105 PackageSpecification.cc \
106 PackageSpecification.h \
114 setup_LDADD = res.o zlib/libzcygw.a bz2lib/libbz2.a \
115 libgetopt++/libgetopt++.la \
117 -luser32 -lkernel32 \
118 -lcomctl32 -lole32 -lwsock32 -lnetapi32 -ladvapi32 -luuid
119 setup_LDFLAGS = -mwindows
127 archive_tar_file.cc \
171 IniDBBuilderPackage.cc \
172 IniDBBuilderPackage.h \
176 IniParseFeedback.cc \
178 IniParseFindVisitor.cc \
179 IniParseFindVisitor.h \
183 io_stream_cygfile.cc \
184 io_stream_cygfile.h \
187 io_stream_memory.cc \
231 PackageSpecification.cc \
232 PackageSpecification.h \
234 PickCategoryLine.cc \
287 setup_version.c : $(srcdir)/ChangeLog Makefile
288 V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \
289 | sed -e 's/\$$Revision:* *//' \
291 (echo '#define VERSION_PREFIX "%%% setup-version"';\
292 echo 'static const char version_store[] = VERSION_PREFIX " '$$V'";';\
293 echo 'const char *version = version_store + sizeof (VERSION_PREFIX);') > version.tmp;\
294 mv version.tmp setup_version.c
297 $(WINDRES) --preprocessor "$(CC) -E -xc-header -DRC_INVOKED" --include-dir $(srcdir) -o $@ $<
299 autoload.o: autoload.c
300 @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
301 @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
302 @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
303 $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(WARNONLY_CFLAGS) $(CFLAGS) -c -o $@ $< -fno-inline-functions
306 @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
307 @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
308 @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
309 $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
310 $(AM_CPPFLAGS) $(CPPFLAGS) $(WARNONLY_CFLAGS) $(CXXFLAGS) -c -o $@ $<
312 iniparse.cc iniparse.h : iniparse.y
313 bison -d -o iniparse.cc $(srcdir)/iniparse.y
314 @mv iniparse.cc.h iniparse.h 2>/dev/null || mv iniparse.hh iniparse.h
316 inilex.cc : inilex.l iniparse.h
317 flex -8 $(srcdir)/inilex.l
318 mv lex.yy.c inilex.cc
320 # Make a distribution package and tarball
321 release: setup$(EXEEXT) dist-all $(srcdir)/ChangeLog Makefile
322 $(STRIP) setup.exe && \
323 upx --best setup.exe && \
324 V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \
325 | sed -e 's/\$$Revision:* *//' \
327 mv setup.exe setup-$${V}.exe && \
328 mv setup-0.tar.bz2 setup-$${V}.tar.bz2 && \
329 tar cjf setup-$${V}-1-src.tar.bz2 setup-$${V}.tar.bz2
331 # Create a snapshot and upload it (requires write access)
333 V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \
334 | sed -e 's/\$$Revision:* *//' \
336 scp -C setup-$${V}.exe setup-$${V}.tar.bz2 $${cygwinsite}:setup-snapshots/