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/uvc 20 addons 21 cstransforms 22 sensors 23; 24 25local sourceDir ; 26for sourceDir in $(sourceDirs) { 27 SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons media media-add-ons 28 usb_webcam $(sourceDir) ] ; 29} 30 31## addon sources 32local addonSources ; 33addonSources = QuickCamDevice.cpp SonixCamDevice.cpp NW80xCamDevice.cpp UVCCamDevice.cpp ; 34 35## colorspace transforms sources 36local csTransformsSources ; 37csTransformsSources = Bayer.cpp ; 38 39## sensors sources 40local sensorsSources ; 41sensorsSources = hdcs1000.cpp hv7131e1.cpp pb0100.cpp tas5110c1b.cpp ; 42 43## how to build header files from sources to include the list of built-in addons. 44# but it doesn't seem to work for some reason... 45 46rule USBWebcamHeaderGen header : macro : sources 47{ 48 SEARCH on $(sources) = $(SEARCH_SOURCE) ; 49 50 Depends $(header) : $(sources) ; 51 MakeLocateArch $(header) ; 52 GREP_DEFINE on $(header) = $(macro) ; 53 USBWebcamHeaderGen1 $(header) : $(sources) ; 54 LocalClean clean : $(header) ; 55} 56 57actions USBWebcamHeaderGen1 58{ 59 grep -h $(GREP_DEFINE) $(2) > $(1) ; 60} 61 62USBWebcamHeaderGen [ FGristFiles CamInternalAddons.h ] 63 : B_WEBCAM_MKINTFUNC : $(addonSources) ; 64USBWebcamHeaderGen [ FGristFiles CamInternalSensors.h ] 65 : B_WEBCAM_DECLARE_SENSOR : $(sensorsSources) ; 66USBWebcamHeaderGen [ FGristFiles CamInternalColorSpaceTransforms.h ] 67 : B_WEBCAM_DECLARE_CSTRANSFORM : $(csTransformsSources) ; 68 69Addon usb_webcam.media_addon : 70 $(addonSources) 71 $(csTransformsSources) 72 $(sensorsSources) 73 AddOn.cpp 74 Producer.cpp 75 CamBufferedFilterInterface.cpp 76 CamBufferingDeframer.cpp 77 CamColorSpaceTransform.cpp 78 CamDeframer.cpp 79 CamDevice.cpp 80 CamFilterInterface.cpp 81 CamRoster.cpp 82 CamSensor.cpp 83 CamStreamingDeframer.cpp 84 : be media $(usbKitLibraryName) 85; 86 87# force dependancies 88Includes [ FGristFiles CamRoster.cpp ] : [ FGristFiles CamInternalAddons.h ] ; 89Includes [ FGristFiles CamDevice.cpp ] : [ FGristFiles CamInternalSensors.h ] ; 90Includes [ FGristFiles CamColorSpaceTransform.cpp ] 91 : [ FGristFiles CamInternalColorSpaceTransforms.h ] ; 92