]> Pileus Git - ~andy/gtk/blob - gdk/win32/makefile.cygwin
Copy our gdkprivate.h and gdkx.h to a gdk subdirectory, so that
[~andy/gtk] / gdk / win32 / makefile.cygwin
1 ## Makefile for building the GDK DLL with egcs on cygwin
2 ## Use: make -f makefile.cygwin install
3
4 # Change this to wherever you want to install the DLL. This directory
5 # should be in your PATH.
6 BIN = bin
7
8 # Location of the Wintab toolkit. Downloadable from http://www.pointing.com.
9 # We use the wntab32x.lib archive library directly (copy it as libwntab32x.a).
10 WTKIT = ../../../wtkit126
11
12 OPTIMIZE = -g -O
13
14 ################################################################
15
16 # Nothing much configurable below
17
18 CC = gcc -mno-cygwin -mpentium
19
20 CP = cp
21 LD = ld
22 INSTALL = install
23
24 GLIB_VER=1.3
25 GTK_VER=1.3
26
27 GLIB = ../../../glib
28 CFLAGS = -g -I. -I../.. -I$(WTKIT)/include -I$(GLIB) -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\" -DNEAR= -DFAR=
29
30 all: \
31         gdk/gdkprivate.h \
32         gdk/gdkx.h      \
33         ../../config.h  \
34         gdk-$(GTK_VER).dll
35
36 install : all
37         $(INSTALL) gdk-$(GTK_VER).dll $(BIN)
38
39 gdk_OBJECTS = \
40         gdk.o           \
41         gdkcc.o         \
42         gdkcolor.o      \
43         gdkcursor.o     \
44         gdkdnd.o        \
45         gdkdraw.o       \
46         gdkevents.o     \
47         gdkfont.o       \
48         gdkgc.o         \
49         gdkglobals.o    \
50         gdkim.o         \
51         gdkimage.o      \
52         gdkinput.o      \
53         gdkpixmap.o     \
54         gdkproperty.o   \
55         gdkrgb.o        \
56         gdkrectangle.o  \
57         gdkregion.o     \
58         gdkselection.o  \
59         gdkvisual.o     \
60         gdkwindow.o     \
61         gdkxid.o
62
63 # We must have copies of gdkx.h and gdkprivate.h in the gdk
64 # subdirectory, so that application sources which want to be
65 # compilable with both GTk+ 1.2 (where there are no separate backend
66 # gdk directories) and this 1.3 version (where the Win32 backend is in
67 # the directory of *this* file you are reading right now) can use
68 # #include <gdk/gdkprivate.h>.
69
70 # Applications that depend on GTk+ 1.3 or later should include
71 # gdkprivate.h and gdkx.h without the gdk/ prefix. The CFLAGS should
72 # include an -I switch pointing to the backend-specific directory
73 # (*this* directory in the Win32 case).
74
75 gdk/gdkprivate.h : gdkprivate.h
76         -mkdir gdk
77         cp gdkprivate.h gdk
78
79 gdk/gdkx.h : gdkx.h
80         -mkdir gdk
81         cp gdkx.h gdk
82
83 ../../config.h : ../../config.h.win32
84         $(CP) ../../config.h.win32 ../../config.h
85
86 gdkres.o : rc/gdk.rc
87         windres --include-dir rc rc/gdk.rc gdkres.o
88
89 gdk-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def gdkres.o libwntab32x.a
90         $(GLIB)/build-dll gdk $(GTK_VER) gdk.def $(gdk_OBJECTS) -L $(GLIB) -lglib-$(GLIB_VER) -L . -lwntab32x -lgdi32 -luser32 -lshell32 -lole32 -luuid $(LDFLAGS) gdkres.o
91
92 libwntab32x.a : $(WTKIT)/lib/i386/wntab32x.lib
93         cp $(WTKIT)/lib/i386/wntab32x.lib libwntab32x.a
94
95 .c.o :
96         $(CC) $(CFLAGS) -c -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $<
97
98 gdkrgb.c : ../gdkrgb.c
99         $(CP) ../gdkrgb.c .
100
101 gdkrectangle.c : ../gdkrectangle.c
102         $(CP) ../gdkrectangle.c .
103
104 testgdk.exe : testgdk.o gdk-$(GTK_VER).dll
105         $(CC) $(CFLAGS) -o $@ testgdk.o -L . -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) $(LDFLAGS)
106
107 testgdk.o : testgdk.c
108         $(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testgdk\" testgdk.c
109
110 clean:
111         -rm *.exe *.o *.dll *.a *.exp *.base