]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/makefile.msc
updated
[~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         -DGDK_PIXBUF_ENABLE_BACKEND \
29         -UUSE_GMODULE # use built-in
30 #       -DUSE_GMODULE -DPIXBUF_LIBDIR=\".\"
31
32
33 PKG_LINK = $(GLIB_LIBS) \
34 #       $(TIFF_LIBS) \
35         $(JPEG_LIBS) $(PNG_LIBS) $(INTL_LIBS) \
36         pixops\pixops.lib \
37  
38 OBJECTS = \
39         gdk-pixbuf-enum-types.obj \
40         gdk-pixbuf-animation.obj \
41         gdk-pixbuf-data.obj \
42         gdk-pixbuf-io.obj \
43         gdk-pixbuf-loader.obj \
44         gdk-pixbuf-scale.obj \
45         gdk-pixbuf-util.obj \
46         gdk-pixbuf.obj \
47         gdk-pixdata.obj \
48         io-bmp.obj \
49         io-wbmp.obj \
50         io-gif.obj \
51         io-gif-animation.obj \
52         io-ico.obj \
53         io-png.obj \
54         io-pnm.obj \
55         io-ras.obj \
56 #       io-tiff.obj \
57         io-xpm.obj \
58         io-jpeg.obj \
59
60 gdk_pixbuf_headers =                    \
61         gdk-pixbuf.h                    \
62         gdk-pixbuf-loader.h
63
64 gdk-pixbuf-marshal.h: gdk-pixbuf-marshal.list
65         ..\..\glib\gobject\glib-genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >gdk-pixbuf-marshal.h
66
67 gdk-pixbuf-marshal.c: gdk-pixbuf-marshal.list
68         ..\..\glib\gobject\glib-genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --body >gdk-pixbuf-marshal.c
69
70 ## common stuff
71
72 INSTALL = copy
73
74 CFLAGS = -I. -DHAVE_CONFIG_H
75
76 sub-pixops :
77         cd pixops
78         nmake -f makefile.msc
79         cd ..
80
81 ## targets
82 all : \
83         $(PRJ_TOP)\config.h \
84         gdk-pixbuf-marshal.c \
85         gdk-pixbuf-marshal.h \
86         sub-pixops \
87         lib$(PACKAGE)-$(PKG_VER)-0.dll \
88         $(PACKAGE)-$(PKG_VER)s.lib \
89 #       make-inline-pixbuf.exe \
90         gdk-pixbuf-csource.exe \
91         test-gdk-pixbuf.exe
92
93 $(PACKAGE).res : $(PACKAGE).rc
94         rc -DBUILDNUMBER=0 -r -fo $(PACKAGE).res $(PACKAGE).rc
95
96 $(PACKAGE)-$(PKG_VER)s.lib : $(OBJECTS)
97         lib /out:$(PACKAGE)-$(PKG_VER)s.lib $(OBJECTS) pixops\pixops.lib
98
99 lib$(PACKAGE)-$(PKG_VER)-0.dll : $(OBJECTS) $(PACKAGE).def $(PACKAGE).res
100         $(CC) $(CFLAGS) -LD -Fe$@ $(OBJECTS) $(PKG_LINK) user32.lib advapi32.lib wsock32.lib $(PACKAGE).res \
101         $(LDFLAGS) /implib:$(PACKAGE)-$(PKG_VER).lib /def:$(PACKAGE).def
102
103 make-inline-pixbuf.exe : make-inline-pixbuf.c
104         $(CC) $(PKG_CFLAGS) -Femake-inline-pixbuf.exe make-inline-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
105
106 gdk-pixbuf-csource.exe : gdk-pixbuf-csource.c
107         $(CC) $(PKG_CFLAGS) -Fegdk-pixbuf-csource.exe gdk-pixbuf-csource.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
108
109 test-gdk-pixbuf.exe : test-gdk-pixbuf.c
110         $(CC) $(PKG_CFLAGS) -Fetest-gdk-pixbuf.exe test-gdk-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
111
112 #
113 # gdk-pixbuf-enum-types.h
114 #
115 gdk-pixbuf-enum-types.h : $(gdk_pixbuf_headers) makefile.msc
116         $(PERL) $(GLIB)\gobject\glib-mkenums \
117                 --fhead "#ifndef __GDK_PIXBUF__ENUM_TYPES_H__\n#define __GDK_PIXBUF_ENUM_TYPES_H__\n" \
118                 --fprod "/* enumerations from \"@filename@\" */\n" \
119                 --vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
120                 --ftail "#endif /* __GDK_PIXBUF_ENUM_TYPES_H__ */" \
121                 $(gdk_pixbuf_headers) ) > gdk-pixbuf-enum-types.h
122
123 #
124 # gdk-pixbuf-enum-types.c
125 #
126 gdk-pixbuf-enum-types.c: $(gdk_pixbuf_headers) makefile.msc
127         $(PERL) $(GLIB)\gobject\glib-mkenums \
128                 --fhead "#include <gdk-pixbuf/gdk-pixbuf.h>" \
129                 --fprod "\n/* enumerations from \"@filename@\" */" \
130                 --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[] = {"       \
131                 --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
132                 --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
133                   $(gdk_pixbuf_headers) > gdk-pixbuf-enum-types.c
134
135 gdk-pixbuf-enum-types.obj : gdk-pixbuf-enum-types.c gdk-pixbuf-enum-types.h
136
137 $(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
138         copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h
139
140 .c.obj :
141         $(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) $<
142
143 clean::
144         del config.h
145