2009-07-04 15:29:02 +02:00
|
|
|
|
2010-03-10 11:23:24 +01:00
|
|
|
|
2009-07-04 15:29:02 +02:00
|
|
|
CC = gcc
|
2011-01-25 13:53:48 +01:00
|
|
|
LD = ld
|
|
|
|
AS = as
|
2012-11-12 22:22:52 +01:00
|
|
|
FASM = fasm.exe
|
2010-02-12 14:55:15 +01:00
|
|
|
|
|
|
|
DEFINES = -D__KERNEL__ -DCONFIG_X86_32
|
2009-07-04 15:29:02 +02:00
|
|
|
|
2010-02-12 21:11:35 +01:00
|
|
|
DRV_TOPDIR = $(CURDIR)/../../..
|
2009-07-04 15:29:02 +02:00
|
|
|
DRM_TOPDIR = $(CURDIR)/..
|
|
|
|
|
2010-02-12 21:11:35 +01:00
|
|
|
DRV_INCLUDES = $(DRV_TOPDIR)/include
|
|
|
|
|
|
|
|
INCLUDES = -I$(DRV_INCLUDES) -I$(DRV_INCLUDES)/drm \
|
|
|
|
-I$(DRV_INCLUDES)/linux
|
2010-02-12 14:55:15 +01:00
|
|
|
|
2011-06-24 12:44:10 +02:00
|
|
|
CFLAGS = -c -Os $(INCLUDES) $(DEFINES) -march=i686 -fomit-frame-pointer -fno-builtin-printf
|
2010-02-12 14:55:15 +01:00
|
|
|
|
2010-02-12 21:11:35 +01:00
|
|
|
LIBPATH:= $(DRV_TOPDIR)/ddk
|
2009-07-04 15:29:02 +02:00
|
|
|
|
2010-09-28 00:55:59 +02:00
|
|
|
LIBS:= -lddk -lcore
|
2009-07-04 15:29:02 +02:00
|
|
|
|
2010-02-12 14:55:15 +01:00
|
|
|
LDFLAGS = -nostdlib -shared -s -Map atikms.map --image-base 0\
|
|
|
|
--file-alignment 512 --section-alignment 4096
|
2009-07-04 15:29:02 +02:00
|
|
|
|
2010-02-12 14:55:15 +01:00
|
|
|
|
|
|
|
NAME:= atikms
|
2009-07-04 15:29:02 +02:00
|
|
|
|
2010-02-12 21:11:35 +01:00
|
|
|
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 \
|
2009-07-05 11:51:42 +02:00
|
|
|
atom.h \
|
|
|
|
radeon.h \
|
2009-07-04 15:29:02 +02:00
|
|
|
radeon_asic.h
|
|
|
|
|
2009-07-05 11:51:42 +02:00
|
|
|
NAME_SRC= \
|
|
|
|
pci.c \
|
2009-07-04 15:29:02 +02:00
|
|
|
$(DRM_TOPDIR)/drm_crtc.c \
|
|
|
|
$(DRM_TOPDIR)/drm_crtc_helper.c \
|
2010-02-12 14:55:15 +01:00
|
|
|
$(DRM_TOPDIR)/drm_dp_i2c_helper.c \
|
2012-11-03 03:41:31 +01:00
|
|
|
$(DRM_TOPDIR)/drm_edid.c \
|
|
|
|
$(DRM_TOPDIR)/drm_fb_helper.c \
|
|
|
|
$(DRM_TOPDIR)/drm_irq.c \
|
|
|
|
$(DRM_TOPDIR)/drm_mm.c \
|
|
|
|
$(DRM_TOPDIR)/drm_modes.c \
|
|
|
|
$(DRM_TOPDIR)/drm_pci.c \
|
|
|
|
$(DRM_TOPDIR)/drm_stub.c \
|
2009-07-04 15:29:02 +02:00
|
|
|
$(DRM_TOPDIR)/i2c/i2c-core.c \
|
|
|
|
$(DRM_TOPDIR)/i2c/i2c-algo-bit.c \
|
2012-12-16 20:05:06 +01:00
|
|
|
bitmap.c \
|
|
|
|
hmm.c \
|
2011-09-12 21:51:02 +02:00
|
|
|
r700_vs.c \
|
2009-07-05 11:51:42 +02:00
|
|
|
radeon_device.c \
|
2011-06-29 07:52:36 +02:00
|
|
|
evergreen.c \
|
|
|
|
evergreen_blit_shaders.c \
|
2011-07-17 18:57:53 +02:00
|
|
|
evergreen_blit_kms.c \
|
2012-11-03 03:41:31 +01:00
|
|
|
evergreen_hdmi.c \
|
2011-07-15 08:38:31 +02:00
|
|
|
cayman_blit_shaders.c \
|
2009-07-05 11:51:42 +02:00
|
|
|
radeon_clocks.c \
|
2009-07-04 15:29:02 +02:00
|
|
|
atom.c \
|
2011-06-30 11:19:47 +02:00
|
|
|
ni.c \
|
2009-10-21 11:33:33 +02:00
|
|
|
radeon_agp.c \
|
2011-06-24 12:44:10 +02:00
|
|
|
radeon_asic.c \
|
2011-07-15 08:38:31 +02:00
|
|
|
radeon_atombios.c \
|
2011-07-17 18:57:53 +02:00
|
|
|
radeon_benchmark.c \
|
2011-07-15 08:38:31 +02:00
|
|
|
radeon_bios.c \
|
|
|
|
radeon_combios.c \
|
|
|
|
radeon_connectors.c \
|
2009-07-04 15:29:02 +02:00
|
|
|
atombios_crtc.c \
|
2010-02-12 14:55:15 +01:00
|
|
|
atombios_dp.c \
|
2012-11-03 03:41:31 +01:00
|
|
|
atombios_encoders.c \
|
|
|
|
atombios_i2c.c \
|
2009-07-04 15:29:02 +02:00
|
|
|
radeon_encoders.c \
|
2011-07-15 08:38:31 +02:00
|
|
|
radeon_fence.c \
|
|
|
|
radeon_gem.c \
|
|
|
|
radeon_i2c.c \
|
|
|
|
radeon_irq_kms.c \
|
2009-07-04 15:29:02 +02:00
|
|
|
radeon_legacy_crtc.c \
|
|
|
|
radeon_legacy_encoders.c \
|
2009-09-26 16:08:05 +02:00
|
|
|
radeon_legacy_tv.c \
|
2009-07-04 15:29:02 +02:00
|
|
|
radeon_display.c \
|
2009-07-05 11:51:42 +02:00
|
|
|
radeon_gart.c \
|
|
|
|
radeon_ring.c \
|
2010-02-12 14:55:15 +01:00
|
|
|
radeon_object_kos.c \
|
2012-11-03 03:41:31 +01:00
|
|
|
radeon_sa.c \
|
|
|
|
radeon_semaphore.c \
|
2011-06-24 12:44:10 +02:00
|
|
|
radeon_pm.c \
|
2009-07-05 11:51:42 +02:00
|
|
|
r100.c \
|
2009-09-26 16:08:05 +02:00
|
|
|
r200.c \
|
2009-07-05 11:51:42 +02:00
|
|
|
r300.c \
|
2009-07-14 10:26:48 +02:00
|
|
|
r420.c \
|
2009-07-05 11:51:42 +02:00
|
|
|
rv515.c \
|
|
|
|
r520.c \
|
2009-10-24 23:42:25 +02:00
|
|
|
r600.c \
|
2011-07-17 18:57:53 +02:00
|
|
|
r600_blit_kms.c \
|
|
|
|
r600_blit_shaders.c \
|
2010-02-12 14:55:15 +01:00
|
|
|
r600_hdmi.c \
|
2009-07-14 10:26:48 +02:00
|
|
|
rs400.c \
|
|
|
|
rs600.c \
|
|
|
|
rs690.c \
|
2009-10-24 23:42:25 +02:00
|
|
|
rv770.c \
|
2009-09-28 10:42:03 +02:00
|
|
|
radeon_fb.c \
|
2009-11-02 21:36:12 +01:00
|
|
|
rdisplay.c \
|
|
|
|
rdisplay_kms.c \
|
2009-12-10 20:32:56 +01:00
|
|
|
cmdline.c \
|
2012-11-03 03:41:31 +01:00
|
|
|
si.c \
|
|
|
|
si_blit_shaders.c \
|
2010-02-13 22:28:53 +01:00
|
|
|
fwblob.asm
|
|
|
|
|
2010-02-14 10:15:19 +01:00
|
|
|
FW_BINS= \
|
|
|
|
firmware/R100_cp.bin \
|
|
|
|
firmware/R200_cp.bin \
|
|
|
|
firmware/R300_cp.bin \
|
|
|
|
firmware/R420_cp.bin \
|
|
|
|
firmware/R520_cp.bin \
|
|
|
|
\
|
|
|
|
firmware/RS690_cp.bin \
|
|
|
|
firmware/RS600_cp.bin \
|
|
|
|
firmware/RS780_me.bin \
|
|
|
|
firmware/RS780_pfp.bin \
|
|
|
|
\
|
|
|
|
firmware/RV610_me.bin \
|
|
|
|
firmware/RV620_me.bin \
|
|
|
|
firmware/RV630_me.bin \
|
|
|
|
firmware/RV635_me.bin \
|
|
|
|
firmware/RV670_me.bin \
|
|
|
|
firmware/RV710_me.bin \
|
|
|
|
firmware/RV730_me.bin \
|
|
|
|
firmware/RV770_me.bin \
|
|
|
|
\
|
|
|
|
firmware/RV610_pfp.bin \
|
|
|
|
firmware/RV620_pfp.bin \
|
|
|
|
firmware/RV630_pfp.bin \
|
|
|
|
firmware/RV635_pfp.bin \
|
|
|
|
firmware/RV670_pfp.bin \
|
|
|
|
firmware/RV710_pfp.bin \
|
|
|
|
firmware/RV730_pfp.bin \
|
|
|
|
firmware/RV770_pfp.bin \
|
|
|
|
\
|
|
|
|
firmware/R600_rlc.bin \
|
|
|
|
firmware/R700_rlc.bin
|
2009-07-04 15:29:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
SRC_DEP:=
|
|
|
|
|
|
|
|
|
2009-12-10 20:32:56 +01:00
|
|
|
NAME_OBJS = $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\
|
2009-09-26 16:08:05 +02:00
|
|
|
$(patsubst %.c, %.o, $(NAME_SRC))))
|
2009-07-04 15:29:02 +02:00
|
|
|
|
2011-06-29 07:52:36 +02:00
|
|
|
|
|
|
|
|
2009-07-04 15:29:02 +02:00
|
|
|
all: $(NAME).dll
|
|
|
|
|
2011-01-25 13:53:48 +01:00
|
|
|
$(NAME).dll: $(NAME_OBJS) $(FW_BINS) $(SRC_DEP) $(HFILES) $(LIBPATH)/libcore.a $(LIBPATH)/libddk.a atikms.lds Makefile
|
|
|
|
$(LD) -L$(LIBPATH) $(LDFLAGS) -T atikms.lds -o $@ $(NAME_OBJS) $(LIBS)
|
2009-07-04 15:29:02 +02:00
|
|
|
|
|
|
|
|
2009-09-26 16:08:05 +02:00
|
|
|
%.o : %.c $(HFILES) Makefile
|
2010-02-12 14:55:15 +01:00
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -o $@ $<
|
2009-12-10 20:32:56 +01:00
|
|
|
|
|
|
|
%.o : %.S $(HFILES) Makefile
|
2011-01-25 13:53:48 +01:00
|
|
|
$(AS) -o $@ $<
|
2010-02-13 22:28:53 +01:00
|
|
|
|
|
|
|
fwblob.o: fwblob.asm $(FW_BINS) Makefile
|
|
|
|
$(FASM) $< $@
|
|
|
|
|
2011-06-29 07:52:36 +02:00
|
|
|
|
2011-06-24 17:16:16 +02:00
|
|
|
clean:
|
|
|
|
-rm -f */*.o
|
|
|
|
|