Subversion Repositories tendra.SVN

Rev

Rev 7 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
7 7u83 2
 * Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are met:
7
 *
8
 * 1. Redistributions of source code must retain the above copyright notice,
9
 *    this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
11
 *    this list of conditions and the following disclaimer in the documentation
12
 *    and/or other materials provided with the distribution.
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific, prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
 *
29
 * $Id$
30
 */
31
/*
2 7u83 32
    		 Crown Copyright (c) 1997
7 7u83 33
 
2 7u83 34
    This TenDRA(r) Computer Program is subject to Copyright
35
    owned by the United Kingdom Secretary of State for Defence
36
    acting through the Defence Evaluation and Research Agency
37
    (DERA).  It is made available to Recipients with a
38
    royalty-free licence for its use, reproduction, transfer
39
    to other parties and amendment for any purpose not excluding
40
    product development provided that any such use et cetera
41
    shall be deemed to be acceptance of the following conditions:-
7 7u83 42
 
2 7u83 43
        (1) Its Recipients shall ensure that this Notice is
44
        reproduced upon any copies or amended versions of it;
7 7u83 45
 
2 7u83 46
        (2) Any amended version of it shall be clearly marked to
47
        show both the nature of and the organisation responsible
48
        for the relevant amendment or amendments;
7 7u83 49
 
2 7u83 50
        (3) Its onward transfer from a recipient to another
51
        party shall be deemed to be that party's acceptance of
52
        these conditions;
7 7u83 53
 
2 7u83 54
        (4) DERA gives no warranty or assurance as to its
55
        quality or suitability for any purpose and DERA accepts
56
        no liability whatsoever in relation to any use to which
57
        it may be put.
58
*/
59
 
60
 
61
#ifndef NAME_INCLUDED
62
#define NAME_INCLUDED
63
 
7 7u83 64
#ifndef CONFIG_INCLUDED
65
#include "config.h"
2 7u83 66
#endif
67
 
68
/*
69
    ENVIRONMENTAL VARIABLES
70
 
71
    These macros give the names of the various environmental variables
72
    which are checked for input and output directories.
73
*/
74
 
75
#define INPUT_ENV		"TSPEC_INPUT"
76
#define OUTPUT_ENV		"TSPEC_OUTPUT"
77
#define INCLUDE_ENV		"TSPEC_INCL_OUTPUT"
78
#define SRC_ENV			"TSPEC_SRC_OUTPUT"
79
#define COPYRIGHT_ENV		"TSPEC_COPYRIGHT"
80
 
81
 
82
/*
83
    OUTPUT INCLUDE FILES
84
 
85
    These macros are concerned with the include output files.
86
*/
87
 
88
#define OUTPUT_API		"%s/shared/%s.api/MASTER.h"
89
#define OUTPUT_FILE		"%s/%s.api/%s"
90
#define OUTPUT_SUBSET		"%s/shared/%s.api/%s.h"
91
#define OUTPUT_SUFFIX		".api"
92
#define OUTPUT_LENGTH		8
93
 
94
 
95
/*
96
    OUTPUT SOURCE FILES
97
 
98
    These macros are concerned with the source output files.
99
*/
100
 
101
#define SOURCE_API		"%s/%s.api/MASTER.c"
102
#define SOURCE_FILE		"%s/%s.api/%s.c"
103
#define SOURCE_SUBSET		"%s/%s.api/%s.c"
104
 
105
 
106
/*
107
    OUTPUT MAKEFILES
108
 
109
    These macros give the location of the output makefiles.
110
*/
111
 
112
#define MAKEFILE		"%s/%s.api/Makefile"
113
#define MAKEFILE_API		"%s/%s.api/M_%s"
114
 
115
 
116
/*
117
    MISCELLANEOUS FILES
118
 
119
    These macros give certain standard file names.
120
*/
121
 
122
#define MASTER_FILE		"MASTER"
123
#define LOCAL_API		"LOCAL"
124
 
125
 
126
/*
127
    NAME CONSTANTS
128
 
129
    These macros give various name prefixes and other standard names.
130
*/
131
 
132
#define HIDDEN_NAME		"__local_"
7 7u83 133
#define HIDDEN_LEN		sizeof(HIDDEN_NAME)
2 7u83 134
#define BUILDING_MACRO		"__BUILDING_LIBS"
135
#define PROTECT_PREFIX		"__TDF"
136
#define DEFINE_PREFIX		"__BUILDING_TDF"
137
#define WEAK_PROTO		"__WEAK_SPEC"
138
#define WRONG_PREFIX		"__WRONG"
139
 
140
 
141
/*
142
    PROCEDURE DECLARATIONS
143
 
144
    These routines concerned with generating names of various sorts - file
145
    names, token names etc.
146
*/
147
 
7 7u83 148
extern char *basename(char *);
149
extern char *dirname(char *);
150
extern char *relative(char *, char *, int);
38 7u83 151
extern char *relative2(char *, char *);
7 7u83 152
extern char *hack_name(char *, char *);
153
extern char *token_name(char *);
154
extern char *token_prefix(char *, char *, char *);
155
extern char *subset_name(char *, char *, char *);
156
extern char *include_name(char *, char *, char *, char *);
157
extern char *src_name(char *, char *, char *, char *);
158
extern char *macro_name(char *, char *, char *, char *);
159
extern char *block_name(char *, char *, char *);
2 7u83 160
 
161
 
162
/*
163
    STANDARD FLAGS
164
 
165
    These are standard flags which are set by command line options.
166
*/
167
 
7 7u83 168
extern boolean allow_long_long;
169
extern boolean force_output;
170
extern boolean local_input;
171
extern boolean restrict_depth;
172
extern boolean restrict_use;
173
extern boolean unique_names;
174
extern int verbose;
2 7u83 175
 
176
 
177
/*
178
    INPUT AND OUTPUT DIRECTORIES
179
 
180
    These variables give the input and output directories.
181
*/
182
 
7 7u83 183
extern char *input_dir;
184
extern char *output_incl_dir;
185
extern char *output_src_dir;
186
extern int output_incl_len;
187
extern int output_src_len;
2 7u83 188
 
189
 
190
#endif