summaryrefslogtreecommitdiff
path: root/linux/Makefile.linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux/Makefile.linux')
-rw-r--r--linux/Makefile.linux32
1 files changed, 29 insertions, 3 deletions
diff --git a/linux/Makefile.linux b/linux/Makefile.linux
index 633d96c4..065d6f62 100644
--- a/linux/Makefile.linux
+++ b/linux/Makefile.linux
@@ -32,6 +32,8 @@
# make TREE=/usr/my-kernel-tree/include
#
+SHELL=/bin/sh
+
.SUFFIXES:
# *** Setup
@@ -44,7 +46,8 @@ LIBS =
DRMTEMPLATES = drm_auth.h drm_bufs.h drm_context.h drm_dma.h drm_drawable.h \
drm_drv.h drm_fops.h drm_init.h drm_ioctl.h drm_lists.h \
drm_lock.h drm_memory.h drm_proc.h drm_stub.h drm_vm.h
-DRMHEADERS = drm.h drmP.h drm_sarea.h
+DRMSHARED = drm_sarea.h
+DRMHEADERS = drm.h drmP.h $(DRMSHARED)
GAMMAOBJS = gamma_drv.o gamma_dma.o
GAMMAHEADERS = gamma_drv.h $(DRMHEADERS) $(DRMTEMPLATES)
@@ -54,10 +57,14 @@ TDFXHEADERS = tdfx.h $(DRMHEADERS) $(DRMTEMPLATES)
R128OBJS = r128_drv.o r128_cce.o r128_state.o r128_irq.o
R128HEADERS = r128.h r128_drv.h r128_drm.h $(DRMHEADERS) $(DRMTEMPLATES)
+R128SHARED = r128.h r128_drv.h r128_drm.h r128_cce.c r128_state.c r128_irq.c
-RADEONOBJS = radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o radeon_irq.o
+RADEONOBJS = radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o \
+ radeon_irq.o
RADEONHEADERS = radeon.h radeon_drv.h radeon_drm.h $(DRMHEADERS) \
$(DRMTEMPLATES)
+RADEONSHARED = radeon.h radeon_drv.h radeon_drm.h radeon_cp.c radeon_irq.c \
+ radeon_mem.c radeon_state.c
INC = /usr/include
@@ -160,11 +167,13 @@ endif
MGAOBJS = mga_drv.o mga_dma.o mga_state.o mga_warp.o mga_irq.o
MGAHEADERS = mga.h mga_drv.h mga_drm.h $(DRMHEADERS) $(DRMTEMPLATES)
+MGASHARED = mga.h mga_dma.c mga_drm.h mga_drv.h mga_state.c \
+ mga_ucode.h mga_warp.c
I810OBJS = i810_drv.o i810_dma.o
I810HEADERS = i810.h i810_drv.h i810_drm.h $(DRMHEADERS) $(DRMTEMPLATES)
-I830OBJS = i830_drv.o i830_dma.o
+I830OBJS = i830_drv.o i830_dma.o i830_irq.o
I830HEADERS = i830.h i830_drv.h i830_drm.h $(DRMHEADERS) $(DRMTEMPLATES)
endif
@@ -172,6 +181,10 @@ endif
ifeq ($(MACHINE),alpha)
MODCFLAGS+= -ffixed-8 -mno-fp-regs -mcpu=ev56 -Wa,-mev6
endif
+ifeq ($(MACHINE),x86_64)
+MODCFLAGS+= -mcmodel=kernel
+endif
+
MODS += sis.o
@@ -208,6 +221,15 @@ endif
# **** End of configuration
+# Link in shared headers if needed
+
+SHAREDSRC = $(DRMSHARED) $(MGASHARED) $(R128SHARED) $(RADEONSHARED)
+SHAREDDIR = ../../../shared/drm/kernel
+
+$(SHAREDSRC):
+ @if [ ! -r $@ ]; then (rm -f $@; set -x; ln -s $(SHAREDDIR)/$@ .); fi
+
+
dristat: dristat.c
$(CC) $(PRGCFLAGS) $< -o $@
@@ -280,3 +302,7 @@ endif
clean cleandir::
rm -f *.o *.a *~ core
+ @for i in $(SHAREDSRC); do \
+ if [ -L $$i ]; then (set -x; rm -f $$i); fi; \
+ done
+