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