18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci#
38c2ecf20Sopenharmony_ci# Makefile for the Linux network (wan) device drivers.
48c2ecf20Sopenharmony_ci#
58c2ecf20Sopenharmony_ci# 3 Aug 2000, Christoph Hellwig <hch@infradead.org>
68c2ecf20Sopenharmony_ci# Rewritten to use lists instead of if-statements.
78c2ecf20Sopenharmony_ci#
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciobj-$(CONFIG_HDLC)		+= hdlc.o
108c2ecf20Sopenharmony_ciobj-$(CONFIG_HDLC_RAW)		+= hdlc_raw.o
118c2ecf20Sopenharmony_ciobj-$(CONFIG_HDLC_RAW_ETH)	+= hdlc_raw_eth.o
128c2ecf20Sopenharmony_ciobj-$(CONFIG_HDLC_CISCO)	+= hdlc_cisco.o
138c2ecf20Sopenharmony_ciobj-$(CONFIG_HDLC_FR)		+= hdlc_fr.o
148c2ecf20Sopenharmony_ciobj-$(CONFIG_HDLC_PPP)		+= hdlc_ppp.o
158c2ecf20Sopenharmony_ciobj-$(CONFIG_HDLC_X25)		+= hdlc_x25.o
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciobj-$(CONFIG_HOSTESS_SV11)	+= z85230.o	hostess_sv11.o
188c2ecf20Sopenharmony_ciobj-$(CONFIG_SEALEVEL_4021)	+= z85230.o	sealevel.o
198c2ecf20Sopenharmony_ciobj-$(CONFIG_COSA)		+= cosa.o
208c2ecf20Sopenharmony_ciobj-$(CONFIG_FARSYNC)		+= farsync.o
218c2ecf20Sopenharmony_ciobj-$(CONFIG_X25_ASY)		+= x25_asy.o
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciobj-$(CONFIG_LANMEDIA)		+= lmc/
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ciobj-$(CONFIG_DLCI)		+= dlci.o 
268c2ecf20Sopenharmony_ciobj-$(CONFIG_SDLA)		+= sdla.o
278c2ecf20Sopenharmony_ciobj-$(CONFIG_LAPBETHER)		+= lapbether.o
288c2ecf20Sopenharmony_ciobj-$(CONFIG_SBNI)		+= sbni.o
298c2ecf20Sopenharmony_ciobj-$(CONFIG_N2)		+= n2.o
308c2ecf20Sopenharmony_ciobj-$(CONFIG_C101)		+= c101.o
318c2ecf20Sopenharmony_ciobj-$(CONFIG_WANXL)		+= wanxl.o
328c2ecf20Sopenharmony_ciobj-$(CONFIG_PCI200SYN)		+= pci200syn.o
338c2ecf20Sopenharmony_ciobj-$(CONFIG_PC300TOO)		+= pc300too.o
348c2ecf20Sopenharmony_ciobj-$(CONFIG_IXP4XX_HSS)	+= ixp4xx_hss.o
358c2ecf20Sopenharmony_ciobj-$(CONFIG_FSL_UCC_HDLC)	+= fsl_ucc_hdlc.o
368c2ecf20Sopenharmony_ciobj-$(CONFIG_SLIC_DS26522)	+= slic_ds26522.o
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ciclean-files := wanxlfw.inc
398c2ecf20Sopenharmony_ci$(obj)/wanxl.o:	$(obj)/wanxlfw.inc
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ciifeq ($(CONFIG_WANXL_BUILD_FIRMWARE),y)
428c2ecf20Sopenharmony_ciifeq ($(ARCH),m68k)
438c2ecf20Sopenharmony_ci  M68KCC = $(CC)
448c2ecf20Sopenharmony_ci  M68KLD = $(LD)
458c2ecf20Sopenharmony_cielse
468c2ecf20Sopenharmony_ci  M68KCC = $(CROSS_COMPILE_M68K)gcc
478c2ecf20Sopenharmony_ci  M68KLD = $(CROSS_COMPILE_M68K)ld
488c2ecf20Sopenharmony_ciendif
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ciquiet_cmd_build_wanxlfw = BLDFW   $@
518c2ecf20Sopenharmony_ci      cmd_build_wanxlfw = hexdump -ve '"\n" 16/1 "0x%02X,"' $< | \
528c2ecf20Sopenharmony_ci	sed 's/0x  ,//g;1s/^/static const u8 firmware[]={/;$$s/,$$/\n};\n/' > $@
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci$(obj)/wanxlfw.inc: $(obj)/wanxlfw.bin FORCE
558c2ecf20Sopenharmony_ci	$(call if_changed,build_wanxlfw)
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ciquiet_cmd_m68kld_bin_o = M68KLD  $@
588c2ecf20Sopenharmony_ci      cmd_m68kld_bin_o = $(M68KLD) --oformat binary -Ttext 0x1000 $< -o $@
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci$(obj)/wanxlfw.bin: $(obj)/wanxlfw.o FORCE
618c2ecf20Sopenharmony_ci	$(call if_changed,m68kld_bin_o)
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ciquiet_cmd_m68kas_o_S = M68KAS  $@
648c2ecf20Sopenharmony_ci      cmd_m68kas_o_S = $(M68KCC) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $@ $<
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci$(obj)/wanxlfw.o: $(src)/wanxlfw.S FORCE
678c2ecf20Sopenharmony_ci	$(call if_changed_dep,m68kas_o_S)
688c2ecf20Sopenharmony_ciendif
698c2ecf20Sopenharmony_citargets += wanxlfw.inc wanxlfw.bin wanxlfw.o
70