^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) # Makefile for the Zorro bus specific drivers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) obj-$(CONFIG_ZORRO) += zorro.o zorro-driver.o zorro-sysfs.o
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) obj-$(CONFIG_PROC_FS) += proc.o
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) obj-$(CONFIG_ZORRO_NAMES) += names.o
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) hostprogs := gen-devlist
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) # Files generated that shall be removed upon make clean
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) clean-files := devlist.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) # Dependencies on generated files need to be listed explicitly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) $(obj)/names.o: $(obj)/devlist.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) # And that's how to generate them
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) quiet_cmd_devlist = DEVLIST $@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) cmd_devlist = ( cd $(obj); ./gen-devlist ) < $<
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) $(obj)/devlist.h: $(src)/zorro.ids $(obj)/gen-devlist
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) $(call cmd,devlist)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)