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++ 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 BASECXXFLAGS = -Wall -Wpointer-arith -Wcomments -Wcast-align -Wwrite-strings
30 AM_CXXFLAGS = -Werror $(BASECXXFLAGS)
31 AM_CFLAGS = $(AM_CXXFLAGS) -Wmissing-declarations -Winline \
32 -Wstrict-prototypes -Wmissing-prototypes
36 INCLUDES = -I$(srcdir)/bz2lib -I$(srcdir)/libgetopt++/include
42 EXTRA_PROGRAMS = inilint
43 ## noinst_PROGRAMS +=inilint
56 BUILT_SOURCES = setup_version.c \
68 inilint_LDADD = libgetopt++/libgetopt++.la -luser32 -lkernel32
93 PackageSpecification.cc \
94 PackageSpecification.h \
102 # Obviously we are not really building a program called warnonly
103 # However, this dance was the most non-invasive way I could find
104 # of varying CFLAGS for a single file
105 EXTRA_PROGRAMS += warnonly
106 warnonly_CXXFLAGS = $(BASECXXFLAGS)
107 warnonly_SOURCES = inilex.cc
108 EXTRA_setup_SOURCES = $(warnonly_SOURCES)
110 setup_LDADD = warnonly-inilex.o res.o \
111 zlib/libzcygw.a bz2lib/libbz2.a libgetopt++/libgetopt++.la \
112 -luser32 -lkernel32 \
113 -lcomctl32 -lole32 -lwsock32 -lnetapi32 -ladvapi32 -luuid
114 setup_LDFLAGS = -mwindows
122 archive_tar_file.cc \
134 ConnectionSetting.cc \
135 ConnectionSetting.h \
168 IniDBBuilderPackage.cc \
169 IniDBBuilderPackage.h \
172 IniParseFeedback.cc \
174 IniParseFindVisitor.cc \
175 IniParseFindVisitor.h \
179 io_stream_cygfile.cc \
180 io_stream_cygfile.h \
183 io_stream_memory.cc \
227 PackageSpecification.cc \
228 PackageSpecification.h \
230 PickCategoryLine.cc \
282 setup_version.c : $(srcdir)/ChangeLog Makefile
283 V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
284 $(srcdir)/ChangeLog` ;\
285 (echo '#define VERSION_PREFIX "%%% setup-version"';\
286 echo 'static const char version_store[] = VERSION_PREFIX " '$$V'";';\
287 echo 'const char *version = version_store + sizeof (VERSION_PREFIX);') > version.tmp;\
288 mv version.tmp setup_version.c
291 $(WINDRES) --preprocessor "$(CC) -E -xc-header -DRC_INVOKED" --include-dir $(srcdir) -o $@ $<
293 iniparse.cc iniparse.h : iniparse.y
294 bison -d -o iniparse.cc $(srcdir)/iniparse.y
295 @mv iniparse.cc.h iniparse.h 2>/dev/null || mv iniparse.hh iniparse.h
297 inilex.cc : inilex.l iniparse.h
298 flex -8 $(srcdir)/inilex.l
299 mv lex.yy.c inilex.cc
301 # Make a distribution package and tarball
302 release: setup$(EXEEXT) dist-all $(srcdir)/ChangeLog Makefile
303 $(STRIP) setup.exe && \
304 upx --best setup.exe && \
305 V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
306 $(srcdir)/ChangeLog` ;\
307 mv setup.exe setup-$${V}.exe && \
308 mv setup-0.tar.bz2 setup-$${V}.tar.bz2 && \
309 tar cjf setup-$${V}-1-src.tar.bz2 setup-$${V}.tar.bz2
311 # Create a snapshot and upload it (requires write access)
313 V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
314 $(srcdir)/ChangeLog` ;\
315 scp -C setup-$${V}.exe setup-$${V}.tar.bz2 $${cygwinsite}:setup-snapshots/