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 = libgetopt++ tests
23 SUBDIRS = 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 # -Wno-uninitialized added to deal with g++ 3.4.4's spurious STL warnings
30 # (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22207)
31 BASECXXFLAGS = -Wall -Wno-uninitialized -Wpointer-arith -Wcomments \
32 -Wcast-align -Wwrite-strings
33 AM_CXXFLAGS = -Werror $(BASECXXFLAGS)
34 AM_CFLAGS = $(AM_CXXFLAGS) -Wmissing-declarations -Winline \
35 -Wstrict-prototypes -Wmissing-prototypes
39 INCLUDES = -I$(srcdir)/libgetopt++/include -I/usr/include/mingw
45 EXTRA_PROGRAMS = inilint
46 ## noinst_PROGRAMS +=inilint
63 libmd5-rfc/md5main.c \
68 BUILT_SOURCES = setup_version.c \
80 inilint_LDADD = libgetopt++/libgetopt++.la -luser32 -lkernel32
104 PackageSpecification.cc \
105 PackageSpecification.h \
107 csu_util/rfc1738.cc \
113 # Obviously we are not really building a program called warnonly
114 # However, this dance was the most non-invasive way I could find
115 # of varying CFLAGS for a single file
116 EXTRA_PROGRAMS += warnonly
117 warnonly_CXXFLAGS = $(BASECXXFLAGS)
118 warnonly_SOURCES = inilex.cc
119 EXTRA_setup_SOURCES = $(warnonly_SOURCES)
121 setup_LDADD = warnonly-inilex.o res.o \
122 libgetopt++/libgetopt++.la \
123 /usr/lib/mingw/libbz2.a \
124 /usr/lib/mingw/libz.a \
125 -luser32 -lkernel32 \
126 -lcomctl32 -lole32 -lwsock32 -lnetapi32 -ladvapi32 -luuid
127 setup_LDFLAGS = -mwindows
135 archive_tar_file.cc \
145 ConnectionSetting.cc \
146 ConnectionSetting.h \
174 IniDBBuilderPackage.cc \
175 IniDBBuilderPackage.h \
178 IniParseFeedback.cc \
180 IniParseFindVisitor.cc \
181 IniParseFindVisitor.h \
185 io_stream_cygfile.cc \
186 io_stream_cygfile.h \
189 io_stream_memory.cc \
227 PackageSpecification.cc \
228 PackageSpecification.h \
230 PickCategoryLine.cc \
280 csu_util/rfc1738.cc \
282 csu_util/version_compare.cc \
283 csu_util/version_compare.h \
287 setup_version.c : $(srcdir)/ChangeLog Makefile
288 V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
289 $(srcdir)/ChangeLog` ;\
290 (echo '#define VERSION_PREFIX "%%% setup-version"';\
291 echo 'static const char version_store[] = VERSION_PREFIX " '$$V'";';\
292 echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp;\
293 mv version.tmp setup_version.c
296 $(WINDRES) --preprocessor "$(CC) -E -xc-header -DRC_INVOKED" --include-dir $(srcdir) -o $@ $<
298 iniparse.cc iniparse.h : iniparse.y
299 bison -d -o iniparse.cc $(srcdir)/iniparse.y
300 @mv iniparse.cc.h iniparse.h 2>/dev/null || mv iniparse.hh iniparse.h
302 inilex.cc : inilex.l iniparse.h
303 flex -8 $(srcdir)/inilex.l
304 mv lex.yy.c inilex.cc
306 # Make a distribution package and tarball
307 release: setup$(EXEEXT) dist-all $(srcdir)/ChangeLog Makefile
308 $(STRIP) setup.exe && \
309 upx --best setup.exe && \
310 V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
311 $(srcdir)/ChangeLog` ;\
312 mv setup.exe setup-$${V}.exe && \
313 mv setup-0.tar.bz2 setup-$${V}.tar.bz2 && \
314 tar cjf setup-$${V}-1-src.tar.bz2 setup-$${V}.tar.bz2
316 # Create a snapshot and upload it (requires write access)
318 V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
319 $(srcdir)/ChangeLog` ;\
320 scp -C setup-$${V}.exe setup-$${V}.tar.bz2 $${cygwinsite}:setup-snapshots/