xref: /openbmc/linux/drivers/net/wan/Makefile (revision bc6df26f)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
21da177e4SLinus Torvalds#
31da177e4SLinus Torvalds# Makefile for the Linux network (wan) device drivers.
41da177e4SLinus Torvalds#
51da177e4SLinus Torvalds# 3 Aug 2000, Christoph Hellwig <hch@infradead.org>
61da177e4SLinus Torvalds# Rewritten to use lists instead of if-statements.
71da177e4SLinus Torvalds#
81da177e4SLinus Torvalds
9eb2a2fd9SKrzysztof Halasaobj-$(CONFIG_HDLC)		+= hdlc.o
10eb2a2fd9SKrzysztof Halasaobj-$(CONFIG_HDLC_RAW)		+= hdlc_raw.o
11eb2a2fd9SKrzysztof Halasaobj-$(CONFIG_HDLC_RAW_ETH)	+= hdlc_raw_eth.o
12eb2a2fd9SKrzysztof Halasaobj-$(CONFIG_HDLC_CISCO)	+= hdlc_cisco.o
13eb2a2fd9SKrzysztof Halasaobj-$(CONFIG_HDLC_FR)		+= hdlc_fr.o
14e022c2f0SKrzysztof Hałasaobj-$(CONFIG_HDLC_PPP)		+= hdlc_ppp.o
15eb2a2fd9SKrzysztof Halasaobj-$(CONFIG_HDLC_X25)		+= hdlc_x25.o
161da177e4SLinus Torvalds
170bee8db8SKrzysztof Hałasaobj-$(CONFIG_FARSYNC)		+= farsync.o
181da177e4SLinus Torvalds
191da177e4SLinus Torvaldsobj-$(CONFIG_LAPBETHER)		+= lapbether.o
201da177e4SLinus Torvaldsobj-$(CONFIG_N2)		+= n2.o
211da177e4SLinus Torvaldsobj-$(CONFIG_C101)		+= c101.o
221da177e4SLinus Torvaldsobj-$(CONFIG_WANXL)		+= wanxl.o
231da177e4SLinus Torvaldsobj-$(CONFIG_PCI200SYN)		+= pci200syn.o
247517c1b7SKrzysztof Halasaobj-$(CONFIG_PC300TOO)		+= pc300too.o
25f5b89e41SKrzysztof Hałasaobj-$(CONFIG_IXP4XX_HSS)	+= ixp4xx_hss.o
26c19b6d24SZhao Qiangobj-$(CONFIG_FSL_UCC_HDLC)	+= fsl_ucc_hdlc.o
27c37d4a00SZhao Qiangobj-$(CONFIG_SLIC_DS26522)	+= slic_ds26522.o
281da177e4SLinus Torvalds
291da177e4SLinus Torvaldsclean-files := wanxlfw.inc
301da177e4SLinus Torvalds$(obj)/wanxl.o:	$(obj)/wanxlfw.inc
311da177e4SLinus Torvalds
32*84fb7dfcSAdam BorowskiCROSS_COMPILE_M68K = m68k-linux-gnu-
33*84fb7dfcSAdam Borowski
341da177e4SLinus Torvaldsifeq ($(CONFIG_WANXL_BUILD_FIRMWARE),y)
351da177e4SLinus Torvaldsifeq ($(ARCH),m68k)
36734f3719SMasahiro Yamada  M68KCC = $(CC)
3763b903dfSMasahiro Yamada  M68KLD = $(LD)
381da177e4SLinus Torvaldselse
39734f3719SMasahiro Yamada  M68KCC = $(CROSS_COMPILE_M68K)gcc
4063b903dfSMasahiro Yamada  M68KLD = $(CROSS_COMPILE_M68K)ld
411da177e4SLinus Torvaldsendif
421da177e4SLinus Torvalds
431da177e4SLinus Torvaldsquiet_cmd_build_wanxlfw = BLDFW   $@
447d7df745SMasahiro Yamada      cmd_build_wanxlfw = hexdump -ve '"\n" 16/1 "0x%02X,"' $< | \
457d7df745SMasahiro Yamada	sed 's/0x  ,//g;1s/^/static const u8 firmware[]={/;$$s/,$$/\n};\n/' > $@
461da177e4SLinus Torvalds
477d7df745SMasahiro Yamada$(obj)/wanxlfw.inc: $(obj)/wanxlfw.bin FORCE
487d7df745SMasahiro Yamada	$(call if_changed,build_wanxlfw)
497d7df745SMasahiro Yamada
507d7df745SMasahiro Yamadaquiet_cmd_m68kld_bin_o = M68KLD  $@
517d7df745SMasahiro Yamada      cmd_m68kld_bin_o = $(M68KLD) --oformat binary -Ttext 0x1000 $< -o $@
527d7df745SMasahiro Yamada
537d7df745SMasahiro Yamada$(obj)/wanxlfw.bin: $(obj)/wanxlfw.o FORCE
547d7df745SMasahiro Yamada	$(call if_changed,m68kld_bin_o)
557d7df745SMasahiro Yamada
567d7df745SMasahiro Yamadaquiet_cmd_m68kas_o_S = M68KAS  $@
577d7df745SMasahiro Yamada      cmd_m68kas_o_S = $(M68KCC) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $@ $<
587d7df745SMasahiro Yamada
597d7df745SMasahiro Yamada$(obj)/wanxlfw.o: $(src)/wanxlfw.S FORCE
607d7df745SMasahiro Yamada	$(call if_changed_dep,m68kas_o_S)
611da177e4SLinus Torvaldsendif
627d7df745SMasahiro Yamadatargets += wanxlfw.inc wanxlfw.bin wanxlfw.o
63