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