OSDN Git Service

5589ce856d8c9802649f820410a0286572e58a38
[mingw/wtklite.git] / Makefile.in
1 # @configure_input@
2 #
3 # ---------------------------------------------------------------------------
4 #
5 PACKAGE = @PACKAGE_TARNAME@
6 VERSION = @PACKAGE_VERSION@
7 #
8 # Implementation of a minimal C++ class framework for use with the
9 # Microsoft Windows Application Programming Interface.
10 #
11 # $Id$
12 #
13 # Written by Keith Marshall <keithmarshall@users.sourceforge.net>
14 # Copyright (C) 2012, 2013, MinGW.org Project.
15 #
16 # ---------------------------------------------------------------------------
17 #
18 # Permission is hereby granted, free of charge, to any person obtaining a
19 # copy of this software and associated documentation files (the "Software"),
20 # to deal in the Software without restriction, including without limitation
21 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
22 # and/or sell copies of the Software, and to permit persons to whom the
23 # Software is furnished to do so, subject to the following conditions:
24 #
25 # The above copyright notice, this permission notice, and the following
26 # disclaimer shall be included in all copies or substantial portions of
27 # the Software.
28 #
29 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
30 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
32 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
34 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
35 # DEALINGS IN THE SOFTWARE.
36 #
37 # ---------------------------------------------------------------------------
38 #
39 srcdir = @srcdir@
40 VPATH = @srcdir@
41
42 prefix = @prefix@
43 exec_prefix = @exec_prefix@
44 includedir = @includedir@
45 libdir = @libdir@
46
47 # Compiler identification; note that this is a C++ only project.
48 #
49 CXX = @CXX@
50 CPPFLAGS = @CPPFLAGS@
51 CXXFLAGS = @CXXFLAGS@
52 OBJEXT = @OBJEXT@
53
54 # Archive librarian identification.
55 #
56 AR = @AR@
57 ARFLAGS = @ARFLAGS@
58
59 all: libwtklite.a
60
61 # Default target is a statically linkable object library, comprising
62 # the following object modules.
63 #
64 LIBWTK_OBJECTS = wtkbase.$(OBJEXT) wtkmain.$(OBJEXT) wndproc.$(OBJEXT) \
65   dlgproc.$(OBJEXT) wtkchild.$(OBJEXT) wtkexcept.$(OBJEXT) errtext.$(OBJEXT) \
66   sashctrl.$(OBJEXT) hsashctl.$(OBJEXT) vsashctl.$(OBJEXT) strres.$(OBJEXT) \
67   wtkraise.$(OBJEXT)
68
69 libwtklite.a: $(LIBWTK_OBJECTS)
70         $(AR) $(ARFLAGS) $@ $^
71
72 # Compilation and dependency tracking...
73 #
74 DEPFLAGS = -MMD -MP $(CPPFLAGS)
75 sinclude *.d
76
77 # Implementations for horizontal and vertical sash bar controls are
78 # compiled from common source, so need explicit build rules.
79 #
80 HSASH_IMPLEMENTATION = -D HSASH_IMPLEMENTATION ${srcdir}/sashctrl.cpp
81 VSASH_IMPLEMENTATION = -D VSASH_IMPLEMENTATION ${srcdir}/sashctrl.cpp
82
83 hsashctl.$(OBJEXT): sashctrl.cpp sashctrl.o
84         $(CXX) -c $(DEPFLAGS) $(CXXFLAGS) -o $@ $(HSASH_IMPLEMENTATION)
85
86 vsashctl.$(OBJEXT): sashctrl.cpp sashctrl.o
87         $(CXX) -c $(DEPFLAGS) $(CXXFLAGS) -o $@ $(VSASH_IMPLEMENTATION)
88
89 # Other object modules may be implicitly compiled.
90 #
91 %.$(OBJEXT): %.cpp
92         $(CXX) -c $(DEPFLAGS) $(CXXFLAGS) -o $@ $<
93
94 # Installation rules.
95 #
96 MKDIR_P = @MKDIR_P@
97 INSTALL = @INSTALL@
98
99 INSTALL_DATA = @INSTALL_DATA@
100
101 install: install-dirs install-headers install-libs
102
103 install-dirs:
104         $(MKDIR_P) ${includedir} ${libdir}
105
106 install-headers: wtklite.h wtkdefs.h wtkexcept.h
107         $(INSTALL_DATA) $^ ${includedir}
108
109 install-libs: libwtklite.a
110         $(INSTALL_DATA) $^ ${libdir}
111
112 # Distribution rules.
113 #
114 TARNAME = $(PACKAGE)-$(VERSION)-mingw32
115 SRCDIST_FILES = ChangeLog configure configure.ac Makefile.in install-sh \
116   wtklite.h wtkdefs.h wtkexcept.h wtkbase.cpp wtkmain.cpp wtkchild.cpp \
117   wndproc.cpp dlgproc.cpp sashctrl.cpp wtkexcept.cpp errtext.cpp strres.cpp \
118   wtkraise.cpp
119
120 dist: srcdist devdist
121
122 srcdist: $(SRCDIST_FILES)
123         rm -rf $(PACKAGE)-$(VERSION)
124         $(MKDIR_P) $(PACKAGE)-$(VERSION)
125         cp -p $^ $(PACKAGE)-$(VERSION)
126         tar cf - $(PACKAGE)-$(VERSION) | xz -c > $(TARNAME)-src.tar.xz
127         rm -rf $(PACKAGE)-$(VERSION)
128
129 devdist:
130         rm -rf tmp
131         $(MAKE) --no-print-directory install prefix=`pwd`/tmp
132         cd tmp; tar cf - * | xz -c > ../$(TARNAME)-dev.tar.xz
133         rm -rf tmp
134
135 # Standard clean-up rules.
136 #
137 clean:
138         rm -f *.$(OBJEXT) *.a
139
140 distclean: clean
141         rm -f *.d config.* Makefile
142
143 maintainer_clean realclean: distclean
144         rm -rf autom4te.cache
145         rm -f configure
146
147 # $RCSfile$: end of file