]> Pileus Git - ~andy/gtk/blob - gdk/win32/makefile.cygwin
77429ca2e8e0ad9003c50dc728ee5f60456530b9
[~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 -fnative-struct
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 = $(OPTIMIZE) -I . -I .. -I ../.. -I $(WTKIT)/include -I $(GLIB) -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
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         gdkcompat.o     \
44         gdkcursor.o     \
45         gdkdnd.o        \
46         gdkdraw.o       \
47         gdkevents.o     \
48         gdkfont.o       \
49         gdkgc.o         \
50         gdkglobals.o    \
51         gdkim.o         \
52         gdkimage.o      \
53         gdkinput.o      \
54         gdkpixmap.o     \
55         gdkproperty.o   \
56         gdkrgb.o        \
57         gdkrectangle.o  \
58         gdkregion.o     \
59         gdkselection.o  \
60         gdkvisual.o     \
61         gdkwindow.o     \
62         gdkxid.o
63
64 # We must have copies of gdkx.h and gdkprivate.h in the gdk
65 # subdirectory, so that application sources which want to be
66 # compilable with both GTk+ 1.2 (where there are no separate backend
67 # gdk directories) and this 1.3 version (where the Win32 backend is in
68 # the directory of *this* file you are reading right now) can use
69 # #include <gdk/gdkprivate.h>.
70
71 # Applications that depend on GTk+ 1.3 or later should include
72 # gdkprivate.h and/or gdkx.h without the gdk/ prefix. The CFLAGS should
73 # include an -I switch pointing to the backend-specific directory
74 # (*this* directory in the Win32 case).
75
76 gdk/gdkprivate.h : gdkprivate.h
77         -mkdir gdk
78         cp gdkprivate.h gdk
79
80 gdk/gdkx.h : gdkx.h
81         -mkdir gdk
82         cp gdkx.h gdk
83
84 ../../config.h : ../../config.h.win32
85         $(CP) ../../config.h.win32 ../../config.h
86
87 gdkres.o : rc/gdk.rc
88         windres --include-dir rc rc/gdk.rc gdkres.o
89
90 gdk-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def gdkres.o libwntab32x.a
91         $(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
92
93 libwntab32x.a : $(WTKIT)/lib/i386/wntab32x.lib
94         cp $(WTKIT)/lib/i386/wntab32x.lib libwntab32x.a
95
96 .SUFFIXES: .c .o .i
97
98 .c.o :
99         $(CC) $(CFLAGS) -c -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $<
100
101 .c.i :
102         $(CC) $(CFLAGS) -E -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $< >$@
103
104 gdkrgb.c : ../gdkrgb.c
105         $(CP) ../gdkrgb.c .
106
107 gdkrectangle.c : ../gdkrectangle.c
108         $(CP) ../gdkrectangle.c .
109
110 clean:
111         -rm *.exe *.o *.dll *.a *.exp *.base