Rev 1412 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1412 | Rev 1413 | ||
---|---|---|---|
1 | CC = gcc |
1 | CC = gcc |
2 | FASM = e:/fasm/fasm.exe |
2 | FASM = e:/fasm/fasm.exe |
3 | 3 | ||
4 | DEFINES = -D__KERNEL__ -DCONFIG_X86_32 |
4 | DEFINES = -D__KERNEL__ -DCONFIG_X86_32 |
5 | 5 | ||
6 | DRV_TOPDIR = $(CURDIR)/../../.. |
6 | DRV_TOPDIR = $(CURDIR)/../../.. |
7 | DRM_TOPDIR = $(CURDIR)/.. |
7 | DRM_TOPDIR = $(CURDIR)/.. |
8 | 8 | ||
9 | DRV_INCLUDES = $(DRV_TOPDIR)/include |
9 | DRV_INCLUDES = $(DRV_TOPDIR)/include |
10 | 10 | ||
11 | INCLUDES = -I$(DRV_INCLUDES) -I$(DRV_INCLUDES)/drm \ |
11 | INCLUDES = -I$(DRV_INCLUDES) -I$(DRV_INCLUDES)/drm \ |
12 | -I$(DRV_INCLUDES)/linux |
12 | -I$(DRV_INCLUDES)/linux |
13 | 13 | ||
14 | CFLAGS = -c -O2 $(INCLUDES) $(DEFINES) -march=i686 -fomit-frame-pointer -fno-builtin-printf |
14 | CFLAGS = -c -O2 $(INCLUDES) $(DEFINES) -march=i686 -fomit-frame-pointer -fno-builtin-printf |
15 | 15 | ||
16 | LIBPATH:= $(DRV_TOPDIR)/ddk |
16 | LIBPATH:= $(DRV_TOPDIR)/ddk |
17 | 17 | ||
18 | LIBS:= -ldrv -lcore |
18 | LIBS:= -ldrv -lcore |
19 | 19 | ||
20 | LDFLAGS = -nostdlib -shared -s -Map atikms.map --image-base 0\ |
20 | LDFLAGS = -nostdlib -shared -s -Map atikms.map --image-base 0\ |
21 | --file-alignment 512 --section-alignment 4096 |
21 | --file-alignment 512 --section-alignment 4096 |
22 | 22 | ||
23 | 23 | ||
24 | NAME:= atikms |
24 | NAME:= atikms |
25 | 25 | ||
26 | HFILES:= $(DRV_INCLUDES)/linux/types.h \ |
26 | HFILES:= $(DRV_INCLUDES)/linux/types.h \ |
27 | $(DRV_INCLUDES)/linux/list.h \ |
27 | $(DRV_INCLUDES)/linux/list.h \ |
28 | $(DRV_INCLUDES)/linux/pci.h \ |
28 | $(DRV_INCLUDES)/linux/pci.h \ |
29 | $(DRV_INCLUDES)/drm/drm.h \ |
29 | $(DRV_INCLUDES)/drm/drm.h \ |
30 | $(DRV_INCLUDES)/drm/drmP.h \ |
30 | $(DRV_INCLUDES)/drm/drmP.h \ |
31 | $(DRV_INCLUDES)/drm/drm_edid.h \ |
31 | $(DRV_INCLUDES)/drm/drm_edid.h \ |
32 | $(DRV_INCLUDES)/drm/drm_crtc.h \ |
32 | $(DRV_INCLUDES)/drm/drm_crtc.h \ |
33 | $(DRV_INCLUDES)/drm/drm_mode.h \ |
33 | $(DRV_INCLUDES)/drm/drm_mode.h \ |
34 | $(DRV_INCLUDES)/drm/drm_mm.h \ |
34 | $(DRV_INCLUDES)/drm/drm_mm.h \ |
35 | atom.h \ |
35 | atom.h \ |
36 | radeon.h \ |
36 | radeon.h \ |
37 | radeon_asic.h |
37 | radeon_asic.h |
38 | 38 | ||
39 | NAME_SRC= \ |
39 | NAME_SRC= \ |
40 | pci.c \ |
40 | pci.c \ |
41 | $(DRM_TOPDIR)/drm_mm.c \ |
41 | $(DRM_TOPDIR)/drm_mm.c \ |
42 | $(DRM_TOPDIR)/drm_edid.c \ |
42 | $(DRM_TOPDIR)/drm_edid.c \ |
43 | $(DRM_TOPDIR)/drm_modes.c \ |
43 | $(DRM_TOPDIR)/drm_modes.c \ |
44 | $(DRM_TOPDIR)/drm_crtc.c \ |
44 | $(DRM_TOPDIR)/drm_crtc.c \ |
45 | $(DRM_TOPDIR)/drm_crtc_helper.c \ |
45 | $(DRM_TOPDIR)/drm_crtc_helper.c \ |
46 | $(DRM_TOPDIR)/drm_fb_helper.c \ |
46 | $(DRM_TOPDIR)/drm_fb_helper.c \ |
47 | $(DRM_TOPDIR)/drm_dp_i2c_helper.c \ |
47 | $(DRM_TOPDIR)/drm_dp_i2c_helper.c \ |
48 | $(DRM_TOPDIR)/i2c/i2c-core.c \ |
48 | $(DRM_TOPDIR)/i2c/i2c-core.c \ |
49 | $(DRM_TOPDIR)/i2c/i2c-algo-bit.c \ |
49 | $(DRM_TOPDIR)/i2c/i2c-algo-bit.c \ |
50 | radeon_device.c \ |
50 | radeon_device.c \ |
51 | radeon_clocks.c \ |
51 | radeon_clocks.c \ |
52 | radeon_i2c.c \ |
52 | radeon_i2c.c \ |
53 | atom.c \ |
53 | atom.c \ |
54 | radeon_atombios.c \ |
54 | radeon_atombios.c \ |
55 | radeon_agp.c \ |
55 | radeon_agp.c \ |
56 | atombios_crtc.c \ |
56 | atombios_crtc.c \ |
57 | atombios_dp.c \ |
57 | atombios_dp.c \ |
58 | radeon_encoders.c \ |
58 | radeon_encoders.c \ |
59 | radeon_connectors.c \ |
59 | radeon_connectors.c \ |
60 | radeon_bios.c \ |
60 | radeon_bios.c \ |
61 | radeon_combios.c \ |
61 | radeon_combios.c \ |
62 | radeon_legacy_crtc.c \ |
62 | radeon_legacy_crtc.c \ |
63 | radeon_legacy_encoders.c \ |
63 | radeon_legacy_encoders.c \ |
64 | radeon_legacy_tv.c \ |
64 | radeon_legacy_tv.c \ |
65 | radeon_display.c \ |
65 | radeon_display.c \ |
66 | radeon_gart.c \ |
66 | radeon_gart.c \ |
67 | radeon_ring.c \ |
67 | radeon_ring.c \ |
68 | radeon_object_kos.c \ |
68 | radeon_object_kos.c \ |
69 | radeon_gem.c \ |
69 | radeon_gem.c \ |
70 | r100.c \ |
70 | r100.c \ |
71 | r200.c \ |
71 | r200.c \ |
72 | r300.c \ |
72 | r300.c \ |
73 | r420.c \ |
73 | r420.c \ |
74 | rv515.c \ |
74 | rv515.c \ |
75 | r520.c \ |
75 | r520.c \ |
76 | r600.c \ |
76 | r600.c \ |
77 | r600_audio.c \ |
77 | r600_audio.c \ |
78 | r600_hdmi.c \ |
78 | r600_hdmi.c \ |
79 | rs400.c \ |
79 | rs400.c \ |
80 | rs600.c \ |
80 | rs600.c \ |
81 | rs690.c \ |
81 | rs690.c \ |
82 | rv770.c \ |
82 | rv770.c \ |
83 | radeon_fb.c \ |
83 | radeon_fb.c \ |
84 | rdisplay.c \ |
84 | rdisplay.c \ |
85 | rdisplay_kms.c \ |
85 | rdisplay_kms.c \ |
86 | radeon_pm.c \ |
86 | radeon_pm.c \ |
87 | cmdline.c \ |
87 | cmdline.c \ |
88 | cursor.S \ |
88 | cursor.S \ |
89 | fwblob.asm |
89 | fwblob.asm |
90 | 90 | ||
91 | FW_SRCS= \ |
91 | FW_BINS= \ |
92 | firmware/R100_cp.bin.ihex \ |
92 | firmware/R100_cp.bin \ |
93 | firmware/R200_cp.bin.ihex \ |
93 | firmware/R200_cp.bin \ |
94 | firmware/R300_cp.bin.ihex \ |
94 | firmware/R300_cp.bin \ |
95 | firmware/R420_cp.bin.ihex \ |
95 | firmware/R420_cp.bin \ |
- | 96 | firmware/R520_cp.bin \ |
|
- | 97 | \ |
|
96 | firmware/RS690_cp.bin.ihex \ |
98 | firmware/RS690_cp.bin \ |
97 | firmware/RS600_cp.bin.ihex \ |
99 | firmware/RS600_cp.bin \ |
- | 100 | firmware/RS780_me.bin \ |
|
- | 101 | firmware/RS780_pfp.bin \ |
|
- | 102 | \ |
|
- | 103 | firmware/RV610_me.bin \ |
|
- | 104 | firmware/RV620_me.bin \ |
|
- | 105 | firmware/RV630_me.bin \ |
|
- | 106 | firmware/RV635_me.bin \ |
|
- | 107 | firmware/RV670_me.bin \ |
|
- | 108 | firmware/RV710_me.bin \ |
|
- | 109 | firmware/RV730_me.bin \ |
|
- | 110 | firmware/RV770_me.bin \ |
|
- | 111 | \ |
|
- | 112 | firmware/RV610_pfp.bin \ |
|
98 | firmware/R520_cp.bin.ihex \ |
113 | firmware/RV620_pfp.bin \ |
- | 114 | firmware/RV630_pfp.bin \ |
|
- | 115 | firmware/RV635_pfp.bin \ |
|
- | 116 | firmware/RV670_pfp.bin \ |
|
- | 117 | firmware/RV710_pfp.bin \ |
|
- | 118 | firmware/RV730_pfp.bin \ |
|
- | 119 | firmware/RV770_pfp.bin \ |
|
- | 120 | \ |
|
- | 121 | firmware/R600_rlc.bin \ |
|
- | 122 | firmware/R700_rlc.bin |
|
99 | 123 | ||
100 | 124 | ||
101 | SRC_DEP:= |
125 | SRC_DEP:= |
102 | 126 | ||
103 | 127 | ||
104 | NAME_OBJS = $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\ |
128 | NAME_OBJS = $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\ |
105 | $(patsubst %.c, %.o, $(NAME_SRC)))) |
129 | $(patsubst %.c, %.o, $(NAME_SRC)))) |
106 | 130 | ||
107 | 131 | ||
108 | FW_BINS = $(patsubst %.bin.ihex, %.bin, $(FW_SRCS)) |
- | |
109 | - | ||
110 | - | ||
111 | 132 | ||
112 | all: $(NAME).dll |
133 | all: $(NAME).dll |
113 | 134 | ||
114 | $(NAME).dll: $(NAME_OBJS) $(SRC_DEP) $(HFILES) atikms.lds Makefile |
135 | $(NAME).dll: $(NAME_OBJS) $(FW_BINS) $(SRC_DEP) $(HFILES) atikms.lds Makefile |
115 | ld -L$(LIBPATH) $(LDFLAGS) -T atikms.lds -o $@ $(NAME_OBJS) $(LIBS) |
136 | ld -L$(LIBPATH) $(LDFLAGS) -T atikms.lds -o $@ $(NAME_OBJS) $(LIBS) |
116 | 137 | ||
117 | 138 | ||
118 | %.o : %.c $(HFILES) Makefile |
139 | %.o : %.c $(HFILES) Makefile |
119 | $(CC) $(CFLAGS) $(DEFINES) -o $@ $< |
140 | $(CC) $(CFLAGS) $(DEFINES) -o $@ $< |
120 | 141 | ||
121 | %.o : %.S $(HFILES) Makefile |
142 | %.o : %.S $(HFILES) Makefile |
122 | as -o $@ $< |
143 | as -o $@ $< |
123 | 144 | ||
124 | fwblob.o: fwblob.asm $(FW_BINS) Makefile |
145 | fwblob.o: fwblob.asm $(FW_BINS) Makefile |
125 | $(FASM) $< $@> |
146 | $(FASM) $< $@> |
126 | 147 | ||
127 | fwblob.o:> |
148 | fwblob.o:> |
128 | 149 | ||
129 | %.o> |
150 | %.o> |