OSDN Git Service

Initial commit for new package.
[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, 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 and this permission notice shall be included
26 # in all copies or substantial portions of the Software.
27 #
28 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
29 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
31 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
33 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
34 # DEALINGS IN THE SOFTWARE.
35 #
36 # ---------------------------------------------------------------------------
37 #
38 srcdir = @srcdir@
39 VPATH = @srcdir@
40
41 prefix = @prefix@
42 exec_prefix = @exec_prefix@
43 includedir = @includedir@
44 libdir = @libdir@
45
46 # Compiler identification; note that this is a C++ only project.
47 #
48 CXX = @CXX@
49 CPPFLAGS = @CPPFLAGS@
50 CXXFLAGS = @CXXFLAGS@
51 OBJEXT = @OBJEXT@
52
53 # Archive librarian identification.
54 #
55 AR = @AR@
56 ARFLAGS = @ARFLAGS@
57
58 all: libwtkplus.a
59
60 # Default target is a statically linkable object library, comprising
61 # the following object modules.
62 #
63 LIBWTK_OBJECTS = wtkbase.$(OBJEXT) wtkmain.$(OBJEXT) wndproc.$(OBJEXT) \
64   dlgproc.$(OBJEXT) wtkchild.$(OBJEXT) wtkexcept.$(OBJEXT) errtext.$(OBJEXT) \
65   sashctrl.$(OBJEXT) hsashctl.$(OBJEXT) vsashctl.$(OBJEXT) strres.$(OBJEXT)
66
67 libwtkplus.a: $(LIBWTK_OBJECTS)
68         $(AR) $(ARFLAGS) $@ $^
69
70 # Compilation and dependency tracking...
71 #
72 DEPFLAGS = -MM -MP -MD
73 sinclude *.d
74
75 # Implementations for horizontal and vertical sash bar controls are
76 # compiled from common source, so need explicit build rules.
77 #
78 HSASH_IMPLEMENTATION = -D HSASH_IMPLEMENTATION ${srcdir}/sashctrl.cpp
79 VSASH_IMPLEMENTATION = -D VSASH_IMPLEMENTATION ${srcdir}/sashctrl.cpp
80
81 hsashctl.$(OBJEXT): sashctrl.cpp sashctrl.o
82         $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $(HSASH_IMPLEMENTATION)
83
84 vsashctl.$(OBJEXT): sashctrl.cpp sashctrl.o
85         $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $(VSASH_IMPLEMENTATION)
86
87 # Other object modules may be implicitly compiled.
88 #
89 %.$(OBJEXT): %.cpp
90         $(CXX) $(DEPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $<
91         $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
92
93 # Installation rules.
94 #
95 MKDIR_P = @MKDIR_P@
96 INSTALL = @INSTALL@
97
98 INSTALL_DATA = @INSTALL_DATA@
99
100 install: install-dirs install-headers install-libs
101
102 install-dirs:
103         $(MKDIR_P) ${includedir} ${libdir}
104
105 install-headers: wtkplus.h wtkexcept.h
106         $(INSTALL_DATA) $^ ${includedir}
107
108 install-libs: libwtkplus.a
109         $(INSTALL_DATA) $^ ${libdir}
110
111 # Distribution rules.
112 #
113 TARNAME = $(PACKAGE)-$(VERSION)-mingw32
114 SRCDIST_FILES = ChangeLog configure configure.ac Makefile.in install-sh \
115   wtkplus.h wtkexcept.h wtkbase.cpp wtkmain.cpp wtkchild.cpp wndproc.cpp \
116   dlgproc.cpp sashctrl.cpp wtkexcept.cpp errtext.cpp strres.cpp
117
118 dist: srcdist devdist
119
120 srcdist: $(SRCDIST_FILES)
121         rm -rf $(PACKAGE)-$(VERSION)
122         $(MKDIR_P) $(PACKAGE)-$(VERSION)
123         cp -p $^ $(PACKAGE)-$(VERSION)
124         tar cf - $(PACKAGE)-$(VERSION) | xz -c > $(TARNAME)-src.tar.xz
125         rm -rf $(PACKAGE)-$(VERSION)
126
127 devdist:
128         rm -rf tmp
129         $(MAKE) --no-print-directory install prefix=`pwd`/tmp
130         cd tmp; tar cf - * | xz -c > ../$(TARNAME)-dev.tar.xz
131         rm -rf tmp
132
133 # Standard clean-up rules.
134 #
135 clean:
136         rm -f *.$(OBJEXT) *.a
137
138 distclean: clean
139         rm -f *.d config.* Makefile
140
141 maintainer_clean realclean: distclean
142         rm -rf autom4te.cache
143         rm -f configure
144
145 # $RCSfile$: end of file