makefile.msc 4.54 KB
Newer Older
1 2 3 4 5
TOP = ..\..
PRJ_TOP = ..
PACKAGE = gdk_pixbuf
PKG_VER = $(GDK_PIXBUF_VER)

6
!INCLUDE $(TOP)/glib/build/win32/make.msc
7

Hans Breuer's avatar
Hans Breuer committed
8 9 10 11
!IFNDEF PERL
PERL = perl
!ENDIF

Owen Taylor's avatar
Owen Taylor committed
12
GDK_PIXBUF_VER = 2.0
13

14 15 16 17 18 19 20 21
# to get _working_ include modules we need respective defines ...
BUILT_IN_FORMATS = -DINCLUDE_png -DINCLUDE_bmp -DINCLUDE_gif \
	-DINCLUDE_ico -DINCLUDE_jpeg -DINCLUDE_xpm -DINCLUDE_wbmp \
	-DINCLUDE_pnm -DINCLUDE_ras

# -DINCLUDE_tiff


22

23 24
PKG_CFLAGS = -FImsvc_recommended_pragmas.h \
	-I. -I.. $(GLIB_CFLAGS) \
25
	$(BUILT_IN_FORMATS) \
26
	$(JPEG_CFLAGS) $(PNG_CFLAGS) $(TIFF_CFLAGS) $(INTL_CFLAGS) \
Hans Breuer's avatar
Hans Breuer committed
27
	$(G_DEBUGGING) \
Hans Breuer's avatar
updated  
Hans Breuer committed
28
	-DGDK_PIXBUF_ENABLE_BACKEND \
29 30 31 32 33
	-UUSE_GMODULE # use built-in
#	-DUSE_GMODULE -DPIXBUF_LIBDIR=\".\"


PKG_LINK = $(GLIB_LIBS) \
34 35 36
#	$(TIFF_LIBS) \
	$(JPEG_LIBS) $(PNG_LIBS) $(INTL_LIBS) \
	pixops\pixops.lib \
37 38
 
OBJECTS = \
Hans Breuer's avatar
Hans Breuer committed
39
	gdk-pixbuf-enum-types.obj \
40 41 42 43 44 45 46
	gdk-pixbuf-animation.obj \
	gdk-pixbuf-data.obj \
	gdk-pixbuf-io.obj \
	gdk-pixbuf-loader.obj \
	gdk-pixbuf-scale.obj \
	gdk-pixbuf-util.obj \
	gdk-pixbuf.obj \
47
	gdk-pixdata.obj \
48 49 50
	io-bmp.obj \
	io-wbmp.obj \
	io-gif.obj \
51
	io-gif-animation.obj \
52 53 54 55
	io-ico.obj \
	io-png.obj \
	io-pnm.obj \
	io-ras.obj \
56
#	io-tiff.obj \
57 58 59
	io-xpm.obj \
	io-jpeg.obj \

Hans Breuer's avatar
updated  
Hans Breuer committed
60 61 62 63 64
gdk_pixbuf_headers = 	\
	gdk-pixbuf.h	\
	gdk-pixbuf-core.h	\
	gdk-pixbuf-loader.h	\
	gdk-pixbuf-transform.h
Hans Breuer's avatar
Hans Breuer committed
65

66
gdk-pixbuf-marshal.h: gdk-pixbuf-marshal.list
Hans Breuer's avatar
updated  
Hans Breuer committed
67
	..\..\glib\gobject\glib-genmarshal --prefix=_gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >gdk-pixbuf-marshal.h
68

Hans Breuer's avatar
updated  
Hans Breuer committed
69 70 71 72 73
gdk-pixbuf-marshal.c: gdk-pixbuf-marshal.h gdk-pixbuf-marshal.list
	..\..\glib\gobject\glib-genmarshal --prefix=_gdk_pixbuf_marshal gdk-pixbuf-marshal.list --body >gdk-pixbuf-marshal.c

gdk-pixbuf-alias.h: gdk-pixbuf.symbols
	perl makegdkpixbufalias.pl < gdk-pixbuf.symbols > gdk-pixbuf-alias.h
74

Hans Breuer's avatar
Hans Breuer committed
75 76 77 78 79
gdk_pixbuf.def: gdk-pixbuf.symbols 
	echo EXPORTS > gdk_pixbuf.def
	cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 gdk-pixbuf.symbols >> gdk_pixbuf.def


80 81 82 83 84 85
## common stuff

INSTALL = copy

CFLAGS = -I. -DHAVE_CONFIG_H

Hans Breuer's avatar
Hans Breuer committed
86 87 88 89 90
sub-pixops :
	cd pixops
	nmake -f makefile.msc
	cd ..

91 92 93
## targets
all : \
	$(PRJ_TOP)\config.h \
Hans Breuer's avatar
updated  
Hans Breuer committed
94
	gdk-pixbuf-alias.h \
95
	gdk-pixbuf-marshal.h \
Hans Breuer's avatar
updated  
Hans Breuer committed
96
	gdk-pixbuf-marshal.c \
Hans Breuer's avatar
Hans Breuer committed
97
	sub-pixops \
Hans Breuer's avatar
updated  
Hans Breuer committed
98
	lib$(PACKAGE)-$(PKG_VER)-0.dll \
Hans Breuer's avatar
Hans Breuer committed
99
	$(PACKAGE)-$(PKG_VER)s.lib \
100 101
#	make-inline-pixbuf.exe \
	gdk-pixbuf-csource.exe \
102 103
	test-gdk-pixbuf.exe

Tor Lillqvist's avatar
Remove.  
Tor Lillqvist committed
104 105
$(PACKAGE).res : $(PACKAGE).rc
	rc -DBUILDNUMBER=0 -r -fo $(PACKAGE).res $(PACKAGE).rc
Hans Breuer's avatar
Hans Breuer committed
106

Hans Breuer's avatar
Hans Breuer committed
107 108
$(PACKAGE)-$(PKG_VER)s.lib : $(OBJECTS)
	lib /out:$(PACKAGE)-$(PKG_VER)s.lib $(OBJECTS) pixops\pixops.lib
109

Hans Breuer's avatar
updated  
Hans Breuer committed
110 111 112
lib$(PACKAGE)-$(PKG_VER)-0.dll : $(OBJECTS) $(PACKAGE).def $(PACKAGE).res
	$(CC) $(CFLAGS) -LD -Fe$@ $(OBJECTS) $(PKG_LINK) user32.lib advapi32.lib wsock32.lib $(PACKAGE).res \
	$(LDFLAGS) /implib:$(PACKAGE)-$(PKG_VER).lib /def:$(PACKAGE).def
113 114 115 116

make-inline-pixbuf.exe : make-inline-pixbuf.c
	$(CC) $(PKG_CFLAGS) -Femake-inline-pixbuf.exe make-inline-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib

117 118 119
gdk-pixbuf-csource.exe : gdk-pixbuf-csource.c
	$(CC) $(PKG_CFLAGS) -Fegdk-pixbuf-csource.exe gdk-pixbuf-csource.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib

120 121 122
test-gdk-pixbuf.exe : test-gdk-pixbuf.c
	$(CC) $(PKG_CFLAGS) -Fetest-gdk-pixbuf.exe test-gdk-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib

Hans Breuer's avatar
Hans Breuer committed
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
#
# gdk-pixbuf-enum-types.h
#
gdk-pixbuf-enum-types.h : $(gdk_pixbuf_headers) makefile.msc
	$(PERL) $(GLIB)\gobject\glib-mkenums \
		--fhead "#ifndef __GDK_PIXBUF__ENUM_TYPES_H__\n#define __GDK_PIXBUF_ENUM_TYPES_H__\n" \
		--fprod "/* enumerations from \"@filename@\" */\n" \
		--vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
		--ftail "#endif /* __GDK_PIXBUF_ENUM_TYPES_H__ */" \
		$(gdk_pixbuf_headers) ) > gdk-pixbuf-enum-types.h

#
# gdk-pixbuf-enum-types.c
#
gdk-pixbuf-enum-types.c: $(gdk_pixbuf_headers) makefile.msc
	$(PERL) $(GLIB)\gobject\glib-mkenums \
		--fhead "#include <gdk-pixbuf/gdk-pixbuf.h>" \
		--fprod "\n/* enumerations from \"@filename@\" */" \
		--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[] = {"       \
		--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
		--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
		  $(gdk_pixbuf_headers) > gdk-pixbuf-enum-types.c

gdk-pixbuf-enum-types.obj : gdk-pixbuf-enum-types.c gdk-pixbuf-enum-types.h

148 149 150 151 152 153 154 155
$(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
	copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h

.c.obj :
	$(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) $<

clean::
	del config.h
Hans Breuer's avatar
updated  
Hans Breuer committed
156 157 158 159 160
	del gdk-pixbuf-marshal.h
	del gdk-pixbuf-marshal.c
	del gdk-pixbuf-alaias.h


161