1#-*- encoding: utf-8 -*-
2
3import os
4from building import *
5Import('RTT_ROOT')
6Import('rtconfig')
7
8#---------------------------------------------------------------------------------
9# Package configuration
10#---------------------------------------------------------------------------------
11PKGNAME = "ab32vg1_hal"
12VERSION = "v1.0.0"
13DEPENDS = [""]
14
15#---------------------------------------------------------------------------------
16# Compile the configuration
17#
18# SOURCES: Need to compile c and c++ source, auto search when SOURCES is empty
19#
20# LOCAL_CPPPATH: Local file path (.h/.c/.cpp)
21# LOCAL_CFLAGS: Local c compilation parameter
22# LOCAL_CCFLAGS: Local c/c++ compilation parameter
23# LOCAL_CXXFLAGS: Local c++ compilation parameter
24# LOCAL_ASFLAGS: Local assembly parameters
25#
26# CPPPATH: Global file path (.h/.c/.cpp), auto search when LOCAL_CPPPATH/CPPPATH
27#          is empty # no pass!!!
28# CFLAGS : Global compilation parameter
29# ASFLAGS: Global assembly parameters
30#
31# CPPDEFINES: Global macro definition
32# LOCAL_CPPDEFINES: Local macro definition
33#
34# LIBS: Specify the static library that need to be linked
35# LIBPATH: Specify the search directory for the library file (.lib/.a)
36#
37# LINKFLAGS: Link options
38#---------------------------------------------------------------------------------
39CWD              = GetCurrentDir()
40SOURCES          = Glob("./source/*.c")
41
42LOCAL_CPPPATH    = []
43LOCAL_CFLAGS     = ""
44LOCAL_CCFLAGS    = ""
45LOCAL_CXXFLAGS   = ""
46LOCAL_ASFLAGS    = ""
47
48CPPPATH          = [GetCurrentDir(), os.path.join(GetCurrentDir(), 'include')]
49CFLAGS           = ""
50CCFLAGS          = ""
51CXXFLAGS          = ""
52ASFLAGS          = ""
53
54CPPDEFINES       = []
55LOCAL_CPPDEFINES = []
56
57LIBS             = []
58LIBPATH          = []
59
60LINKFLAGS        = ""
61
62SOURCES_IGNORE   = []
63CPPPATH_IGNORE   = []
64
65#---------------------------------------------------------------------------------
66# Main target
67#---------------------------------------------------------------------------------
68objs = DefineGroup(name = PKGNAME, src = SOURCES, depend = DEPENDS,
69                   CPPPATH          = CPPPATH,
70                   CFLAGS           = CFLAGS,
71                   CCFLAGS          = CCFLAGS,
72                   CXXFLAGS          = CXXFLAGS,
73                   ASFLAGS          = ASFLAGS,
74                   LOCAL_CPPPATH    = LOCAL_CPPPATH,
75                   LOCAL_CFLAGS     = LOCAL_CFLAGS,
76                   LOCAL_CCFLAGS    = LOCAL_CCFLAGS,
77                   LOCAL_CXXFLAGS   = LOCAL_CXXFLAGS,
78                   LOCAL_ASFLAGS    = LOCAL_ASFLAGS,
79                   CPPDEFINES       = CPPDEFINES,
80                   LOCAL_CPPDEFINES = LOCAL_CPPDEFINES,
81                   LIBS             = LIBS,
82                   LIBPATH          = LIBPATH,
83                   LINKFLAGS        = LINKFLAGS)
84
85Return("objs")
86#---------------------------------------------------------------------------------
87# End
88#---------------------------------------------------------------------------------
89