summaryrefslogtreecommitdiff
path: root/gdk/win32/makefile.cygwin
blob: 5d33ea042fb7babdb14ce2222dd142bc83163a4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
## Makefile for building the machine dependent part of GDK on Win32 with gcc 
## Use: make -f makefile.cygwin 

# Location of the Wintab toolkit. Downloadable from http://www.pointing.com.
# We use the wntab32x.lib archive library directly (copy it as libwntab32x.a).
WTKIT = ../../../wtkit126

OPTIMIZE = -g

TOP = ../../..

include $(TOP)/build/win32/make.mingw

################################################################

# Nothing much configurable below

INCLUDES = -I ../.. -I .. -I $(WTKIT)/include
DEPCFLAGS = $(GLIB_CFLAGS) $(PANGO_CFLAGS)
DEFINES =  -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"

all: \
	../../config.h \
	../gdkconfig.h \
	libgdk-win32.a \
	gdk-win32res.o \
	libwntab32x.a

gdk_win32_OBJECTS = \
	gdkcc-win32.o \
	gdkcolor-win32.o \
	gdkcursor-win32.o \
	gdkdnd-win32.o \
	gdkdrawable-win32.o \
	gdkevents-win32.o \
	gdkfont-win32.o \
	gdkgc-win32.o \
	gdkgeometry-win32.o \
	gdkglobals-win32.o \
	gdkim-win32.o \
	gdkimage-win32.o \
	gdkinput-win32.o \
	gdkmain-win32.o \
	gdkpixmap-win32.o \
	gdkproperty-win32.o \
	gdkselection-win32.o \
	gdkvisual-win32.o \
	gdkwin32id.o \
	gdkwindow-win32.o

../../config.h : ../../config.h.win32
	cp $< $@

../gdkconfig.h : ../gdkconfig.h.win32
	cp $< $@

# Kludge to get the path to the win32 headers
WIN32APIHEADERS = $(shell echo "\#include <winver.h>" | $(CC) -M -E - | tail -1 | sed -e 's![\\/]winver.h!!' | tr -d '\015')

gdk-win32res.o : rc/gdk.rc gdk-build.tmp
	m4 -DBUILDNUMBER=`cat gdk-build.tmp` <rc/gdk.rc >gdk-win32res.rc
	windres --include-dir rc --include-dir $(WIN32APIHEADERS) gdk-win32res.rc gdk-win32res.o
	rm gdk-build.tmp gdk-win32res.rc

# The *.stamp files aren't distributed. Thus, this takes care of only
# tml building libraries with nonzero build number.

ifeq ($(wildcard gdk-build.stamp),gdk-build.stamp)
# Magic to bump the build number
gdk-build.tmp :
	bash -c "read number && echo $$[number+1]" <gdk-build.stamp >gdk-build.tmp
	cp gdk-build.tmp gdk-build.stamp
else
# Use zero as build number.
gdk-build.tmp :
	echo 0 >gdk-build.tmp
endif

libgdk-win32.a : $(gdk_win32_OBJECTS) 
	-rm -f $@
	$(AR) rv $@ $(gdk_win32_OBJECTS)

libwntab32x.a : $(WTKIT)/lib/i386/wntab32x.lib
	cp $(WTKIT)/lib/i386/wntab32x.lib libwntab32x.a