2013-10-26 15:34:57 +02:00
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
FASM = e:/fasm/fasm.exe
|
|
|
|
|
2015-01-05 20:15:42 +01:00
|
|
|
DEFINES = -D__KERNEL__ -DCONFIG_X86_32 -DCONFIG_TINY_RCU -DCONFIG_X86_L1_CACHE_SHIFT=6
|
|
|
|
DEFINES += -DCONFIG_ARCH_HAS_CACHE_LINE_SIZE -DCONFIG_DRM_I915_FBDEV -DCONFIG_DMI -DKBUILD_MODNAME=\"i915.dll\"
|
|
|
|
|
2013-10-26 15:34:57 +02:00
|
|
|
|
|
|
|
DDK_TOPDIR = /d/kos/kolibri/drivers/ddk
|
|
|
|
DRV_INCLUDES = /d/kos/kolibri/drivers/include
|
|
|
|
DRM_TOPDIR = $(CURDIR)/..
|
|
|
|
|
2015-01-05 20:15:42 +01:00
|
|
|
INCLUDES = -I$(DRV_INCLUDES) \
|
|
|
|
-I$(DRV_INCLUDES)/asm \
|
|
|
|
-I$(DRV_INCLUDES)/uapi \
|
|
|
|
-I$(DRV_INCLUDES)/drm -I./ -I$(DRV_INCLUDES)
|
2013-10-26 15:34:57 +02:00
|
|
|
|
2014-08-26 12:13:45 +02:00
|
|
|
CFLAGS_OPT = -Os -march=i686 -msse2 -fomit-frame-pointer -fno-builtin-printf -fno-ident -mno-stack-arg-probe
|
2013-10-26 15:34:57 +02:00
|
|
|
CFLAGS_OPT+= -mpreferred-stack-boundary=2 -mincoming-stack-boundary=2 -mno-ms-bitfields -flto
|
|
|
|
CFLAGS = -c $(INCLUDES) $(DEFINES) $(CFLAGS_OPT)
|
|
|
|
|
2013-12-20 04:54:51 +01:00
|
|
|
LIBPATH:= ../../../ddk
|
2013-10-26 15:34:57 +02:00
|
|
|
|
2013-12-20 04:54:51 +01:00
|
|
|
LIBS:= -lddk -lcore -lgcc
|
2013-10-26 15:34:57 +02:00
|
|
|
|
2014-08-26 12:13:45 +02:00
|
|
|
PE_FLAGS = --major-os-version,0,--minor-os-version,7,--major-subsystem-version,0,--minor-subsystem-version,5,--subsystem,native
|
|
|
|
|
|
|
|
LDFLAGS = -e,_drvEntry,-nostdlib,-shared,-s,$(PE_FLAGS),--image-base,0,--file-alignment,512,--section-alignment,4096
|
2013-10-26 15:34:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
NAME:= i915
|
|
|
|
|
|
|
|
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 \
|
|
|
|
i915_drv.h \
|
|
|
|
bitmap.h
|
|
|
|
|
|
|
|
NAME_SRC= main.c \
|
|
|
|
pci.c \
|
|
|
|
dvo_ch7017.c \
|
|
|
|
dvo_ch7xxx.c \
|
|
|
|
dvo_ivch.c \
|
|
|
|
dvo_ns2501.c \
|
|
|
|
dvo_sil164.c \
|
|
|
|
dvo_tfp410.c \
|
2014-08-26 12:13:45 +02:00
|
|
|
i915_cmd_parser.c \
|
2013-10-26 15:34:57 +02:00
|
|
|
i915_dma.c \
|
|
|
|
i915_drv.c \
|
|
|
|
i915_gem.c \
|
|
|
|
i915_gem_context.c \
|
|
|
|
i915_gem_execbuffer.c \
|
2014-08-26 12:13:45 +02:00
|
|
|
i915_gem_evict.c \
|
2014-02-06 08:11:21 +01:00
|
|
|
i915_gem_gtt.c \
|
2014-08-26 12:13:45 +02:00
|
|
|
i915_gem_render_state.c \
|
2013-10-26 15:34:57 +02:00
|
|
|
i915_gem_stolen.c \
|
|
|
|
i915_gem_tiling.c \
|
2013-10-29 08:50:17 +01:00
|
|
|
i915_gpu_error.c \
|
2013-10-26 15:34:57 +02:00
|
|
|
i915_irq.c \
|
2014-08-26 12:13:45 +02:00
|
|
|
i915_params.c \
|
2015-01-05 20:15:42 +01:00
|
|
|
intel_audio.c \
|
2013-10-26 15:34:57 +02:00
|
|
|
intel_bios.c \
|
|
|
|
intel_crt.c \
|
|
|
|
intel_ddi.c \
|
|
|
|
intel_display.c \
|
|
|
|
intel_dp.c \
|
2014-08-26 12:13:45 +02:00
|
|
|
intel_dp_mst.c \
|
2014-02-06 08:11:21 +01:00
|
|
|
intel_dsi.c \
|
|
|
|
intel_dsi_cmd.c \
|
2014-08-26 12:13:45 +02:00
|
|
|
intel_dsi_panel_vbt.c \
|
2014-02-06 08:11:21 +01:00
|
|
|
intel_dsi_pll.c \
|
2013-10-26 15:34:57 +02:00
|
|
|
intel_dvo.c \
|
2014-02-06 08:11:21 +01:00
|
|
|
intel_fbdev.c \
|
2015-01-05 20:15:42 +01:00
|
|
|
intel_fifo_underrun.c \
|
|
|
|
intel_frontbuffer.c \
|
2013-10-26 15:34:57 +02:00
|
|
|
intel_hdmi.c \
|
|
|
|
intel_i2c.c \
|
2015-01-05 20:15:42 +01:00
|
|
|
intel_lrc.c \
|
2013-10-26 15:34:57 +02:00
|
|
|
intel_lvds.c \
|
|
|
|
intel_modes.c \
|
|
|
|
intel_panel.c \
|
|
|
|
intel_pm.c \
|
2015-01-05 20:15:42 +01:00
|
|
|
intel_psr.c \
|
2014-08-26 12:13:45 +02:00
|
|
|
intel_renderstate_gen6.c \
|
|
|
|
intel_renderstate_gen7.c \
|
|
|
|
intel_renderstate_gen8.c \
|
2015-01-05 20:15:42 +01:00
|
|
|
intel_renderstate_gen9.c \
|
2013-10-26 15:34:57 +02:00
|
|
|
intel_ringbuffer.c \
|
2015-01-05 20:15:42 +01:00
|
|
|
intel_runtime_pm.c \
|
2013-10-26 15:34:57 +02:00
|
|
|
intel_sdvo.c \
|
|
|
|
intel_sideband.c \
|
|
|
|
intel_sprite.c \
|
|
|
|
intel_uncore.c \
|
|
|
|
kms_display.c \
|
2013-12-17 07:12:18 +01:00
|
|
|
kos_gem_fb.c \
|
2013-10-26 15:34:57 +02:00
|
|
|
utils.c \
|
|
|
|
../hdmi.c \
|
|
|
|
Gtt/intel-agp.c \
|
|
|
|
Gtt/intel-gtt.c \
|
2013-12-17 07:12:18 +01:00
|
|
|
../drm_cache.c \
|
2013-10-26 15:34:57 +02:00
|
|
|
../drm_global.c \
|
|
|
|
../drm_drv.c \
|
|
|
|
../drm_vma_manager.c \
|
|
|
|
$(DRM_TOPDIR)/i2c/i2c-core.c \
|
|
|
|
$(DRM_TOPDIR)/i2c/i2c-algo-bit.c \
|
|
|
|
$(DRM_TOPDIR)/drm_crtc.c \
|
|
|
|
$(DRM_TOPDIR)/drm_crtc_helper.c \
|
|
|
|
$(DRM_TOPDIR)/drm_dp_helper.c \
|
2014-08-26 12:13:45 +02:00
|
|
|
../drm_dp_mst_topology.c \
|
2015-01-05 20:15:42 +01:00
|
|
|
$(DRM_TOPDIR)/drm_atomic.c \
|
2013-10-26 15:34:57 +02:00
|
|
|
$(DRM_TOPDIR)/drm_edid.c \
|
|
|
|
$(DRM_TOPDIR)/drm_fb_helper.c \
|
|
|
|
$(DRM_TOPDIR)/drm_gem.c \
|
|
|
|
$(DRM_TOPDIR)/drm_irq.c \
|
|
|
|
$(DRM_TOPDIR)/drm_mm.c \
|
|
|
|
$(DRM_TOPDIR)/drm_modes.c \
|
2014-08-26 12:13:45 +02:00
|
|
|
$(DRM_TOPDIR)/drm_modeset_lock.c \
|
2013-10-26 15:34:57 +02:00
|
|
|
$(DRM_TOPDIR)/drm_pci.c \
|
2014-08-26 12:13:45 +02:00
|
|
|
$(DRM_TOPDIR)/drm_plane_helper.c \
|
|
|
|
$(DRM_TOPDIR)/drm_probe_helper.c \
|
2013-10-26 15:34:57 +02:00
|
|
|
$(DRM_TOPDIR)/drm_rect.c \
|
|
|
|
$(DRM_TOPDIR)/drm_stub.c
|
|
|
|
|
|
|
|
SRC_DEP:=
|
|
|
|
|
|
|
|
|
|
|
|
NAME_OBJS = $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\
|
|
|
|
$(patsubst %.c, %.o, $(NAME_SRC))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
all: $(NAME).dll
|
|
|
|
|
2014-08-26 12:13:45 +02:00
|
|
|
$(NAME).dll: $(NAME_OBJS) $(FW_BINS) $(SRC_DEP) i915.lds Makefile.lto
|
2013-10-26 15:34:57 +02:00
|
|
|
$(CC) $(CFLAGS_OPT) -fwhole-program -nostdlib -Wl,-L$(LIBPATH),$(LDFLAGS),-T,i915.lds -o $@ $(NAME_OBJS) $(LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
%.o : %.c $(HFILES) Makefile.lto
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -o $@ $<
|
|
|
|
|
|
|
|
%.o : %.S $(HFILES) Makefile.lto
|
|
|
|
as -o $@ $<
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f ../*/*.o
|
|
|
|
|
|
|
|
|