summaryrefslogtreecommitdiff
blob: d69f9800e54fede4b3b56121f78673f670fd4e4a (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
--- linuxwacom-0.6.9/configure.in.orig	2005-08-08 17:40:18.000000000 -0700
+++ linuxwacom-0.6.9/configure.in	2005-08-08 17:40:20.000000000 -0700
@@ -293,10 +293,21 @@ if test "$enable_tabletdev" != "no"; the
 	fi
 fi
 
+dnl Check for dlloader
+WCM_OPTION_DLLOADER=no
+AC_ARG_ENABLE(dlloader,
+AC_HELP_STRING([--enable-dlloader], [Use dlloader  [[default=no]]]),
+	, enable_dlloader=no)
+if test "$enable_dlloader" != "no"; then
+	WCM_OPTION_DLLOADER=yes
+fi
+
+AM_CONDITIONAL(WCM_DLLOADER, test "$WCM_OPTION_DLLOADER" == "yes")
+
 dnl Check for wacomdrv build
 WCM_OPTION_WACOMDRV=no
 AC_ARG_ENABLE(wacomdrv,
-AC_HELP_STRING([--enable-wacomdrv], [Enable building wacom_drv.o [[default=yes]]]),
+AC_HELP_STRING([--enable-wacomdrv], [Enable building wacom_drv.{o,so} [[default=yes]]]),
 	, enable_wacomdrv=yes)
 if test "$enable_wacomdrv" != "no"; then
 	if test "$WCM_ENV_XF86" != "yes" && test "$WCM_ENV_XORGSDK" != "yes"; then
@@ -307,8 +318,14 @@ if test "$enable_wacomdrv" != "no"; then
 		echo "***"
 	else
 		WCM_OPTION_WACOMDRV=yes
-		WCM_XF86MODULES="$WCM_XF86MODULES wacom_drv.o"
-		WCM_EXPMODULES="$WCM_EXPMODULES wacom_drv.o"
+
+		if test "$WCM_OPTION_DLLOADER" == "yes" ; then
+			WCM_XF86MODULES="$WCM_XF86MODULES wacom_drv.so"
+			WCM_EXPMODULES="$WCM_EXPMODULES wacom_drv.so"
+		else
+			WCM_XF86MODULES="$WCM_XF86MODULES wacom_drv.o"
+			WCM_EXPMODULES="$WCM_EXPMODULES wacom_drv.o"
+		fi
 	fi
 fi
 
@@ -334,18 +351,6 @@ if test "$enable_xserver64" != "no"; the
 	fi
 fi
 
-dnl Check for dlloader
-WCM_OPTION_DLLOADER=no
-AC_ARG_ENABLE(dlloader,
-AC_HELP_STRING([--enable-dlloader], [Use dlloader  [[default=no]]]),
-	, enable_dlloader=no)
-if test "$enable_dlloader" != "no"; then
-	CFLAGS="$CFLAGS -fPIC"
-	WCM_OPTION_DLLOADER=yes
-fi
-
-AM_CONDITIONAL(WCM_DLLOADER, test "$WCM_OPTION_DLLOADER" == "yes")
-
 dnl Check for modver
 AC_ARG_ENABLE(modver,
 AC_HELP_STRING([--enable-modver], [Enable kernel module versioning [[default=usually]]]),
@@ -552,7 +557,13 @@ echo "            evdev.o - $WCM_OPTION_
 echo "         mousedev.o - $WCM_OPTION_MOUSEDEV"
 echo "            input.o - $WCM_OPTION_INPUT"
 echo "        tabletdev.o - $WCM_OPTION_TABLETDEV"
+if test "$WCM_OPTION_DLLOADER" == "yes" ; then
+echo "        wacom_drv.so - $WCM_OPTION_WACOMDRV $WCM_PATCH_WACOMDRV"
+echo "        wacom_drv.o - no"
+else
+echo "        wacom_drv.so - no"
 echo "        wacom_drv.o - $WCM_OPTION_WACOMDRV $WCM_PATCH_WACOMDRV"
+fi
 echo "----------------------------------------"
 
 dnl Check for x86_64 kernel
--- linuxwacom-0.6.9/src/Makefile.am.orig	2005-08-08 17:42:34.000000000 -0700
+++ linuxwacom-0.6.9/src/Makefile.am	2005-08-08 17:43:51.000000000 -0700
@@ -17,7 +17,7 @@ DEPFLAGS = @WCM_DEPFLAGS@
 # potentially be built or installed depending on the results of
 # the configuration.
 EXTRA_PROGRAMS = wacdump xidump xsetwacom 
-EXTRA_SCRIPTS = wacom_drv.o wacomcpl wacomcpl-exec
+EXTRA_SCRIPTS = wacom_drv.o wacom_drv.so wacomcpl wacomcpl-exec
 
 # Source dependencies
 wacdump_SOURCES = wacdump.c wacscrn.c wacscrn.h \
@@ -75,17 +75,27 @@ LINUX_INPUT=@WCM_LINUX_INPUT@
 XF86OBJS = xf86Wacom.o wcmSerial.o wcmUSB.o wcmISDV4.o \
 		wcmCommon.o wcmCompat.o wcmConfig.o wcmFilter.o
 
+XF86OBJS_PIC = $(XF86OBJS:.o=.lo)
+
 xf86Wacom.o: xf86Wacom.c xf86Wacom.h Makefile
+xf86Wacom.lo: xf86Wacom.c xf86Wacom.h Makefile
 wcmSerial.o: wcmSerial.c wcmSerial.h xf86Wacom.h
+wcmSerial.lo: wcmSerial.c wcmSerial.h xf86Wacom.h
 wcmISDV4.o: wcmISDV4.c wcmSerial.h xf86Wacom.h
+wcmISDV4.lo: wcmISDV4.c wcmSerial.h xf86Wacom.h
 wcmUSB.o: wcmUSB.c xf86Wacom.h
+wcmUSB.lo: wcmUSB.c xf86Wacom.h
 wcmCommon.o: wcmCommon.c xf86Wacom.h
+wcmCommon.lo: wcmCommon.c xf86Wacom.h
 wcmCompat.o: wcmCompat.c xf86Wacom.h
+wcmCompat.lo: wcmCompat.c xf86Wacom.h
 wcmConfig.o: wcmConfig.c xf86Wacom.h
+wcmConfig.lo: wcmConfig.c xf86Wacom.h
 wcmFilter.o: wcmFilter.c xf86Wacom.h
+wcmFilter.lo: wcmFilter.c xf86Wacom.h
 
 $(XF86OBJS): xf86Wacom.c Makefile
-	gcc $(CFLAGS) $(DEPFLAGS) -pipe -ansi \
+	$(CC) $(CFLAGS) $(DEPFLAGS) -pipe -ansi \
 		-pedantic -Wall -Wpointer-arith $(NO_MERGE_CONSTANTS) \
 		-I.  $(DRIVER_INCLUDES) -Dlinux \
 		-D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE \
@@ -101,9 +111,25 @@ $(XF86OBJS): xf86Wacom.c Makefile
 		-DNARROWPROTO -DIN_MODULE -DXFree86Module $(LINUX_INPUT) \
 		-o $@ -c $(subst .o,.c,$@)
 
-wacom_drv.o: $(XF86OBJS)
-	ld -r $(XF86OBJS) -o wacom_drv.o
+$(XF86OBJS_PIC): xf86Wacom.c Makefile 
+	$(CC) $(CFLAGS) $(DEPFLAGS) -fPIC -pipe -ansi \
+		-pedantic -Wall -Wpointer-arith $(NO_MERGE_CONSTANTS) \
+		-I.  $(DRIVER_INCLUDES) -Dlinux \
+		-D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE \
+		-D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE \
+		-DSHAPE -DXINPUT -DXKB -DLBX -DXAPPGROUP -DXCSECURITY \
+		-DTOGCUP -DXF86BIGFONT -DDPMSExtension -DPIXPRIV -DPANORAMIX \
+		-DRENDER -DGCCUSESGAS -DAVOID_GLYPHBLT -DPIXPRIV \
+		-DSINGLEDEPTH -DXFreeXDGA -DXvExtension -DXFree86LOADER \
+		-DXFree86Server -DXF86VIDMODE -DXvMCExtension \
+		-DSMART_SCHEDULE -DBUILDDEBUG -DXResExtension \
+		-DX_BYTE_ORDER=X_LITTLE_ENDIAN $(XSERVER64) \
+		-DNDEBUG -DFUNCPROTO=15 \
+		-DNARROWPROTO -DIN_MODULE -DXFree86Module $(LINUX_INPUT) \
+		-o $@ -c $(subst .lo,.c,$@)
 
-if WCM_DLLOADER
-	gcc -fPIC -shared -nostdlib -o wacom_drv.so wacom_drv.o -Bstatic -lgcc
-endif
+wacom_drv.so: $(XF86OBJS_PIC)
+	$(CC) -shared -nostdlib -o wacom_drv.so $(XF86OBJS_PIC) -Bstatic -lgcc
+
+wacom_drv.o: $(XF86OBJS)
+	$(LD) -r $(XF86OBJS) -o wacom_drv.o