summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile
blob: 27ee448c00bd0bb19fc63415f231fdfa4318fe3c (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
XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile,v 1.44 2002/09/16 18:05:55 eich Exp $
XCOMM
XCOMM This is an Imakefile for the MGA driver.
XCOMM

#define IHaveModules
#include <Server.tmpl>

#if BuildMatroxHal
#define IHaveSubdirs
SUBDIRS=hallib
#endif

#if BuildXF86DRI
DRISRCS = mga_dri.c
DRIOBJS = mga_dri.o
DRIINCLUDES = -I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri \
	-I$(TOP)/include
DRIDEFINES = $(GLX_DEFINES)
#endif

#if DoLoadableServer && (HaveMatroxHal || BuildMatroxHal)
#define BuildHalModule YES
#else
#define BuildHalModule NO
#endif

#if !DoLoadableServer && UseMatroxHal && (HaveMatroxHal || BuildMatroxHal)
#define BuildHalStatic YES
#else
#define BuildHalStatic NO
#endif

#if BuildHalModule
MGAHALMODSRC = mga_halmod.c
MGAHALMODOBJ = mga_halmod.o
#endif

#if UseMatroxHal
MGAHALDEFINES = -DUSEMGAHAL
#if BuildMatroxHal
MGAHALINCLUDES = -Ihallib
#else
MGAHALINCLUDES = -IHALlib
#endif
#endif

#if BuildHalModule || BuildHalStatic
MGAHALSRCS = $(MGAHALMODSRC) clientlx.c
#if !BuildMatroxHal
MGAHALOBJS = $(MGAHALMODOBJ) clientlx.o HALlib/mgaHALlib.a
#else
MGAHALOBJS = $(MGAHALMODOBJ) clientlx.o hallib/libmga_hal.a
hallib/libmga_hal.a: $(SUBDIRS)
#endif
#endif

MGASRCS = mga_driver.c mga_hwcurs.c /* mga_cmap.c */ mga_dac3026.c mga_dacG.c \
       mga_storm8.c mga_storm16.c mga_storm24.c mga_storm32.c mga_arc.c \
       mga_dga.c mga_shadow.c mga_video.c mga_g450pll.c mga_dh.c mga_esc.c \
       mga_merge.c $(DRISRCS)
MGAOBJS = mga_driver.o mga_hwcurs.o /* mga_cmap.o */ mga_dac3026.o mga_dacG.o \
       mga_storm8.o mga_storm16.o mga_storm24.o mga_storm32.o mga_arc.o \
       mga_dga.o mga_shadow.o mga_video.o mga_g450pll.o mga_dh.o mga_esc.o \
       mga_merge.o $(DRIOBJS)

SRCS = $(MGASRCS) $(MGAHALSRCS)
OBJS = $(MGAOBJS) $(MGAHALOBJS)

#if defined(XF86DriverSDK)
INCLUDES = -I. -I../../include
#else
INCLUDES = -I. $(MGAHALINCLUDES) -I$(XF86COMSRC) -I$(XF86OSSRC) \
           -I$(SERVERSRC)/fb \
           -I$(SERVERSRC)/mfb -I$(SERVERSRC)/mi -I$(XF86SRC)/int10 \
           -I$(SERVERSRC)/cfb -I$(XF86SRC)/xaa -I$(XF86SRC)/rac \
           -I$(XF86SRC)/vgahw -I$(XF86SRC)/fbdevhw \
           -I$(XF86SRC)/ramdac -I$(XF86SRC)/ddc -I$(XF86SRC)/i2c \
           -I$(SERVERSRC)/Xext -I$(XF86SRC)/xf8_32bpp\
           -I$(FONTINCSRC) -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
           -I$(XF86SRC)/xf24_32bpp -I$(XF86SRC)/shadowfb -I$(EXTINCSRC) \
	   -I$(SERVERSRC)/render \
	   -I$(XF86OSSRC)/vbe $(DRIINCLUDES)
#endif

DEFINES = $(MGAHALDEFINES) $(DRIDEFINES)

#if MakeHasPosixVariableSubstitutions
SubdirLibraryRule($(OBJS))
#endif

ModuleObjectRule()

#if BuildHalStatic
ObjectModuleTarget(mga,$(OBJS))
#else
ObjectModuleTarget(mga,$(MGAOBJS))
#endif
#if BuildHalModule
ObjectModuleTarget(mga_hal,$(MGAHALOBJS))
#endif

ObjectFromSpecialSource(mga_storm8, mga_storm, -DPSZ=8)
ObjectFromSpecialSource(mga_storm16, mga_storm, -DPSZ=16)
ObjectFromSpecialSource(mga_storm24, mga_storm, -DPSZ=24)
ObjectFromSpecialSource(mga_storm32, mga_storm, -DPSZ=32)

InstallObjectModule(mga,$(MODULEDIR),drivers)
#if BuildHalModule
InstallObjectModule(mga_hal,$(MODULEDIR),drivers)
#endif

#if !defined(XF86DriverSDK)
InstallModuleManPage(mga)
#endif

DependTarget()

InstallDriverSDKNonExecFile(Imakefile,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga.h,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_arc.c,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_bios.h,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_dac3026.c,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_dacG.c,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_dga.c,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_driver.c,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_hwcurs.c,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_macros.h,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_map.h,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_reg.h,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_shadow.c,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_storm.c,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_video.c,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_halmod.c,$(DRIVERSDKDIR)/drivers/mga)
InstallDriverSDKNonExecFile(mga_common.h,$(DRIVERSDKDIR)/drivers/mga)

InstallDriverSDKObjectModule(mga,$(DRIVERSDKMODULEDIR),drivers)
#if BuildMatroxHal
InstallDriverSDKObjectModule(mga_hal,$(DRIVERSDKMODULEDIR),drivers)
#endif

#if BuildMatroxHal
MakeSubdirs($(SUBDIRS))
ForceSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
#endif