]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/makefile.msc
Update version to 2.0.0
[~andy/gtk] / gdk-pixbuf / makefile.msc
1 TOP = ..\..
2 PRJ_TOP = ..
3 PACKAGE = gdk_pixbuf
4 PKG_VER = $(GDK_PIXBUF_VER)
5
6 !INCLUDE $(TOP)/glib/build/win32/make.msc
7
8 !IFNDEF PERL
9 PERL = perl
10 !ENDIF
11
12 GDK_PIXBUF_VER = 2.0
13
14 # to get _working_ include modules we need respective defines ...
15 BUILT_IN_FORMATS = -DINCLUDE_png -DINCLUDE_bmp -DINCLUDE_gif \
16         -DINCLUDE_ico -DINCLUDE_jpeg -DINCLUDE_xpm -DINCLUDE_wbmp \
17         -DINCLUDE_pnm -DINCLUDE_ras
18
19 # -DINCLUDE_tiff
20
21
22
23 PKG_CFLAGS = -FImsvc_recommended_pragmas.h \
24         -I. -I.. $(GLIB_CFLAGS) \
25         $(BUILT_IN_FORMATS) \
26         $(JPEG_CFLAGS) $(PNG_CFLAGS) $(TIFF_CFLAGS) $(INTL_CFLAGS) \
27         $(G_DEBUGGING) \
28         -UUSE_GMODULE # use built-in
29 #       -DUSE_GMODULE -DPIXBUF_LIBDIR=\".\"
30
31
32 PKG_LINK = $(GLIB_LIBS) \
33 #       $(TIFF_LIBS) \
34         $(JPEG_LIBS) $(PNG_LIBS) $(INTL_LIBS) \
35         pixops\pixops.lib \
36  
37 OBJECTS = \
38         gdk-pixbuf-enum-types.obj \
39         gdk-pixbuf-animation.obj \
40         gdk-pixbuf-data.obj \
41         gdk-pixbuf-io.obj \
42         gdk-pixbuf-loader.obj \
43         gdk-pixbuf-scale.obj \
44         gdk-pixbuf-util.obj \
45         gdk-pixbuf.obj \
46         gdk-pixdata.obj \
47         io-bmp.obj \
48         io-wbmp.obj \
49         io-gif.obj \
50         io-gif-animation.obj \
51         io-ico.obj \
52         io-png.obj \
53         io-pnm.obj \
54         io-ras.obj \
55 #       io-tiff.obj \
56         io-xpm.obj \
57         io-jpeg.obj \
58
59 gdk_pixbuf_headers =                    \
60         gdk-pixbuf.h                    \
61         gdk-pixbuf-loader.h
62
63 gdk-pixbuf-marshal.h: gdk-pixbuf-marshal.list
64         ..\..\glib\gobject\glib-genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >gdk-pixbuf-marshal.h
65
66 gdk-pixbuf-marshal.c: gdk-pixbuf-marshal.list
67         ..\..\glib\gobject\glib-genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --body >gdk-pixbuf-marshal.c
68
69 ## common stuff
70
71 INSTALL = copy
72
73 CFLAGS = -I. -DHAVE_CONFIG_H
74
75 sub-pixops :
76         cd pixops
77         nmake -f makefile.msc
78         cd ..
79
80 ## targets
81 all : \
82         $(PRJ_TOP)\config.h \
83         gdk-pixbuf-marshal.c \
84         gdk-pixbuf-marshal.h \
85         sub-pixops \
86         $(PACKAGE)-$(PKG_VER).dll \
87         $(PACKAGE)-$(PKG_VER)s.lib \
88 #       make-inline-pixbuf.exe \
89         gdk-pixbuf-csource.exe \
90         test-gdk-pixbuf.exe
91
92 $(PACKAGE).res : $(PACKAGE).rc
93         rc -DBUILDNUMBER=0 -r -fo $(PACKAGE).res $(PACKAGE).rc
94
95 $(PACKAGE)-$(PKG_VER)s.lib : $(OBJECTS)
96         lib /out:$(PACKAGE)-$(PKG_VER)s.lib $(OBJECTS) pixops\pixops.lib
97
98 $(PACKAGE)-$(PKG_VER).dll : $(OBJECTS) $(PACKAGE).def $(PACKAGE).res
99         $(CC) $(CFLAGS) -LD -Fe$(PACKAGE)-$(PKG_VER).dll $(OBJECTS) $(PKG_LINK) user32.lib advapi32.lib wsock32.lib $(PACKAGE).res $(LDFLAGS) /def:$(PACKAGE).def
100
101 make-inline-pixbuf.exe : make-inline-pixbuf.c
102         $(CC) $(PKG_CFLAGS) -Femake-inline-pixbuf.exe make-inline-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
103
104 gdk-pixbuf-csource.exe : gdk-pixbuf-csource.c
105         $(CC) $(PKG_CFLAGS) -Fegdk-pixbuf-csource.exe gdk-pixbuf-csource.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
106
107 test-gdk-pixbuf.exe : test-gdk-pixbuf.c
108         $(CC) $(PKG_CFLAGS) -Fetest-gdk-pixbuf.exe test-gdk-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
109
110 #
111 # gdk-pixbuf-enum-types.h
112 #
113 gdk-pixbuf-enum-types.h : $(gdk_pixbuf_headers) makefile.msc
114         $(PERL) $(GLIB)\gobject\glib-mkenums \
115                 --fhead "#ifndef __GDK_PIXBUF__ENUM_TYPES_H__\n#define __GDK_PIXBUF_ENUM_TYPES_H__\n" \
116                 --fprod "/* enumerations from \"@filename@\" */\n" \
117                 --vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
118                 --ftail "#endif /* __GDK_PIXBUF_ENUM_TYPES_H__ */" \
119                 $(gdk_pixbuf_headers) ) > gdk-pixbuf-enum-types.h
120
121 #
122 # gdk-pixbuf-enum-types.c
123 #
124 gdk-pixbuf-enum-types.c: $(gdk_pixbuf_headers) makefile.msc
125         $(PERL) $(GLIB)\gobject\glib-mkenums \
126                 --fhead "#include <gdk-pixbuf/gdk-pixbuf.h>" \
127                 --fprod "\n/* enumerations from \"@filename@\" */" \
128                 --vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {"       \
129                 --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
130                 --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
131                   $(gdk_pixbuf_headers) > gdk-pixbuf-enum-types.c
132
133 gdk-pixbuf-enum-types.obj : gdk-pixbuf-enum-types.c gdk-pixbuf-enum-types.h
134
135 $(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
136         copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h
137
138 .c.obj :
139         $(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) $<
140
141 clean::
142         del config.h
143