]> Pileus Git - ~andy/gtk/blob - gdk/win32/makefile.cygwin
Add an extra parameter so that we don't have to do unnecessary settings to
[~andy/gtk] / gdk / win32 / makefile.cygwin
1 ## Makefile for building the machine dependent part of GDK with gcc on cygwin
2 ## Use: make -f makefile.cygwin 
3
4 # Location of the Wintab toolkit. Downloadable from http://www.pointing.com.
5 # We use the wntab32x.lib archive library directly (copy it as libwntab32x.a).
6 WTKIT = ../../../wtkit126
7
8 OPTIMIZE = -g -O
9
10 ################################################################
11
12 # Nothing much configurable below
13
14 CC = gcc -mno-cygwin -mpentium -fnative-struct
15
16 GLIB_VER=1.3
17 GTK_VER=1.3
18
19 GLIB = ../../../glib
20 CFLAGS = $(OPTIMIZE) -I . -I .. -I ../.. -I $(WTKIT)/include -I $(GLIB) -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
21
22 all: \
23         ../../config.h \
24         ../gdkconfig.h \
25         libgdk-win32.a \
26         gdk-win32res.o \
27         libwntab32x.a
28
29 gdk_win32_OBJECTS = \
30         gdkcc-win32.o \
31         gdkcolor-win32.o \
32         gdkcursor-win32.o \
33         gdkdnd-win32.o \
34         gdkdrawable-win32.o \
35         gdkevents-win32.o \
36         gdkfont-win32.o \
37         gdkgc-win32.o \
38         gdkglobals-win32.o \
39         gdkim-win32.o \
40         gdkimage-win32.o \
41         gdkinput-win32.o \
42         gdkmain-win32.o \
43         gdkpixmap-win32.o \
44         gdkproperty-win32.o \
45         gdkregion-win32.o \
46         gdkselection-win32.o \
47         gdkvisual-win32.o \
48         gdkwin32id.o \
49         gdkwindow-win32.o
50
51 ../../config.h : ../../config.h.win32
52         cp ../../config.h.win32 ../../config.h
53
54 ../gdkconfig.h : ../gdkconfig.h.win32
55         cp ../gdkconfig.h.win32 ../gdkconfig.h
56
57 # Kludge to get the path to the win32 headers
58 WIN32APIHEADERS = $(shell echo "\#include <winver.h>" | $(CC) -M -E - | tail -1 | sed -e 's!/winver.h!!')
59
60 gdk-win32res.o : rc/gdk.rc gdk-build.tmp
61         m4 -DBUILDNUMBER=`cat gdk-build.tmp` <rc/gdk.rc >gdk-win32res.rc
62         windres --include-dir rc --include-dir $(WIN32APIHEADERS) gdk-win32res.rc gdk-win32res.o
63         rm gdk-build.tmp gdk-win32res.rc
64
65 # Magic to bump the build number
66 gdk-build.tmp :
67         bash -c "read number && echo $$[number+1]" <gdk-build.stamp >gdk-build.tmp
68         cp gdk-build.tmp gdk-build.stamp
69
70 libgdk-win32.a : $(gdk_win32_OBJECTS) 
71         -rm -f $@
72         $(AR) rv $@ $(gdk_win32_OBJECTS)
73
74 libwntab32x.a : $(WTKIT)/lib/i386/wntab32x.lib
75         cp $(WTKIT)/lib/i386/wntab32x.lib libwntab32x.a
76
77 .SUFFIXES: .c .o .i
78
79 .c.o :
80         $(CC) $(CFLAGS) -c -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $<
81
82 .c.i :
83         $(CC) $(CFLAGS) -E -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $< >$@
84
85 clean:
86         -rm *.exe *.o *.dll *.a *.exp *.base