summaryrefslogtreecommitdiffstats
path: root/drivers/atm/Makefile
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-04-28 01:09:25 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-04-28 01:09:25 +0000
commitb9ba7aeb165cffecdffb60aec8c3fa8d590d9ca9 (patch)
tree42d07b0c7246ae2536a702e7c5de9e2732341116 /drivers/atm/Makefile
parent7406b0a326f2d70ade2671c37d1beef62249db97 (diff)
Merge with 2.3.99-pre6.
Diffstat (limited to 'drivers/atm/Makefile')
-rw-r--r--drivers/atm/Makefile56
1 files changed, 38 insertions, 18 deletions
diff --git a/drivers/atm/Makefile b/drivers/atm/Makefile
index 8dbf1364a..330d5d1c3 100644
--- a/drivers/atm/Makefile
+++ b/drivers/atm/Makefile
@@ -30,10 +30,6 @@ else
endif
endif
-ifeq ($(CONFIG_ATM_TNETA1570),y)
-O_OBJS += tneta1570.o suni.o
-endif
-
ifeq ($(CONFIG_ATM_NICSTAR),y)
O_OBJS += nicstar.o
ifeq ($(CONFIG_ATM_NICSTAR_USE_SUNI),y)
@@ -101,23 +97,29 @@ else
endif
ifeq ($(CONFIG_ATM_FORE200E_PCA),y)
-FORE200E_FW_OBJS += fore200e_pca_fw.o
+ FORE200E_FW_OBJS += fore200e_pca_fw.o
+ ifeq ($(strip $(CONFIG_ATM_FORE200E_PCA_FW)),"")
+ CONFIG_ATM_FORE200E_PCA_DEFAULT_FW := y
+ endif
ifeq ($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y)
# guess the target endianess to choose the right PCA-200E firmware image
CONFIG_ATM_FORE200E_PCA_FW := $(shell if test -n "`$(CC) -E -dM ../../include/asm/byteorder.h | grep ' __LITTLE_ENDIAN '`"; then echo pca200e.bin; else echo pca200e_ecd.bin2; fi)
endif
endif
ifeq ($(CONFIG_ATM_FORE200E_SBA),y)
-FORE200E_FW_OBJS += fore200e_sba_fw.o
+ FORE200E_FW_OBJS += fore200e_sba_fw.o
+ ifeq ($(strip $(CONFIG_ATM_FORE200E_SBA_FW)),"")
+ CONFIG_ATM_FORE200E_SBA_DEFAULT_FW := y
+ endif
ifeq ($(CONFIG_ATM_FORE200E_SBA_DEFAULT_FW),y)
CONFIG_ATM_FORE200E_SBA_FW := sba200e_ecd.bin2
endif
endif
ifeq ($(CONFIG_ATM_FORE200E),y)
-O_OBJS += fore200e.o $(FORE200E_FW_OBJS)
+ O_OBJS += fore200e.o $(FORE200E_FW_OBJS)
else
ifeq ($(CONFIG_ATM_FORE200E),m)
- M_OBJS += fore_200e.o
+ M_OBJS += fore_200e.o
endif
endif
@@ -125,33 +127,51 @@ EXTRA_CFLAGS=-g
include $(TOPDIR)/Rules.make
+
# FORE Systems 200E-series firmware magic
fore200e_pca_fw.c: $(patsubst "%", %, $(CONFIG_ATM_FORE200E_PCA_FW)) \
fore200e_mkfirm
./fore200e_mkfirm -k -b _fore200e_pca_fw \
-i $(CONFIG_ATM_FORE200E_PCA_FW) -o $@
+ @ ( \
+ echo 'ifeq ($(strip $(CONFIG_ATM_FORE200E_PCA_FW)), $$(CONFIG_ATM_FORE200E_PCA_FW))'; \
+ echo 'FORE200E_FW_UP_TO_DATE += $@'; \
+ echo 'endif' \
+ ) >.$@.fw
fore200e_sba_fw.c: $(patsubst "%", %, $(CONFIG_ATM_FORE200E_SBA_FW)) \
fore200e_mkfirm
./fore200e_mkfirm -k -b _fore200e_sba_fw \
-i $(CONFIG_ATM_FORE200E_SBA_FW) -o $@
+ @ ( \
+ echo 'ifeq ($(strip $(CONFIG_ATM_FORE200E_SBA_FW)), $$(CONFIG_ATM_FORE200E_SBA_FW))'; \
+ echo 'FORE200E_FW_UP_TO_DATE += $@'; \
+ echo 'endif' \
+ ) >.$@.fw
fore200e_mkfirm: fore200e_mkfirm.c
$(HOSTCC) $(HOSTCFLAGS) $< -o $@
-# deal with the various suffixes of the firmware images
-%.bin: %.data
- objcopy -Iihex $< -Obinary $@.gz
- gzip -df $@.gz
-
-%.bin1: %.data
- objcopy -Iihex $< -Obinary $@.gz
- gzip -df $@.gz
-
-%.bin2: %.data
+# deal with the various suffixes of the binary firmware images
+%.bin %.bin1 %.bin2: %.data
objcopy -Iihex $< -Obinary $@.gz
gzip -df $@.gz
# module build
fore_200e.o: fore200e.o $(FORE200E_FW_OBJS)
$(LD) -r -o $@ $< $(FORE200E_FW_OBJS)
+
+# firmware dependency stuff taken from drivers/sound/Makefile
+FORE200E_FW_UP_TO_DATE :=
+
+FORE200E_FW_FILES := $(wildcard .fore200e_*.fw)
+ifneq ($(FORE200E_FW_FILES),)
+include $(FORE200E_FW_FILES)
+endif
+
+FORE200E_FW_CHANGED := $(filter-out $(FORE200E_FW_UP_TO_DATE), \
+ fore200e_pca_fw.c fore200e_sba_fw.c)
+
+ifneq ($(FORE200E_FW_CHANGED),)
+$(FORE200E_FW_CHANGED): dummy
+endif