2016-02-27 21:16:35 +01:00
|
|
|
CC = kos32-gcc
|
2013-10-23 10:20:04 +02:00
|
|
|
FASM = fasm.exe
|
|
|
|
|
2016-02-27 21:16:35 +01:00
|
|
|
DEFINES = -DDRM_DEBUG_CODE=0 -D__KERNEL__ -DCONFIG_X86_32 -DCONFIG_PCI -DCONFIG_X86_CMPXCHG64
|
|
|
|
DEFINES += -DCONFIG_TINY_RCU -DCONFIG_X86_L1_CACHE_SHIFT=6
|
|
|
|
DEFINES+= -DKBUILD_MODNAME=\"vmwgfx.dll\"
|
2013-10-23 10:20:04 +02:00
|
|
|
|
2016-02-27 21:16:35 +01:00
|
|
|
DDK_TOPDIR = /d/kos/kolibri/drivers/ddk
|
|
|
|
DRV_INCLUDES = /d/kos/kolibri/drivers/include
|
2014-02-10 06:07:22 +01:00
|
|
|
DRM_TOPDIR = $(CURDIR)/..
|
2013-10-23 10:20:04 +02:00
|
|
|
|
2016-02-27 21:16:35 +01:00
|
|
|
INCLUDES = -I$(DRV_INCLUDES) \
|
|
|
|
-I$(DRV_INCLUDES)/asm \
|
|
|
|
-I$(DRV_INCLUDES)/uapi \
|
|
|
|
-I$(DRV_INCLUDES)/drm -I./ -I$(DRV_INCLUDES)
|
2013-10-23 10:20:04 +02:00
|
|
|
|
2016-02-27 21:16:35 +01:00
|
|
|
CFLAGS= -c -O2 $(INCLUDES) $(DEFINES) -march=i686 -fno-ident -msse2 -fomit-frame-pointer -fno-builtin-printf
|
|
|
|
CFLAGS+= -mno-stack-arg-probe -mno-ms-bitfields
|
2013-10-23 10:20:04 +02:00
|
|
|
|
2016-02-27 21:16:35 +01:00
|
|
|
LIBPATH:= $(DDK_TOPDIR)
|
2013-10-23 10:20:04 +02:00
|
|
|
|
|
|
|
LIBS:= -lddk -lcore -lgcc
|
|
|
|
|
2016-02-27 21:16:35 +01:00
|
|
|
PE_FLAGS = --major-os-version 0 --minor-os-version 7 --major-subsystem-version 0 \
|
|
|
|
--minor-subsystem-version 5 --subsystem native
|
|
|
|
|
|
|
|
LDFLAGS = -nostdlib -shared -s $(PE_FLAGS) --image-base 0\
|
2013-10-23 10:20:04 +02:00
|
|
|
--file-alignment 512 --section-alignment 4096
|
|
|
|
|
|
|
|
|
|
|
|
NAME:= vmwgfx
|
|
|
|
|
|
|
|
HFILES:= $(DRV_INCLUDES)/linux/types.h \
|
|
|
|
$(DRV_INCLUDES)/linux/list.h \
|
|
|
|
$(DRV_INCLUDES)/linux/pci.h \
|
|
|
|
$(DRV_INCLUDES)/drm/drm.h \
|
|
|
|
$(DRV_INCLUDES)/drm/drmP.h \
|
|
|
|
$(DRV_INCLUDES)/drm/drm_edid.h \
|
|
|
|
$(DRV_INCLUDES)/drm/drm_crtc.h \
|
|
|
|
$(DRV_INCLUDES)/drm/drm_mode.h \
|
|
|
|
$(DRV_INCLUDES)/drm/drm_mm.h
|
|
|
|
|
|
|
|
NAME_SRC= \
|
2016-02-27 21:16:35 +01:00
|
|
|
vmwgfx_binding.c \
|
2013-10-23 10:20:04 +02:00
|
|
|
vmwgfx_buffer.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
vmwgfx_cmdbuf.c \
|
|
|
|
vmwgfx_cmdbuf_res.c \
|
2013-10-23 10:20:04 +02:00
|
|
|
vmwgfx_context.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
vmwgfx_cotable.c \
|
2013-10-23 10:20:04 +02:00
|
|
|
vmwgfx_dmabuf.c \
|
|
|
|
vmwgfx_drv.c \
|
|
|
|
vmwgfx_execbuf.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
vmwgfx_fb.c \
|
2013-10-23 10:20:04 +02:00
|
|
|
vmwgfx_fence.c \
|
|
|
|
vmwgfx_fifo.c \
|
|
|
|
vmwgfx_gmr.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
vmwgfx_gmrid_manager.c \
|
2013-10-23 10:20:04 +02:00
|
|
|
vmwgfx_irq.c \
|
|
|
|
vmwgfx_kms.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
vmwgfx_ldu.c \
|
2013-10-23 10:20:04 +02:00
|
|
|
vmwgfx_marker.c \
|
2014-02-10 06:07:22 +01:00
|
|
|
vmwgfx_mob.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
vmwgfx_overlay.c \
|
|
|
|
vmwgfx_prime.c \
|
2013-10-23 10:20:04 +02:00
|
|
|
vmwgfx_resource.c \
|
|
|
|
vmwgfx_scrn.c \
|
2014-02-10 06:07:22 +01:00
|
|
|
vmwgfx_shader.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
vmwgfx_so.c \
|
|
|
|
vmwgfx_stdu.c \
|
2013-10-23 10:20:04 +02:00
|
|
|
vmwgfx_surface.c \
|
|
|
|
vmwgfx_ttm_glue.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
main.c \
|
|
|
|
pci.c \
|
|
|
|
../hdmi.c \
|
2013-10-23 10:20:04 +02:00
|
|
|
../i2c/i2c-core.c \
|
|
|
|
../ttm/ttm_bo.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
../ttm/ttm_bo_manager.c \
|
|
|
|
../ttm/ttm_bo_util.c \
|
|
|
|
../ttm/ttm_execbuf_util.c \
|
2014-02-10 18:53:33 +01:00
|
|
|
../ttm/ttm_lock.c \
|
2013-10-23 10:20:04 +02:00
|
|
|
../ttm/ttm_memory.c \
|
|
|
|
../ttm/ttm_object.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
../ttm/ttm_page_alloc.c \
|
2013-10-23 10:20:04 +02:00
|
|
|
../ttm/ttm_tt.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
../drm_atomic.c \
|
|
|
|
../drm_atomic_helper.c \
|
|
|
|
../drm_bridge.c \
|
|
|
|
../drm_cache.c \
|
2013-10-27 05:53:36 +01:00
|
|
|
../drm_crtc.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
../drm_crtc_helper.c \
|
2013-10-27 05:53:36 +01:00
|
|
|
../drm_drv.c \
|
|
|
|
../drm_edid.c \
|
|
|
|
../drm_gem.c \
|
|
|
|
../drm_global.c \
|
|
|
|
../drm_hashtab.c \
|
|
|
|
../drm_irq.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
../drm_mm.c \
|
2013-10-27 05:53:36 +01:00
|
|
|
../drm_modes.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
../drm_modeset_lock.c \
|
2013-10-27 05:53:36 +01:00
|
|
|
../drm_pci.c \
|
2016-02-27 21:16:35 +01:00
|
|
|
../drm_plane_helper.c \
|
|
|
|
../drm_rect.c \
|
2013-10-27 05:53:36 +01:00
|
|
|
../drm_stub.c \
|
|
|
|
../drm_vma_manager.c
|
2013-10-23 10:20:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NAME_OBJS = $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\
|
|
|
|
$(patsubst %.c, %.o, $(NAME_SRC))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
all: $(NAME).dll
|
|
|
|
|
2016-02-27 21:16:35 +01:00
|
|
|
$(NAME).dll: $(NAME_OBJS) vmw.lds Makefile
|
2013-10-23 10:20:04 +02:00
|
|
|
$(LD) -L$(LIBPATH) $(LDFLAGS) -T vmw.lds -o $@ $(NAME_OBJS) $(LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
%.o : %.c $(HFILES) Makefile
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -o $@ $<
|
|
|
|
|
|
|
|
%.o : %.S $(HFILES) Makefile
|
|
|
|
$(AS) -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f */*.o
|
|
|
|
|