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
22 DIST_SUBDIRS = bz2lib zlib libgetopt++
23 SUBDIRS = bz2lib zlib libgetopt++ @RSYNC@
25 ## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
27 AM_CFLAGS = -Werror -Winline -Wall -Wpointer-arith \
28 -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
29 -Wmissing-declarations -Wcomments
30 AM_CXXFLAGS = $(AM_CFLAGS)
34 INCLUDES = -I$(srcdir)/bz2lib -I$(srcdir)/libgetopt++/include
40 EXTRA_PROGRAMS = inilint
41 ## noinst_PROGRAMS +=inilint
43 # to avoid false errors that assembly generates
44 WARNONLY_CFLAGS = -Winline -Wall -Wpointer-arith -Wcast-align \
45 -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
46 -Wmissing-declarations -Wcomments $(INCLUDES)
58 BUILT_SOURCES = setup_version.c \
79 inilint_LDADD = libgetopt++/libgetopt++.la -lstdc++ -luser32 -lkernel32
103 setup_LDADD = res.o zlib/libzcygw.a bz2lib/libbz2.a \
104 libgetopt++/libgetopt++.la \
106 -lstdc++ -luser32 -lkernel32 \
107 -lcomctl32 -lole32 -lwsock32 -lnetapi32 -ladvapi32 -luuid
108 setup_LDFLAGS = -mwindows
114 archive_tar_file.cc \
157 IniDBBuilderPackage.cc \
158 IniDBBuilderPackage.h \
162 IniParseFindVisitor.cc \
163 IniParseFindVisitor.h \
167 io_stream_cygfile.cc \
168 io_stream_cygfile.h \
171 io_stream_memory.cc \
217 PickCategoryLine.cc \
264 setup_version.c : $(srcdir)/ChangeLog Makefile
265 V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \
266 | sed -e 's/\$$Revision:* *//' \
268 (echo '#define VERSION_PREFIX "%%% setup-version"';\
269 echo 'static const char version_store[] = VERSION_PREFIX " '$$V'";';\
270 echo 'const char *version = version_store + sizeof (VERSION_PREFIX);') > version.tmp;\
271 mv version.tmp setup_version.c
274 $(WINDRES) --include-dir $(srcdir) -o $@ $<
276 autoload.o: autoload.c
277 @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
278 @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
279 @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
280 $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(WARNONLY_CFLAGS) $(CFLAGS) -c -o $@ $< -fno-inline-functions
283 @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
284 @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
285 @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
286 $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
287 $(AM_CPPFLAGS) $(CPPFLAGS) $(WARNONLY_CFLAGS) $(CXXFLAGS) -c -o $@ $<
289 iniparse.cc iniparse.h : iniparse.y
290 bison -d -o iniparse.cc $(srcdir)/iniparse.y
291 @mv iniparse.cc.h iniparse.h 2>/dev/null || mv iniparse.hh iniparse.h
293 inilex.cc : inilex.l iniparse.h
294 flex -8 $(srcdir)/inilex.l
295 mv lex.yy.c inilex.cc
297 # Make a distribution package and tarball
298 release: setup$(EXEEXT) dist-all $(srcdir)/ChangeLog Makefile
299 $(STRIP) setup.exe && \
300 upx --best setup.exe && \
301 V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \
302 | sed -e 's/\$$Revision:* *//' \
304 mv setup.exe setup-$${V}.exe && \
305 mv setup-0.tar.bz2 setup-$${V}.tar.bz2 && \
306 tar cjf setup-$${V}-1-src.tar.bz2 setup-$${V}.tar.bz2