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
|
--- Makefile.orig Sun Jul 16 00:58:26 2006
+++ Makefile Sun Aug 13 10:47:35 2006
@@ -12,14 +12,14 @@
MANDIR = $(DESTDIR)$(PREFIX)/man
ifeq ($(ARCH),)
- ARCH = $(shell /bin/arch)
+ ARCH = $(shell uname -m)
endif
ifeq ($(ARCH),amd64)
- ARCH = x86_64
+ override ARCH = x86_64
endif
ifeq ($(ARCH),x86_64)
ARCH_DEFINES = -D__x86_64__ -D_XSERVER64
- LIBDIR = lib64
+ LIBDIR = lib
else
ARCH_DEFINES = -D__i386__
LIBDIR = lib
@@ -39,7 +39,7 @@
-I$(INSTALLED_X)/include/X11/extensions \
-I$(SDKDIR)
else
- INSTALLED_X = /usr/X11R6
+ INSTALLED_X = ${LOCALBASE}
INPUT_MODULE_DIR = $(DESTDIR)/$(INSTALLED_X)/$(LIBDIR)/modules/input
SYNAPTICS_DRV = synaptics_drv.o
LDCOMBINEFLAGS = -r
@@ -62,12 +62,16 @@
else
SERVERSRC = $(TOP)/programs/Xserver
ALLINCLUDES = -I. \
+ -I${LOCALBASE}/include \
+ -I${LOCALBASE}/include/X11 \
+ -I$(SERVERSRC)/hw/xfree86 \
-I$(SERVERSRC)/hw/xfree86/common \
-I$(SERVERSRC)/hw/xfree86/os-support \
+ -I$(SERVERSRC)/hw/xfree86/os-support/bus \
-I$(SERVERSRC)/mi \
-I$(SERVERSRC)/include \
-I$(TOP)/include
- X_INCLUDES_ROOT = $(TOP)
+ X_INCLUDES_ROOT = $(LOCALBASE)
endif
endif
@@ -81,11 +85,11 @@
CCOPTIONS := -pedantic -Wall -Wpointer-arith
CCOPTIONS += $(call check_gcc,-fno-merge-constants,)
-CDEBUGFLAGS = -O2
-CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(PICFLAG) $(ALLDEFINES) -DVERSION="\"$(VERSION)\"" -DVERSION_ID="$(VERSION_ID)"
-CFLAGSCLIENT = $(CDEBUGFLAGS) $(CCOPTIONS) -DVERSION="\"$(VERSION)\"" -DVERSION_ID="$(VERSION_ID)" -I$(X_INCLUDES_ROOT)/include
+#CDEBUGFLAGS = -O2
+CFLAGS += $(CDEBUGFLAGS) $(CCOPTIONS) $(PICFLAG) $(ALLDEFINES) -DVERSION="\"$(VERSION)\"" -DVERSION_ID="$(VERSION_ID)"
+CFLAGSCLIENT += $(CCOPTIONS) -DVERSION="\"$(VERSION)\"" -DVERSION_ID="$(VERSION_ID)" -I$(X_INCLUDES_ROOT)/include
-CC = gcc
+#CC = gcc
SRCS = synaptics.c ps2comm.c eventcomm.c psmcomm.c alpscomm.c
OBJS = synaptics.o ps2comm.o eventcomm.o psmcomm.o alpscomm.o
@@ -94,29 +98,29 @@
$(RM) $@
$(CC) -c $(CFLAGS) $(_NOOP_) $*.c
-all:: $(SYNAPTICS_DRV) synclient syndaemon
+all:: $(SYNAPTICS_DRV) synclient
-install: $(BINDIR)/synclient $(BINDIR)/syndaemon $(INPUT_MODULE_DIR)/$(SYNAPTICS_DRV) install-man
+install: $(BINDIR)/synclient $(INPUT_MODULE_DIR)/$(SYNAPTICS_DRV) install-man
-install-man: $(MANDIR)/man1/synclient.1 $(MANDIR)/man1/syndaemon.1 $(MANDIR)/man5/synaptics.5
+install-man: $(MANDIR)/man1/synclient.1 $(MANDIR)/man5/synaptics.5
$(MANDIR)/man1/synclient.1: manpages/synclient.1
- install --mode=0644 -D $< $@
+ ${BSD_INSTALL_MAN} $< $@
$(MANDIR)/man1/syndaemon.1: manpages/syndaemon.1
install --mode=0644 -D $< $@
$(MANDIR)/man5/synaptics.5: manpages/synaptics.5
- install --mode=0644 -D $< $@
+ ${BSD_INSTALL_MAN} $< $@
$(BINDIR)/synclient : synclient
- install -D $< $@
+ ${BSD_INSTALL_PROGRAM} $< $@
$(BINDIR)/syndaemon : syndaemon
install -D $< $@
$(INPUT_MODULE_DIR)/$(SYNAPTICS_DRV) : $(SYNAPTICS_DRV)
- install --mode=0644 -D $< $@
+ ${BSD_INSTALL_DATA} $< $@
$(SYNAPTICS_DRV): $(OBJS)
$(RM) $@
|