]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/makefile.msc
don't export functions prefixed with underscore
[~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 = 1.3
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)-$(PKG_VER)s.lib : $(OBJECTS)
93         lib /out:$(PACKAGE)-$(PKG_VER)s.lib $(OBJECTS) pixops\pixops.lib
94
95 $(PACKAGE)-$(PKG_VER).dll : $(OBJECTS) $(PACKAGE).def
96         $(CC) $(CFLAGS) -LD -Fe$(PACKAGE)-$(PKG_VER).dll $(OBJECTS) $(PKG_LINK) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:$(PACKAGE).def
97
98 make-inline-pixbuf.exe : make-inline-pixbuf.c
99         $(CC) $(PKG_CFLAGS) -Femake-inline-pixbuf.exe make-inline-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
100
101 gdk-pixbuf-csource.exe : gdk-pixbuf-csource.c
102         $(CC) $(PKG_CFLAGS) -Fegdk-pixbuf-csource.exe gdk-pixbuf-csource.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
103
104 test-gdk-pixbuf.exe : test-gdk-pixbuf.c
105         $(CC) $(PKG_CFLAGS) -Fetest-gdk-pixbuf.exe test-gdk-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib
106
107 #
108 # gdk-pixbuf-enum-types.h
109 #
110 gdk-pixbuf-enum-types.h : $(gdk_pixbuf_headers) makefile.msc
111         $(PERL) $(GLIB)\gobject\glib-mkenums \
112                 --fhead "#ifndef __GDK_PIXBUF__ENUM_TYPES_H__\n#define __GDK_PIXBUF_ENUM_TYPES_H__\n" \
113                 --fprod "/* enumerations from \"@filename@\" */\n" \
114                 --vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
115                 --ftail "#endif /* __GDK_PIXBUF_ENUM_TYPES_H__ */" \
116                 $(gdk_pixbuf_headers) ) > gdk-pixbuf-enum-types.h
117
118 #
119 # gdk-pixbuf-enum-types.c
120 #
121 gdk-pixbuf-enum-types.c: $(gdk_pixbuf_headers) makefile.msc
122         $(PERL) $(GLIB)\gobject\glib-mkenums \
123                 --fhead "#include <gdk-pixbuf/gdk-pixbuf.h>" \
124                 --fprod "\n/* enumerations from \"@filename@\" */" \
125                 --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[] = {"       \
126                 --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
127                 --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
128                   $(gdk_pixbuf_headers) > gdk-pixbuf-enum-types.c
129
130 gdk-pixbuf-enum-types.obj : gdk-pixbuf-enum-types.c gdk-pixbuf-enum-types.h
131
132 $(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
133         copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h
134
135 .c.obj :
136         $(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) $<
137
138 clean::
139         del config.h
140