1SubDir HAIKU_TOP src add-ons media media-add-ons usb_webcam ; 2 3usbKitLibraryName = libdevice.so ; 4 5# source directories 6local sourceDirs = 7 addons/quickcam 8 addons/sonix 9 addons/uvc 10 addons 11 cstransforms 12 sensors 13; 14 15 16local sourceDir ; 17for sourceDir in $(sourceDirs) { 18 SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons media media-add-ons 19 usb_webcam $(sourceDir) ] ; 20} 21 22 23## addon sources 24local addonSources ; 25addonSources = 26 QuickCamDevice.cpp 27 SonixCamDevice.cpp 28 NW80xCamDevice.cpp 29# UVCCamDevice.cpp UVCDeframer.cpp 30; 31 32## colorspace transforms sources 33local csTransformsSources ; 34csTransformsSources = Bayer.cpp ; 35 36## sensors sources 37local sensorsSources ; 38sensorsSources = 39 hdcs1000.cpp 40 hv7131e1.cpp 41 pas106b.cpp 42 pb0100.cpp 43 tas5110c1b.cpp 44 tas5130d1b.cpp 45; 46 47 48## how to build header files from sources to include the list of built-in addons 49 50rule USBWebcamHeaderGen header : macro : sources 51{ 52 header = [ FGristFiles $(header) ] ; 53 sources = [ FGristFiles $(sources) ] ; 54 55 SEARCH on $(sources) = $(SEARCH_SOURCE) ; 56 57 Depends $(header) : $(sources) ; 58 MakeLocateArch $(header) ; 59 GREP_DEFINE on $(header) = $(macro) ; 60 USBWebcamHeaderGen1 $(header) : $(sources) ; 61 LocalClean clean : $(header) ; 62} 63 64 65actions USBWebcamHeaderGen1 66{ 67 grep -h -a $(GREP_DEFINE) $(2) > $(1) ; 68} 69 70 71local architectureObject ; 72for architectureObject in [ MultiArchSubDirSetup ] { 73 on $(architectureObject) { 74 75 USBWebcamHeaderGen CamInternalAddons.h : B_WEBCAM_MKINTFUNC 76 : $(addonSources) ; 77 USBWebcamHeaderGen CamInternalSensors.h : B_WEBCAM_DECLARE_SENSOR 78 : $(sensorsSources) ; 79 USBWebcamHeaderGen CamInternalColorSpaceTransforms.h 80 : B_WEBCAM_DECLARE_CSTRANSFORM : $(csTransformsSources) ; 81 82 for sourceDir in $(sourceDirs) { 83 SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons media 84 media-add-ons usb_webcam $(sourceDir) ] ; 85 } 86 87 Addon [ MultiArchDefaultGristFiles usb_webcam.media_addon ] : 88 $(addonSources) 89 $(csTransformsSources) 90 $(sensorsSources) 91 AddOn.cpp 92 Producer.cpp 93 CamBufferedFilterInterface.cpp 94 CamBufferingDeframer.cpp 95 CamColorSpaceTransform.cpp 96 CamDeframer.cpp 97 CamDevice.cpp 98 CamFilterInterface.cpp 99 CamRoster.cpp 100 CamSensor.cpp 101 CamStreamingDeframer.cpp 102 : be media $(usbKitLibraryName) [ TargetLibsupc++ ] 103 ; 104 } 105} 106 107 108# force dependancies 109Includes [ FGristFiles CamRoster.cpp ] : [ FGristFiles CamInternalAddons.h ] ; 110Includes [ FGristFiles CamDevice.cpp ] : [ FGristFiles CamInternalSensors.h ] ; 111Includes [ FGristFiles CamColorSpaceTransform.cpp ] 112 : [ FGristFiles CamInternalColorSpaceTransforms.h ] ; 113