summaryrefslogtreecommitdiff
path: root/bsp/hpmicro/libraries/hpm_sdk/components/SConscript
blob: 5fe6980bcccc3df80b59e56c7c39d0fda3e51703 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Import('rtconfig')
import os
from building import *

#get current directory
cwd = GetCurrentDir()

CPPDEFINES=[]

# Update include path
path = [ os.path.join(cwd, 'debug_console'), os.path.join(cwd, 'touch'), os.path.join(cwd, 'usb'), os.path.join(cwd, 'dma_manager')]

# The set of source files associated with this SConscript file.
src = []

src += [ os.path.join(cwd, 'debug_console', 'hpm_debug_console.c') ]
src += [ os.path.join(cwd, 'dma_manager', 'hpm_dma_manager.c') ]

if GetDepend(['BSP_USING_TOUCH_GT911']):
	src += [os.path.join(cwd, 'touch', 'gt911', 'hpm_touch_gt911.c') ]
	src += [os.path.join(cwd, 'touch', 'gt911', 'hpm_gt911.c') ]
	path += [ os.path.join(cwd, 'touch', 'gt911') ]
	CPPDEFINES = ['CONFIG_TOUCH_GT911=1']
if GetDepend(['BSP_USING_TOUCH_FT5406']):
	src += [ os.path.join(cwd, 'touch', 'ft5406', 'hpm_touch_ft5406.c') ]
	src += [ os.path.join(cwd, 'touch', 'ft5406', 'hpm_ft5406.c') ]
	path += [ os.path.join(cwd, 'touch', 'ft5406') ]
	CPPDEFINES = ['CONFIG_TOUCH_FT5406=1']
if GetDepend(['BSP_USING_USB_DEVICE']):
	src += [ os.path.join(cwd, 'usb', 'device', 'hpm_usb_device.c') ]
	path += [ os.path.join(cwd, 'usb', 'device') ]
if GetDepend(['BSP_USING_USB_HOST']):
	src += [ os.path.join(cwd, 'usb', 'host', 'hpm_usb_host.c') ]
	path += [ os.path.join(cwd, 'usb', 'host') ]
if GetDepend(['BSP_USING_ETH1']):
	if GetDepend(['BSP_USING_ENET_PHY_RTL8201']):  
	    src += [ os.path.join(cwd, 'enet_phy/rtl8201/hpm_rtl8201.c') ]        
	    path += [ os.path.join(cwd, 'enet_phy') ]
	    path += [ os.path.join(cwd, 'enet_phy/rtl8201') ]
        
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES=CPPDEFINES)

Return ('group')