6 they are the compile paramter files for src-pkg building.
8 @ trim paramter by different kinds. different kind of paramters stored in
9 different files, every paramter writen in one line. it's easy to edit by shell
11 @ especially for some repeated paramter, such as lib path, include path,
12 src-file list, and so on. it can be processed with script easily.
13 Makefile process repeated paramters or repeated command executing by tag or
14 rule or $(patsubst). pkg-build put the repeated part into a .list file.
15 @ it's similar with some IDE, setting for scrope of project, executable, and
16 some particular src files.
17 @ settings.imi contains totoal config info beyound .list files. it's easy for
18 reading. and it can be parsed into diffrent dir and files, it's easy for shell
26 dep: it store file of xxx.pc referenced in paramter setting.
28 dest: dest config info dir.
29 dest/dest-general: settings for current project. files in it will be included in
30 a actual DEST config file for project paramter setting.
31 if the global paramter should be re-defined, comment the statement of
32 include. if the dest need paramters beyound global defination, append it in
33 dir of "DEST/DEST-<name>/*.list".
34 for single paramter append, add it to CFLAGS.imi or LDFLAGS.imi.
35 for single src file compile parmaters, make the similar dir as "DEST-<name>",
36 and write it to the corresponding config file.
37 dest/dest-general/*.imi: single paramter for compile or link.
38 dest/dest-general/*.list: a set of similar paramters used for compile or link.
39 dest/dest-general/inc-pkg.list: it's different with LDFLAGS-XXX.list, it's the
40 pkg name list with <name>.pc. build function will generate -l paramter for
43 dest/dest-<name>: config info for dest of <name>.
44 dest/dest-<name>/*.list: same as the files in dest-general.
45 dest/dest-<name>/build.imi: main config file for dest compilation. it include
46 files in dest/dest-general/*, include the files in current dir, and also the
47 directorys under dest/dest-<name>/src/<src-file-name>.
48 dest/dest-<name>/CFLAGS.imi: paramters of CFLAGS in totoal.
49 dest/dest-<name>/LDFLAGS.imi: paramters of LDFLAGS in totoal.
50 dest/dest-<name>/c-src.list: src file list for current dest building.
51 dest/dest-<name>/obj.list: obj file list for current dest building. it's used
52 for every dest building in DESTS normally.
53 under dest/dest-<name>/src/<src-file-name>/: it's a path name with dir prefix in
54 dir of 'src'. it's similar with dest/dest-<name>/ for paramters of single src
57 dests/dests-<name>: config info for lots of dest with a totoal name <name>. it
58 compile src file to an executable file. if you want to append some public src
59 files, compile them as a .o/.a/.so dest first.
61 pkg: install pkg info dir.
62 pkg-<name>-<subname>: a src-pkg generate lots of installable pkgs. this dir is
63 the subname in src-pkg. installable pkgs can be scalable.
65 shlib: it store code for building.
66 tasklib: some private task for building. such as *.def => *.c.
73 config file define variables with 'CONFIG_' prefix. it is used:
75 @ in config.h, and used in code by '#ifdef' or '#if'.
76 @ defined as a marcro, and used in compile paramter of '-DCONFIG_XXX'.
77 @ for switch of some feature src file, it is used as:
78 TUILIB_C_SRC_${CONFIG_XXX}+="src/tuisrc/matrix.c"
80 if CONFIG_XXX is defined as 'y' or 'Y'. it will be compiled in list of
81 TUILIB_C_SRC_Y as TUILIB_C_SRC.
82 if CONFIG_XXX is defined as 'n' or 'N'. it will not be compiled.
83 TUILIB_C_SRC_LIST="${TUILIB_C_SRC} ${TUILIB_C_SRC_y} ${TUILIB_C_SRC_Y}"
84 if some files need to be compile by complex expression of '#if' statement in
85 Makefile, process many CONFIG_XXX variable in a function, and define other
86 variables for some particular src file config.
87 it's the same for other compile paramters, such as some optimize paramter
88 switch by 'CFLAGS_${CONFIG_XXX}+="-O2"'.
95 testing work can be done by script or executable file.
96 for integrated testing, put test program src-file in dir of 'testing/src'.
97 for unit testing, put test program src-file in dir same as it's code. named
98 it as 'xxx_test.c', and append them to 'dests' of 'testing'. it put a module
99 files of function feature in the same dir.
100 for some unit testing, some feature is not treated as a module, it's just
101 code block, and it will not be re-used. put unit src-files in 'testing/src'.
104 # code generation in build
105 ==========================
107 some code should be generated when it was build. it uses utility programs to
108 do this work. some times, it's a script program, some times it's a binary
110 if it's a binary program with src, put it in dir of 'utils' or 'supports' or
111 'tools'. if it's a script program, put it in dir of 'scripts'. i think the
112 name of 'supports' is more suitable, it means programs for building.
113 for code generation, it's the similar work as compilation, which include src
120 some operation is too complex by writing config files. for example, version
121 file generate, config file generate, code pre-processing, there are many work
122 before source code building. if we append a dest or dests to generate them,
123 it's too complex to read.
124 sometimes, we can write building command in a function, and invoke it before
126 version.h and config.h is single file processing, it's different with lots
127 of src file pre-processing. write them by a function.
128 file of '*.def' is the src file for builtin .c src-code. for many repeated
129 src-file pre-processing, it's suitable to append a dests in project.