2013-10-27 05:53:36 +01:00
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
LD = ld
|
|
|
|
AS = as
|
|
|
|
FASM = fasm.exe
|
|
|
|
|
|
|
|
DEFINES = -D__KERNEL__ -DCONFIG_X86_32
|
|
|
|
|
2014-09-01 13:49:48 +02:00
|
|
|
DDK_TOPDIR = /d/kos/kolibri/drivers/ddk
|
|
|
|
DRV_INCLUDES = /d/kos/kolibri/drivers/include
|
2013-10-27 05:53:36 +01:00
|
|
|
DRM_TOPDIR = $(CURDIR)/..
|
|
|
|
|
|
|
|
INCLUDES = -I$(DRV_INCLUDES) -I$(DRV_INCLUDES)/drm \
|
2014-09-01 13:49:48 +02:00
|
|
|
-I$(DRV_INCLUDES)/linux -I$(DRV_INCLUDES)/linux/uapi
|
2013-10-27 05:53:36 +01:00
|
|
|
|
2014-09-01 13:49:48 +02:00
|
|
|
CFLAGS_OPT = -Os -fomit-frame-pointer -fno-builtin-printf -mno-stack-arg-probe
|
2013-10-27 05:53:36 +01:00
|
|
|
CFLAGS_OPT+= -mpreferred-stack-boundary=2 -mincoming-stack-boundary=2 -mno-ms-bitfields -flto
|
|
|
|
CFLAGS = -c $(INCLUDES) $(DEFINES) $(CFLAGS_OPT)
|
|
|
|
|
2014-09-01 13:49:48 +02:00
|
|
|
LIBPATH:= ../../../ddk
|
2013-10-27 05:53:36 +01:00
|
|
|
|
|
|
|
LIBS:= -lddk -lcore -lgcc
|
|
|
|
|
|
|
|
LDFLAGS = -e,_drvEntry,-nostdlib,-shared,-s,--image-base,0,--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= \
|
|
|
|
main.c \
|
|
|
|
pci.c \
|
|
|
|
vmwgfx_buffer.c \
|
|
|
|
vmwgfx_context.c \
|
|
|
|
vmwgfx_dmabuf.c \
|
|
|
|
vmwgfx_drv.c \
|
|
|
|
vmwgfx_execbuf.c \
|
|
|
|
vmwgfx_fence.c \
|
|
|
|
vmwgfx_fifo.c \
|
|
|
|
vmwgfx_gmr.c \
|
2014-09-01 13:49:48 +02:00
|
|
|
vmwgfx_gmrid_manager.c \
|
2013-10-27 05:53:36 +01:00
|
|
|
vmwgfx_irq.c \
|
|
|
|
vmwgfx_kms.c \
|
|
|
|
vmwgfx_marker.c \
|
2014-09-01 13:49:48 +02:00
|
|
|
vmwgfx_mob.c \
|
2013-10-27 05:53:36 +01:00
|
|
|
vmwgfx_resource.c \
|
|
|
|
vmwgfx_scrn.c \
|
2014-09-01 13:49:48 +02:00
|
|
|
vmwgfx_shader.c \
|
2013-10-27 05:53:36 +01:00
|
|
|
vmwgfx_surface.c \
|
|
|
|
vmwgfx_ttm_glue.c \
|
2014-09-01 13:49:48 +02:00
|
|
|
../hdmi.c \
|
2013-10-27 05:53:36 +01:00
|
|
|
../i2c/i2c-core.c \
|
|
|
|
../ttm/ttm_bo.c \
|
2014-09-01 13:49:48 +02:00
|
|
|
../ttm/ttm_bo_manager.c \
|
|
|
|
../ttm/ttm_execbuf_util.c \
|
|
|
|
../ttm/ttm_lock.c \
|
2013-10-27 05:53:36 +01:00
|
|
|
../ttm/ttm_memory.c \
|
|
|
|
../ttm/ttm_object.c \
|
2014-09-01 13:49:48 +02:00
|
|
|
../ttm/ttm_page_alloc.c \
|
2013-10-27 05:53:36 +01:00
|
|
|
../ttm/ttm_tt.c \
|
|
|
|
../drm_crtc.c \
|
2014-09-01 13:49:48 +02: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 \
|
2014-09-01 13:49:48 +02:00
|
|
|
../drm_mm.c \
|
2013-10-27 05:53:36 +01:00
|
|
|
../drm_modes.c \
|
|
|
|
../drm_pci.c \
|
|
|
|
../drm_stub.c \
|
|
|
|
../drm_vma_manager.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NAME_OBJS = $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\
|
|
|
|
$(patsubst %.c, %.o, $(NAME_SRC))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
all: $(NAME).dll
|
|
|
|
|
|
|
|
$(NAME).dll: $(NAME_OBJS) $(SRC_DEP) $(HFILES) vmw.lds Makefile
|
2014-09-01 13:49:48 +02:00
|
|
|
$(CC) $(CFLAGS_OPT) -fwhole-program -nostdlib -Wl,-L$(LIBPATH),$(LDFLAGS),-T,vmw.lds -o $@ $(NAME_OBJS) $(LIBS)
|
2013-10-27 05:53:36 +01:00
|
|
|
kpack $@
|
|
|
|
|
|
|
|
|
|
|
|
%.o : %.c $(HFILES) Makefile.lto
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -o $@ $<
|
|
|
|
|
|
|
|
%.o : %.S $(HFILES) Makefile.lto
|
|
|
|
as -o $@ $<
|
|
|
|
|
|
|
|
|
2014-09-01 13:49:48 +02:00
|
|
|
|
2013-10-27 05:53:36 +01:00
|
|
|
|