xref: /OK3568_Linux_fs/kernel/drivers/usb/serial/Makefile-keyspan_pda_fw (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun# some rules to handle the quirks of the 'as31' assembler, like
4*4882a593Smuzhiyun# insisting upon fixed suffixes for the input and output files,
5*4882a593Smuzhiyun# and its lack of preprocessor support
6*4882a593Smuzhiyun
7*4882a593Smuzhiyunall: keyspan_pda_fw.h
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun%.asm: %.S
10*4882a593Smuzhiyun	gcc -x assembler-with-cpp -P -E -o $@ $<
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun%.hex: %.asm
13*4882a593Smuzhiyun	as31 -l $<
14*4882a593Smuzhiyun	mv $*.obj $@
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun%_fw.h: %.hex ezusb_convert.pl
17*4882a593Smuzhiyun	perl ezusb_convert.pl $* < $< > $@
18