dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers/dect/coa/Makefile

45 lines
1.3 KiB
Makefile

com_on_air-objs := sc1442x_firmware.o sc1442x.o
com_on_air-$(CONFIG_DECT_COA_U2785) += radio_u2785.o
com_on_air-$(CONFIG_DECT_COA_LMX3161) += radio_lmx3161.o
obj-$(CONFIG_DECT_COA) += com_on_air.o
obj-$(CONFIG_DECT_COA_PCI) += com_on_air_pci.o
obj-$(CONFIG_DECT_COA_CS) += com_on_air_cs.o
$(obj)/sc1442x.o: $(obj)/sc1442x_firmware.c
$(obj)/sc1442x_firmware.c: NAME=sc1442x
clean-files += sc1442x_firmware.p
clean-files += sc1442x_firmware.bin
clean-files += sc1442x_firmware.h.tmp
hostprogs-$(CONFIG_DECT_COA_FIRMWARE) += bin2c
ifeq ($(CONFIG_DECT_COA_FIRMWARE),y)
ifeq ($(CONFIG_DECT_COA_P64),y)
ASL_FLAGS = -D ENABLE_P64
endif
ASL = asl
P2BIN = p2bin
BIN2C = $(obj)/bin2c
quiet_cmd_asl = ASL $<
cmd_asl = $(ASL) -q -c $< -o $(<:.asm=.p) $(ASL_FLAGS) -shareout $(<:.asm=.h.tmp); \
$(P2BIN) $(<:.asm=.p) $(<:.asm=.bin) -r 0-509; \
$(BIN2C) $(<:.asm=.bin) $(NAME)_firmware > $@; \
( \
echo "\#ifndef $$(echo $(NAME) | tr a-z A-Z)_FIRMWARE"; \
echo "\#define $$(echo $(NAME) | tr a-z A-Z)_FIRMWARE"; \
echo;\
echo "extern const unsigned char $(NAME)_firmware[510];"; \
echo;\
grep define $(<:.asm=.h.tmp); \
echo;\
echo "\#endif /* $$(echo $(NAME) | tr a-z A-Z)_FIRMWARE */"; \
) > $(@:.c=.h)
$(obj)/%_firmware.c: $(src)/%_firmware.asm $(BIN2C)
$(call if_changed,asl)
endif