1SubDir HAIKU_TOP src add-ons media media-add-ons usb_webcam ; 2 3SetSubDirSupportedPlatformsBeOSCompatible ; 4 5# Zeta has a libusb.so, we have it in libdevice.so 6if $(TARGET_PLATFORM_HAIKU_COMPATIBLE) { 7 usbKitLibraryName = libdevice.so ; 8} else { 9# usbKitLibraryName = usb ; 10 usbKitLibraryName = USBKit.a ; 11 UsePublicHeaders [ FDirName drivers ] ; 12 UsePublicHeaders [ FDirName device ] ; 13} 14 15# source directories 16local sourceDirs = 17 addons/quickcam 18 addons/sonix 19 addons 20 cstransforms 21 sensors 22; 23 24local sourceDir ; 25for sourceDir in $(sourceDirs) { 26 SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons media media-add-ons 27 usb_webcam $(sourceDir) ] ; 28} 29 30## addon sources 31local addonSources ; 32addonSources = QuickCamDevice.cpp SonixCamDevice.cpp NW80xCamDevice.cpp ; 33 34## colorspace transforms sources 35local csTransformsSources ; 36csTransformsSources = Bayer.cpp ; 37 38## sensors sources 39local sensorsSources ; 40sensorsSources = hdcs1000.cpp hv7131e1.cpp pb0100.cpp tas5110c1b.cpp ; 41 42## how to build header files from sources to include the list of built-in addons. 43# but it doesn't seem to work for some reason... 44 45rule USBWebcamHeaderGen header : macro : sources 46{ 47 SEARCH on $(sources) = $(SEARCH_SOURCE) ; 48 49 Depends $(header) : $(sources) ; 50 MakeLocateArch $(header) ; 51 GREP_DEFINE on $(header) = $(macro) ; 52 USBWebcamHeaderGen1 $(header) : $(sources) ; 53 LocalClean clean : $(header) ; 54} 55 56actions USBWebcamHeaderGen1 57{ 58 grep -h $(GREP_DEFINE) $(2) > $(1) ; 59} 60 61USBWebcamHeaderGen [ FGristFiles CamInternalAddons.h ] 62 : B_WEBCAM_MKINTFUNC : $(addonSources) ; 63USBWebcamHeaderGen [ FGristFiles CamInternalSensors.h ] 64 : B_WEBCAM_DECLARE_SENSOR : $(sensorsSources) ; 65USBWebcamHeaderGen [ FGristFiles CamInternalColorSpaceTransforms.h ] 66 : B_WEBCAM_DECLARE_CSTRANSFORM : $(csTransformsSources) ; 67 68Addon usb_webcam.media_addon : 69 $(addonSources) 70 $(csTransformsSources) 71 $(sensorsSources) 72 AddOn.cpp 73 Producer.cpp 74 CamBufferedFilterInterface.cpp 75 CamBufferingDeframer.cpp 76 CamColorSpaceTransform.cpp 77 CamDeframer.cpp 78 CamDevice.cpp 79 CamFilterInterface.cpp 80 CamRoster.cpp 81 CamSensor.cpp 82 CamStreamingDeframer.cpp 83 : be media $(usbKitLibraryName) 84; 85 86# force dependancies 87Includes [ FGristFiles CamRoster.cpp ] : [ FGristFiles CamInternalAddons.h ] ; 88Includes [ FGristFiles CamDevice.cpp ] : [ FGristFiles CamInternalSensors.h ] ; 89Includes [ FGristFiles CamColorSpaceTransform.cpp ] 90 : [ FGristFiles CamInternalColorSpaceTransforms.h ] ; 91