162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci# 362306a36Sopenharmony_ci# Makefile for the Linux network (wan) device drivers. 462306a36Sopenharmony_ci# 562306a36Sopenharmony_ci# 3 Aug 2000, Christoph Hellwig <hch@infradead.org> 662306a36Sopenharmony_ci# Rewritten to use lists instead of if-statements. 762306a36Sopenharmony_ci# 862306a36Sopenharmony_ci 962306a36Sopenharmony_ciobj-$(CONFIG_HDLC) += hdlc.o 1062306a36Sopenharmony_ciobj-$(CONFIG_HDLC_RAW) += hdlc_raw.o 1162306a36Sopenharmony_ciobj-$(CONFIG_HDLC_RAW_ETH) += hdlc_raw_eth.o 1262306a36Sopenharmony_ciobj-$(CONFIG_HDLC_CISCO) += hdlc_cisco.o 1362306a36Sopenharmony_ciobj-$(CONFIG_HDLC_FR) += hdlc_fr.o 1462306a36Sopenharmony_ciobj-$(CONFIG_HDLC_PPP) += hdlc_ppp.o 1562306a36Sopenharmony_ciobj-$(CONFIG_HDLC_X25) += hdlc_x25.o 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ciobj-$(CONFIG_FARSYNC) += farsync.o 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ciobj-$(CONFIG_LAPBETHER) += lapbether.o 2062306a36Sopenharmony_ciobj-$(CONFIG_N2) += n2.o 2162306a36Sopenharmony_ciobj-$(CONFIG_C101) += c101.o 2262306a36Sopenharmony_ciobj-$(CONFIG_WANXL) += wanxl.o 2362306a36Sopenharmony_ciobj-$(CONFIG_PCI200SYN) += pci200syn.o 2462306a36Sopenharmony_ciobj-$(CONFIG_PC300TOO) += pc300too.o 2562306a36Sopenharmony_ciobj-$(CONFIG_IXP4XX_HSS) += ixp4xx_hss.o 2662306a36Sopenharmony_ciobj-$(CONFIG_FSL_UCC_HDLC) += fsl_ucc_hdlc.o 2762306a36Sopenharmony_ciobj-$(CONFIG_SLIC_DS26522) += slic_ds26522.o 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ciclean-files := wanxlfw.inc 3062306a36Sopenharmony_ci$(obj)/wanxl.o: $(obj)/wanxlfw.inc 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ciCROSS_COMPILE_M68K = m68k-linux-gnu- 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ciifeq ($(CONFIG_WANXL_BUILD_FIRMWARE),y) 3562306a36Sopenharmony_ciifeq ($(ARCH),m68k) 3662306a36Sopenharmony_ci M68KCC = $(CC) 3762306a36Sopenharmony_ci M68KLD = $(LD) 3862306a36Sopenharmony_cielse 3962306a36Sopenharmony_ci M68KCC = $(CROSS_COMPILE_M68K)gcc 4062306a36Sopenharmony_ci M68KLD = $(CROSS_COMPILE_M68K)ld 4162306a36Sopenharmony_ciendif 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ciquiet_cmd_build_wanxlfw = BLDFW $@ 4462306a36Sopenharmony_ci cmd_build_wanxlfw = hexdump -ve '"\n" 16/1 "0x%02X,"' $< | \ 4562306a36Sopenharmony_ci sed 's/0x ,//g;1s/^/static const u8 firmware[]={/;$$s/,$$/\n};\n/' > $@ 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci$(obj)/wanxlfw.inc: $(obj)/wanxlfw.bin FORCE 4862306a36Sopenharmony_ci $(call if_changed,build_wanxlfw) 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ciquiet_cmd_m68kld_bin_o = M68KLD $@ 5162306a36Sopenharmony_ci cmd_m68kld_bin_o = $(M68KLD) --oformat binary -Ttext 0x1000 $< -o $@ 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci$(obj)/wanxlfw.bin: $(obj)/wanxlfw.o FORCE 5462306a36Sopenharmony_ci $(call if_changed,m68kld_bin_o) 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ciquiet_cmd_m68kas_o_S = M68KAS $@ 5762306a36Sopenharmony_ci cmd_m68kas_o_S = $(M68KCC) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $@ $< 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ci$(obj)/wanxlfw.o: $(src)/wanxlfw.S FORCE 6062306a36Sopenharmony_ci $(call if_changed_dep,m68kas_o_S) 6162306a36Sopenharmony_ciendif 6262306a36Sopenharmony_citargets += wanxlfw.inc wanxlfw.bin wanxlfw.o 63