1 ## Makefile for building the machine dependent part of GDK with gcc on cygwin
2 ## Use: make -f makefile.cygwin
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
10 ################################################################
12 # Nothing much configurable below
14 CC = gcc -mno-cygwin -mpentium -fnative-struct
20 CFLAGS = $(OPTIMIZE) -I . -I .. -I ../.. -I $(WTKIT)/include -I $(GLIB) -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
46 gdkselection-win32.o \
51 ../../config.h : ../../config.h.win32
52 cp ../../config.h.win32 ../../config.h
54 ../gdkconfig.h : ../gdkconfig.h.win32
55 cp ../gdkconfig.h.win32 ../gdkconfig.h
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!!')
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
65 # Magic to bump the build number
67 bash -c "read number && echo $$[number+1]" <gdk-build.stamp >gdk-build.tmp
68 cp gdk-build.tmp gdk-build.stamp
70 libgdk-win32.a : $(gdk_win32_OBJECTS)
72 $(AR) rv $@ $(gdk_win32_OBJECTS)
74 libwntab32x.a : $(WTKIT)/lib/i386/wntab32x.lib
75 cp $(WTKIT)/lib/i386/wntab32x.lib libwntab32x.a
80 $(CC) $(CFLAGS) -c -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $<
83 $(CC) $(CFLAGS) -E -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $< >$@
86 -rm *.exe *.o *.dll *.a *.exp *.base