blob: 5b77188527a9ad91f8d3f70691ba9c2d4393f4a1 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#
2# Makefile for the Linux network (ATM) device drivers.
3#
4
5fore_200e-objs := fore200e.o
6hostprogs-y := fore200e_mkfirm
7
8# Files generated that shall be removed upon make clean
9clean-files := atmsar11.bin atmsar11.bin1 atmsar11.bin2 pca200e.bin \
10 pca200e.bin1 pca200e.bin2 pca200e_ecd.bin pca200e_ecd.bin1 \
11 pca200e_ecd.bin2 sba200e_ecd.bin sba200e_ecd.bin1 sba200e_ecd.bin2
12# Firmware generated that shall be removed upon make clean
13clean-files += fore200e_pca_fw.c fore200e_sba_fw.c
14
15obj-$(CONFIG_ATM_ZATM) += zatm.o uPD98402.o
16obj-$(CONFIG_ATM_NICSTAR) += nicstar.o
17obj-$(CONFIG_ATM_AMBASSADOR) += ambassador.o
18obj-$(CONFIG_ATM_HORIZON) += horizon.o
19obj-$(CONFIG_ATM_IA) += iphase.o suni.o
20obj-$(CONFIG_ATM_FORE200E) += fore_200e.o
21obj-$(CONFIG_ATM_ENI) += eni.o suni.o
22obj-$(CONFIG_ATM_IDT77252) += idt77252.o
23
24ifeq ($(CONFIG_ATM_NICSTAR_USE_SUNI),y)
25 obj-$(CONFIG_ATM_NICSTAR) += suni.o
26endif
27ifeq ($(CONFIG_ATM_NICSTAR_USE_IDT77105),y)
28 obj-$(CONFIG_ATM_NICSTAR) += idt77105.o
29endif
30ifeq ($(CONFIG_ATM_IDT77252_USE_SUNI),y)
31 obj-$(CONFIG_ATM_IDT77252) += suni.o
32endif
33
34obj-$(CONFIG_ATM_TCP) += atmtcp.o
35obj-$(CONFIG_ATM_FIRESTREAM) += firestream.o
36obj-$(CONFIG_ATM_LANAI) += lanai.o
37
38ifeq ($(CONFIG_ATM_FORE200E_PCA),y)
39 fore_200e-objs += fore200e_pca_fw.o
40 # guess the target endianess to choose the right PCA-200E firmware image
41 ifeq ($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y)
Jan Beulich3087e1f2005-06-02 13:03:15 -070042 byteorder.h := include$(if $(patsubst $(srctree),,$(objtree)),2)/asm/byteorder.h
43 CONFIG_ATM_FORE200E_PCA_FW := $(obj)/pca200e$(if $(shell $(CC) -E -dM $(byteorder.h) | grep ' __LITTLE_ENDIAN '),.bin,_ecd.bin2)
Linus Torvalds1da177e2005-04-16 15:20:36 -070044 endif
45endif
46
47ifeq ($(CONFIG_ATM_FORE200E_SBA),y)
48 fore_200e-objs += fore200e_sba_fw.o
49 ifeq ($(CONFIG_ATM_FORE200E_SBA_DEFAULT_FW),y)
50 CONFIG_ATM_FORE200E_SBA_FW := $(obj)/sba200e_ecd.bin2
51 endif
52endif
53obj-$(CONFIG_ATM_HE) += he.o
54ifeq ($(CONFIG_ATM_HE_USE_SUNI),y)
55 obj-$(CONFIG_ATM_HE) += suni.o
56endif
57
58# FORE Systems 200E-series firmware magic
59$(obj)/fore200e_pca_fw.c: $(patsubst "%", %, $(CONFIG_ATM_FORE200E_PCA_FW)) \
60 $(obj)/fore200e_mkfirm
61 $(obj)/fore200e_mkfirm -k -b _fore200e_pca_fw \
62 -i $(CONFIG_ATM_FORE200E_PCA_FW) -o $@
63
64$(obj)/fore200e_sba_fw.c: $(patsubst "%", %, $(CONFIG_ATM_FORE200E_SBA_FW)) \
65 $(obj)/fore200e_mkfirm
66 $(obj)/fore200e_mkfirm -k -b _fore200e_sba_fw \
67 -i $(CONFIG_ATM_FORE200E_SBA_FW) -o $@
68
69# deal with the various suffixes of the binary firmware images
70$(obj)/%.bin $(obj)/%.bin1 $(obj)/%.bin2: $(src)/%.data
71 objcopy -Iihex $< -Obinary $@.gz
72 gzip -n -df $@.gz