osd-contiki/cpu/arm/common/usb/Makefile.usb

60 lines
1.7 KiB
Makefile
Raw Normal View History

2009-07-11 16:44:27 +02:00
### Put generated sources in a separate directory
BUILTSRCDIR = src_$(TARGET)
ifeq (${wildcard $(BUILTSRCDIR)},)
DUMMY := ${shell mkdir $(BUILTSRCDIR)}
endif
2010-02-05 17:23:40 +01:00
STRUCTGEN = structgen
2009-07-11 16:44:27 +02:00
PROJECTDIRS += $(BUILTSRCDIR)
USB_STRING_DESCRIPTORS ?= $(CONTIKI_CPU_ARM)/common/usb/cdc-acm/string-descriptors.xml
XMLDIRS=
USB = usb-arch.c usb-core.c
ifdef USB_CDC_ACM_CLASS
CONTIKI_CPU_DIRS += ../common/usb/cdc-acm
USB += cdc-acm.c cdc-acm-descriptors.c cdc-acm-string-descriptors.c
XMLDIRS += $(CONTIKI_CPU_ARM)/common/usb/cdc-acm/
endif
ifdef USB_CDC_ETH_CLASS
CONTIKI_CPU_DIRS += ../common/usb/cdc-eth
USB += cdc-eth.c cdc-eth-descriptors.c cdc-eth-string-descriptors.c dhcps.c
XMLDIRS += $(CONTIKI_CPU_ARM)/common/usb/cdc-eth/
endif
ifdef USB_MASS_STORAGE_CLASS
CONTIKI_CPU_DIRS += ../common/usb/msc
2010-02-05 17:23:40 +01:00
USB += usb-msc-bulk.c usb-rbc.c msc-descriptors-consts.c msc-descriptors.c
2009-07-11 16:44:27 +02:00
XMLDIRS += $(CONTIKI_CPU_ARM)/common/usb/msc
endif
ifdef USB_MSC_QIC157
CONTIKI_CPU_DIRS += ../common/usb/msc
USB += usb-msc-bulk.c usb-qic157.c msc-qic157-descriptors.c msc-qic157-string-descriptors.c
XMLDIRS += $(CONTIKI_CPU_ARM)/common/usb/msc
endif
ifdef USB_MSC_STREAMING
CONTIKI_CPU_DIRS += ../common/usb/msc
USB += usb-msc-bulk.c usb-streaming.c msc-scsi-streaming-descriptors-consts.c msc-scsi-streaming-descriptors.c
2009-07-11 16:44:27 +02:00
XMLDIRS += $(CONTIKI_CPU_ARM)/common/usb/msc
endif
2010-02-05 17:23:40 +01:00
ifdef USB_MTP_CLASS
CONTIKI_CPU_DIRS += ../common/usb/mtp
USB += usb-mtp.c mtp-descriptors-consts.c mtp-descriptors.c
STRUCTGENDIRS += $(CONTIKI_CPU_ARM)/common/usb/mtp
endif
2009-07-11 16:44:27 +02:00
vpath %.xml $(XMLDIRS)
2010-02-05 17:23:40 +01:00
vpath %.gen.c $(STRUCTGENDIRS)
2009-07-11 16:44:27 +02:00
%.c: %.xml
$(XSLTPROC) $(CONTIKI_CPU_ARM)/common/usb/string-descriptors.xslt $^ >$(BUILTSRCDIR)/$@
2010-02-05 17:23:40 +01:00
%-consts.c: %.gen.c
$(CPP) -I$(CFLAGS) $< | $(STRUCTGEN) --output $(BUILTSRCDIR)/$*-consts.c