]> Pileus Git - ~andy/gtk/blob - gdk/win32/makefile.mingw.in
Include the build directory.
[~andy/gtk] / gdk / win32 / makefile.mingw.in
1 ## Makefile for building the Win32 dependent GDK objects with gcc on Win32
2 ## Use: make -f makefile.mingw
3
4 TOP = ../../..
5
6 # Location of the Wintab toolkit. Downloadable from
7 # http://www.pointing.com.  We use the wntab32x.lib archive library
8 # directly (copying it to libwntab32x.a).
9 WTKIT = $(TOP)/wtkit126
10
11 include ../../build/win32/make.mingw
12
13 # Possibly override GTK+ version from build/win32/module.defs
14 GTK_VER = @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@
15
16 OPTIMIZE = -g
17
18 INCLUDES = -I ../.. -I .. -I $(WTKIT)/include
19 DEPCFLAGS = $(GLIB_CFLAGS) $(PANGO_CFLAGS)
20 DEFINES = -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\" -DGDK_COMPILATION
21
22 all:                                            \
23         ../../config.h                          \
24         ../gdkconfig.h                          \
25         libgdk-win32.a                          \
26         gdk-win32res.o                          \
27         libwntab32x.a
28
29 gdk_win32_OBJECTS =                             \
30         gdkcc-win32.o                           \
31         gdkcolor-win32.o                        \
32         gdkcursor-win32.o                       \
33         gdkdnd-win32.o                          \
34         gdkdrawable-win32.o                     \
35         gdkevents-win32.o                       \
36         gdkfont-win32.o                         \
37         gdkgc-win32.o                           \
38         gdkgeometry-win32.o                     \
39         gdkglobals-win32.o                      \
40         gdkim-win32.o                           \
41         gdkimage-win32.o                        \
42         gdkinput.o                              \
43         gdkinput-win32.o                        \
44         gdkmain-win32.o                         \
45         gdkpixmap-win32.o                       \
46         gdkproperty-win32.o                     \
47         gdkselection-win32.o                    \
48         gdkvisual-win32.o                       \
49         gdkwin32id.o                            \
50         gdkwindow-win32.o
51
52 ../../config.h : ../../config.h.win32
53         cp $< $@
54
55 ../gdkconfig.h : ../gdkconfig.h.win32
56         cp $< $@
57
58 gdk-win32res.o : rc/gdk.rc gdk-build.tmp
59         m4 -DBUILDNUMBER=`cat gdk-build.tmp` <rc/gdk.rc >gdk-win32res.rc
60         windres --include-dir rc gdk-win32res.rc gdk-win32res.o
61         rm gdk-build.tmp gdk-win32res.rc
62
63 # The *.stamp files aren't distributed. Thus, this takes care of only
64 # tml building libraries with nonzero build number.
65
66 ifeq ($(wildcard gdk-build.stamp),gdk-build.stamp)
67 # Magic to bump the build number
68 gdk-build.tmp :
69         bash -c "read number && echo $$[number+1]" <gdk-build.stamp >gdk-build.tmp
70         cp gdk-build.tmp gdk-build.stamp
71 else
72 # Use zero as build number.
73 gdk-build.tmp :
74         echo 0 >gdk-build.tmp
75 endif
76
77 libgdk-win32.a : $(gdk_win32_OBJECTS) 
78         -rm -f $@
79         $(AR) rv $@ $(gdk_win32_OBJECTS)
80
81 libwntab32x.a : $(WTKIT)/lib/i386/wntab32x.lib
82         cp $< $@
83
84 # Hack to get an updated makefile.mingw automatically after updating
85 # makefile.mingw.in. Only for developer use.
86 makefile.mingw: makefile.mingw.in
87         sed -e 's,@GTK_MAJOR[_]VERSION@,@GTK_MAJOR_VERSION@,' \
88             -e 's,@GTK_MINOR[_]VERSION@,@GTK_MINOR_VERSION@,' <$< >$@